https://github.com/pythops/python-webapp
Python Web App Structure
https://github.com/pythops/python-webapp
python
Last synced: 12 months ago
JSON representation
Python Web App Structure
- Host: GitHub
- URL: https://github.com/pythops/python-webapp
- Owner: pythops
- Created: 2023-10-12T18:00:51.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-16T05:37:08.000Z (over 2 years ago)
- Last Synced: 2025-04-03T11:44:38.092Z (12 months ago)
- Topics: python
- Language: Python
- Homepage: https://pythops.com/post/python-web-app-structure.html
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Python Web App Structure
This is the demo app for the article [Python Web App Structure](https://pythops.com/post/python-web-app-structure.html)
## Prerequisites
You need:
- [python](https://www.python.org/)
- [httpie](https://github.com/httpie)
- [podman](https://github.com/containers/podman)
- [poetry](https://github.com/python-poetry/poetry)
- [just](https://github.com/casey/just)
## Setup
1. Start a postrges instance with podman
```shell
$ just run-db
```
2. Run the web app
```shell
$ just run
```
3. Check the API doc here http://127.0.0.1:8080/docs
## API
#### Create a new user
```bash
$ http POST :8080/users username="pythops" email="contact@pythops.com"
```
#### Get all users
```shell
$ http :8080/users
```
## License
AGPLv3