App to list all customers
To run Customer API locally follow the steps bellow:
Use the package manager pip to install the requirements. Linux enviroments just follow the commands bellow:
$ git clone https://github.com/heitoranjos15/oowlish_challenge
$ cd oowlish_challenge
$ python3 -m venv env
$ source env/bin/activate
$ pip install -r requirements.txt
$ python manage.py migrate
$ python manage.py migrate_customer_csv --path PATH_FILE/FILE.CSV
$ python manage.py runserver
To get customer informations we have to 2 options
- Type this URL on your browser:
$ http://localhost:8000/documentation
- With cURLs:
$ curl --location --request GET 'http://127.0.0.1:8000/customers/1'
$ curl --location --request GET 'http://127.0.0.1:8000/customer/1'
Inside the project folder run the flow command:
$ source env/bin/activation
$ python manage.py test
To generate the migration file run this steps:
$ source env/bin/activation
$ python manage.py makemigrations
After that, run the migrate command to create the tables on db.
$ python manage.py migrate
- Create a Django App
- Create a migrate_customer_csv command to import csv data
- Integration with Google GeoCoding
- Create a function asyncronous to insert on customer table
- Create Endpoints to get customer informations
- Documentation
- Test for Endpoints
- Logging
- DockerFile
- Test for migrate_customer_csv command
- Terraform deploy
- Production class with all prod enviroments