Skip to content

Simple Django REST API for processing a CSV and retrieving filtered data

Notifications You must be signed in to change notification settings

jourdanrodrigues-tests/test_13

Repository files navigation

Aktos Exercise

Generated from Jourdan's Django template.

This project runs entirely on Docker containers. Make sure to have it in your environment.

It's temporarily live at http://ec2-54-205-240-89.compute-1.amazonaws.com:8000/

Video walkthrough: https://www.loom.com/share/038afffb5b5f4591b86f8c731c7934c6

Endpoints

The API endpoints are thoroughly displayed at /docs/ (Swagger UI).

Linter

This projects makes use of pre-commit. Make sure it's installed in your dev-environment with the following command:

pre-commit install

Database

This project depends on PostgreSQL and the connection is established through an environment variable called DATABASE_URL. Check the files .env.example and docker-compose.yml for details.

Running the app

The script compose.sh is there for you to run commands in the container. It's a simple wrapper around docker-compose, so you might want to take a look at its documentation.

./compose.sh up

./compose.sh shortcuts

The script has the same API as docker-compose, with a few adjustments:

# Running development setup
./compose.sh dev up  # becomes the below
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up

# "run"
./compose.sh run server sh  # becomes the below
docker-compose run --rm server sh

# "manage.py" commands
./compose.sh run manage.py test  # becomes the below
docker-compose run --rm server python manage.py test
  • ~ dev ~ = ~ -f docker-compose.yml -f docker-compose.dev.yml ~
  • ~ run ~ = ~ run --rm ~
  • ~ manage.py ~ = ~ server manage.py ~

About

Simple Django REST API for processing a CSV and retrieving filtered data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published