https://github.com/colinbut/todo-list-api-python-flask
Example Python Web App built using Flask
https://github.com/colinbut/todo-list-api-python-flask
flask python
Last synced: 2 months ago
JSON representation
Example Python Web App built using Flask
- Host: GitHub
- URL: https://github.com/colinbut/todo-list-api-python-flask
- Owner: colinbut
- Created: 2020-12-07T09:42:13.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-02-13T21:46:36.000Z (over 4 years ago)
- Last Synced: 2025-03-27T10:16:17.067Z (over 1 year ago)
- Topics: flask, python
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# todo-list-api-python-flask
This example demonstrates building a Web API in Python using Python's Flask Web App Framework.
## Running App locally
```bash
./start_app.sh
```
## Running App locally (Dockerized)
```bash
docker build -t todo-list-api-python-flask .
docker run -d -p 8888:8888 todo-list-api-python-flask:latest
```
By default the app is exposed on port `8888` (see `src/app.py`)
## API Endpoints
e.g.
```
curl http://localhost:8888/todo?user_id={user_id}
curl http://localhost:8888/todo/{todo_id}?user_id={user_id}
curl -X POST -H "Content-Type: application/json" -d "{ \"description\": \"Organize fixing of microwave\", \"title\": \"Fixing microwave\", \"user_id\": 1 }" http://localhost:8888/todo
curl -X PUT -H "Content-Type: application/json" -d "{ \"description\": \"Organize fixing of microwave\", \"title\": \"Fixing microwave\", \"user_id\": {user_id}, \"id: {todo_id}\" }" http://localhost:8888/todo
curl -X DELETE http://localhost:8888/todo/{todo_id}
```
## Author
Colin But.