Basic Customers REST API created using Flask, SQLAlchemy, Marshmallow
- DB Setup
- Variable Configuration Files
- Customer Routes
- Login/Signup Setup
- JWT Auth
- Travis CI
- Tests
- Create Docker Compose File
To run this application, you'll require pipenv
pip install pipenv
- Clone this repository,
cd flask-crud
pipenv install
- Run the application
-
Development Mode
export FLASK_ENV=development && flask run
-
Production Mode
flask run
-
Field | Type | Description |
---|---|---|
name |
string |
Name |
dob |
datetime.date |
Date of Birth |
updated_at |
datetime |
Last Updated Date |
Route | Method | Description | Authentication Required | Body |
---|---|---|---|---|
/login | POST |
Login endpoint to receive the token | No | username , password |
/signup | POST |
Signup endpoint to receive the token | No | userame , password |
/customer | GET |
Lists all customers | Yes | - |
/customer | POST |
Lists all customers | Yes | name , dob |
/customer/<id> | PUT |
Add a customer | Yes | name , dob |
/customer/<id> | GET |
Fetch a customer | Yes | - |
/customer/<id> | DELETE |
Delete a customer | Yes | - |
/customer/list/<n> | GET |
List all customers sorted by dob |
Yes | - |