Skip to content

heitoranjos15/oowlish_challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oowlish_challenge

Customer APP

App to list all customers

Architecture

Command migrate_customer_csv

Migrate CSV

Customer APP

customer_app

Steps to build locally

To run Customer API locally follow the steps bellow:

Installation

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

Create SQLite Database

$ python manage.py migrate

Import csv data file

$ python manage.py migrate_customer_csv --path PATH_FILE/FILE.CSV

Run the Django Server

$ python manage.py runserver

Usage

To get customer informations we have to 2 options

  1. Type this URL on your browser:
$ http://localhost:8000/documentation
  1. With cURLs:

    customers/{page}:

    $ curl --location --request GET 'http://127.0.0.1:8000/customers/1'

    customer/{id}:

    $ curl --location --request GET 'http://127.0.0.1:8000/customer/1'

Run Tests

Inside the project folder run the flow command:

$ source env/bin/activation
$ python manage.py test

DB Configuration

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

Tasks

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages