Skip to main content

FastAPI Global Variable

How to use

  1. Set a variable
# user_service.py
from fastapi import FastAPI
from fastapi_global_variable import GlobalVariable

app = FastAPI(title="Application")

GlobalVariable.set('app', app)
  1. Use variable
from fastapi_global_variable import GlobalVariable

print(GlobalVariable.get_or_fail('app'))
print(GlobalVariable.get('app'))

How to test in testpypi

  1. Increase the version in pyproject.toml
  2. Run command
$ . ./build_and_test.sh

How to publish new version

  1. Increase the version in pyproject.toml
  2. Run command
$ . ./build_and_publish.sh

Metadata

Release files for fastapi-global-variable 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastapi-global-variable 0.0.4
File Size Uploaded Provenance Actions
fastapi_global_variable-0.0.4.tar.gz 3.8 kB Without provenance Details for fastapi_global_variable-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fastapi-global-variable 0.0.4
File Interpreter ABI Platform Actions
fastapi_global_variable-0.0.4-py3-none-any.whl Python 3 none any Details for fastapi_global_variable-0.0.4-py3-none-any.whl

Total release size: 6.7 kB

Release files / fastapi_global_variable-0.0.4.tar.gz

Download URL fastapi_global_variable-0.0.4.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
733638e0bf29de1efb2b3a0d7835a4e23044100e5af078d235511fde3348bc88
BLAKE2b-256 checksum
How to use checksums
97519061a84743820af8ef18fe991de7c113c01388dc557319a3e029b22313b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / fastapi_global_variable-0.0.4-py3-none-any.whl

Download URL fastapi_global_variable-0.0.4-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
adf25fe03c5fccaae9590e2a1c2e628e18e95033e07ef00871bb82ae764ad215
BLAKE2b-256 checksum
How to use checksums
bedc6cd330a24e129b27b6d389a300d73fc9af135003cb7c40e2e9149e5ec727
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Security for fastapi-global-variable 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page