Django is a web framework in python. I chose it because of:
- Admin Interface (To provide CRUD operations)
- Testing Framework
- ORM
- Reusable django apps and packages
- DRF - fast and convenient way to start your API
docker-compose up
docker-compose exec app python manage.py migrate
POST api/upload/
- import levels info from csv file
GET api/v1/levels/<id>
- retrieve level info by id
GET api/v1/levels/?user_id=<user_id>
- get list of levels, if called with user_id
filters by user_id
Use Filters button to apply filters (sort
, device timestamp
, user_id
)
For pagination use query params (limit
, offset
)
- I would use
Celery
to executeimport task
as a background process. - I would provide more in depth documentation about filters, pagination and sorts.
- I would use permissions, auth, user model to provide secure access to endpoint.
- I would set up fixtures to easier reuse objects across tests.
- I would follow git flow to split project into
features
and name branches according to story purpose.