Skip to main content

Custom API written in Python using FastAPI

Project description

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 with postgresql+psycopg://. Should be in the format specifiec in template.env
  • TZ - Timezone of the container
  • PGTZ - 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"}

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

js_api-20250315022839.dev0.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

js_api-20250315022839.dev0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file js_api-20250315022839.dev0.tar.gz.

File metadata

  • Download URL: js_api-20250315022839.dev0.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for js_api-20250315022839.dev0.tar.gz
Algorithm Hash digest
SHA256 1dd690fa8fa726c1016eb783abc7efc5289ed1a60aeaad866014993d0b0c7605
MD5 5ab6b2f62aa9932908c0b38893e71c91
BLAKE2b-256 2fa476e85c1b6caf0b3cc22f56d66f58ff1cc90dd0209c0d3ddf256eac0259cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for js_api-20250315022839.dev0.tar.gz:

Publisher: ci-cd.yml on jnstockley/api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file js_api-20250315022839.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for js_api-20250315022839.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 03c52a0e009bfba436837fd4ae3eeeb3cafe6754993b00a1f97be724b023db9c
MD5 65ee72eeba441ee5c204dfd353c9f51a
BLAKE2b-256 1a6ddeee33a53d6de49a15b3e9f4e59162a5e82ca3ea8ddbb66ed8c3aae57553

See more details on using hashes here.

Provenance

The following attestation bundles were made for js_api-20250315022839.dev0-py3-none-any.whl:

Publisher: ci-cd.yml on jnstockley/api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page