https://github.com/interpause/py-api-template
https://github.com/interpause/py-api-template
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/interpause/py-api-template
- Owner: Interpause
- Created: 2024-05-09T08:27:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-30T12:24:34.000Z (5 months ago)
- Last Synced: 2025-01-30T13:26:35.760Z (5 months ago)
- Language: Python
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# py-api-template
Template for FastAPI-based API server. Features:
- Supports both CPU/GPU-accelerated setups automatically.
- Poetry for package management.
- Ruff for formatting & linting.
- VSCode debugging tasks.
- Other QoL packages.Oh yeah, this template should work with the fancy "Dev Containers: Clone Repository
in Container Volume..." feature.## Usage Instructions
- Replace all instances of `py-api-template`. Optionally, rename `src` to a nicer name.
- Tip: Rename the `src` folder first for auto-refactoring.## Useful Commands
Ensure the virtual environment is active and `poetry install` has been run before using the below:
```sh
# Launch debugging server, use VSCode's debug task instead by pressing F5.
poe dev
# Run any tests.
poe test
# Build docker image for deployment; will also be tagged as latest.
poe build {insert_version_like_0.1.0}
# Run the latest image locally.
poe prod
# Publish the latest image.
poe publish
```