- Alpine Linux (very light!)
- Python +3.9
- Docker
- MySQL +8.0
- Tests
In order to work properly, make sure you have the following installed on your system:
- Linux
- Docker
- Docker Compose
- postman.com - Postman for APIs requests(optional)
First, run the following command to add a new entry in you /etc/hosts
Let's use RFC 2606 for local domain names 😉
echo '127.0.0.1 schoolplus.localhost' | sudo tee -a /etc/hosts
Now, inside the project's directory, let's run the following to create all Docker images
make install
With all images up and running, let's create our database
make migration
That's it! Our API is up and running 🙌
There are a few functional tests to test the API behavior and responses. Fell free to run the command below as many times as you want. Tests here are idempotent 🤩
make test
Our API talks only JSON format.
The file schoolplus.postman_collection.json is a Postman file. Import it to test manually the API endpoints:
URL | Verb | Behavior |
---|---|---|
/api/v1/student | GET | Returns all students |
/api/v1/student/ | GET | Returns the student whose ID was given |
/api/v1/student/ | PATCH | Changes a specific student |
/api/v1/student/ | DELETE | Deletes a specific student |
PS: I DO RECOMMEND use Postman with the schoolplus.postman_collection.json file for more API details
We use MySQL +8.0 database, and all the schema information is at /api/migrations/0001_initial.py
Free Software, Hell Yeah!