Skip to main content

Bootstrap

from fastapi import FastAPI
from fastapi_tools import bootstrap


@bootstrap.on_exit(kind=["server"])
async def shutdown1(app: FastAPI) -> None:
    print("Shutdown")
    
@bootstrap.on_exit
async def shutdown2(app: FastAPI) -> None:
    print("Shutdown")
    
    
app = FastAPI(lifespan=bootstrap.lifespan("server"))

Download files

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

Source Distribution

fastapi_tools_bootstrap-0.1.5.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

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

fastapi_tools_bootstrap-0.1.5-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_tools_bootstrap-0.1.5.tar.gz.

File metadata

  • Download URL: fastapi_tools_bootstrap-0.1.5.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.5 Darwin/24.1.0

File hashes

Hashes for fastapi_tools_bootstrap-0.1.5.tar.gz
Algorithm Hash digest
SHA256 3e03c2a80c257957d17995c9559aaf9704c144a3c2e2e9fdd2e50348b90d0a32
MD5 2cb1546ada19743749b5265302646c3d
BLAKE2b-256 f1bbd624f8976e15538f65d053680583ee432c3d53ca90faba23ca96668ad928

See more details on using hashes here.

File details

Details for the file fastapi_tools_bootstrap-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_tools_bootstrap-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d7bbedd7cf9a5a53fd822b1ef7d2a7a3c632e903bd387eadc667f9e0e58274dc
MD5 65ab42437d2e9632a271b51987badb46
BLAKE2b-256 09bed22c77eb7d6dc255c0a720be7c017dfec84b57c051e137de7c0075871a13

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 files

Supported by

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