Basic Star Wars Planets RESTful API for insertion, removal and querying of the Star Wars saga's planets.
- MongoDB
- Python 3
- flask
- flask-restful
- pytest
/planets
GET
: List all planetsPUT
: Insert a new planet data, containing name, terrain and climate in JSON format
/planets/<planet_id>
GET
: Retrieve a single planet data by its unique ID.DELETE
: Delete a planet by its unique ID.
/planets/name/<planet_name>
GET
: Retrieve a single planet data by its name.
In the root directory, run:
python3 app.py
In the root directory, run:
python3 -m pytest
- Document the API and use a tool to generate its documentation
- Validate input data for HTTP requests and database operations
- Change to a BDD tool for testing (e.g.: behave)
- Add coverage tests
- Integrate the code with a CI tool for testing (Travis, Jenkins, etc.)
- Document all methods
- Schedule a job for updating films count for planets in the database (make it future-proof for when a new film is released)