Table of Contents
POKEAPI STATISTICS API
Goal: Create a Poke-berries statistics API.
General rules:
-
Commit your changes to a public repository in GitHub.
-
Add a README.md with instructions to run the code.
Support the following endpoints
GET /allBerryStats
Response: {
"berries_names": [...],
"min_growth_time": "" // time, int
"median_growth_time": "", // time, float
"max_growth_time": "" // time, int
"variance_growth_time": "" // time, float
"mean_growth_time": "", // time, float
"frequency_growth_time": "", // time, {growth_time: frequency, ...}
}
This endpoint should consume an external API to get the proper info, here
is the documentation page: https://pokeapi.co/docs/v2#berries
TODO List.
-
The data must be human-readable.
-
Use environment variables for configuration.
-
The response must include the content-type header (application/json)
-
Functions must be tested with pytest.
For extra points:
-
Upload and deploy the solution to a free cloud service for example Heroku.
-
Use a containering system like docker
-
Use a Python library (example: Matplotlib) to create a Histogram graph and display the image in a plain html. Link
Documentation Endpoint (Swagger)
http://localhost:8000
Get AllBerries Stats (API View and POSTMAN)
http://localhost:8000/api/allBerryStats/