Skip to main content

III Common FastAPI base.

Project description

III API base

Hatch project

Usage

from pathlib import Path

from api_helper import FastAPI, success_response

app: FastAPI = FastAPI(base_folder=Path(__file__).parent)
# Optional to setup sentry
app.setup_sentry("sentry_dsn")


@app.get("/")
def home():
    return success_response("Hello, World!")


# Run the app
app.run("127.0.0.1", 5000)

Build backend

hatch

hatch env create
hatch build
hatch publish -r test

Project details


Download files

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

Source Distribution

iii_api_helper-0.0.1.dev0.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

iii_api_helper-0.0.1.dev0-py3-none-any.whl (10.0 kB view hashes)

Uploaded Python 3

Supported by

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