mirror of
https://github.com/jnstockley/api.git
synced 2026-06-05 11:37:59 -05:00
Custom API written in Python using FastAPI
- Python 85.9%
- HTML 5.3%
- Shell 4.8%
- Dockerfile 4%
|
Some checks are pending
Lint, Test, and Deploy / Lint (push) Waiting to run
Lint, Test, and Deploy / Test (push) Waiting to run
Lint, Test, and Deploy / Publish to PyPI (push) Blocked by required conditions
Lint, Test, and Deploy / Deploy Docker Image (push) Blocked by required conditions
Trivy Security Scan / Scan (push) Waiting to run
Sync from python-starter |
||
|---|---|---|
| .github/workflows | ||
| scripts | ||
| src | ||
| templates | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| .python-version | ||
| .yamllint | ||
| compose-dev.yml | ||
| compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| Main Branch Protection.json | ||
| pyproject.toml | ||
| README.md | ||
| renovate.json | ||
| sample.env | ||
| template.env | ||
| TODO.md | ||
| uv.lock | ||
API
This is a custom API, written in Python using FastAPI, to help me accomplish tasks the can be improved through a RESTful API
Setup
Simplest setup is to start from compose.yml and template.env, which should be renamed to .env
Environment Vairables
API_KEY- Any long, random string. Keep this secret as this is the only form of authentication for the API. All routes require it, except/health-check/DATABASE_URL- The URL to connect to postgres DB. Must start withpostgresql+psycopg://. Should be in the format specifiec in template.envTZ- Timezone of the containerPGTZ- Timezone the Postgres container should use
How to Access
Using the compose.yml file, you can access the API at http://<IP>:5000/health-check. If everything is setup correctly, you should see {"status":"ok"}