Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/interpause/py-api-template
https://github.com/interpause/py-api-template
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/interpause/py-api-template
- Owner: Interpause
- Created: 2024-05-09T08:27:33.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-29T12:22:14.000Z (8 months ago)
- Last Synced: 2024-05-30T00:12:57.273Z (8 months ago)
- Language: Python
- Size: 139 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
```