Skip to main content

Unified settings management for FastAPI and beyond.

Project description

fastenv

🔧 Unified settings management for FastAPI and beyond 🚀

Imports: isort Code style: black pre-commit ci

🚧 UNDER CONSTRUCTION - NOT FOR PRODUCTION 🚧

Description

Environment variables are key-value pairs provided to the operating system with syntax like VARIABLE_NAME=value. Collections of environment variables are stored in files commonly named .env and called "dotenv" files. The Python standard library provides tools for reading environment variables, such as os.getenv("VARIABLE_NAME"), but these tools only read environment variables that have already been loaded. Additional logic is therefore needed to load environment variables before they can be read by Python.

This project aims to:

  • Unify settings management for FastAPI. Uvicorn, Starlette, and pydantic each have their own ways of loading environment variables and configuring application settings. This means that, when configuring a FastAPI application, there are at least three different settings management tools available, each with their own pros and cons. It would be helpful to address the limitations of each of these options, potentially providing a similar, improved API for each one.
  • Replace the aging python-dotenv project with a similar, but more intuitive API, and modern syntax and tooling.
  • Read settings from TOML. It's all about pyproject.toml now. Poetry has pushed PEP 517 build tooling and PEP 518 build requirements forward, and even setuptools has come around. Why don’t we use the metadata from our pyproject.toml files in our Python APIs?
  • Integrate with object storage. Dotenv files are commonly kept in object storage like AWS S3, but none of the tools mentioned above integrate with object storage clients.

Let's see how this goes!

Further information

See CONTRIBUTING.md.

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

fastenv-0.0.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

fastenv-0.0.1-py3-none-any.whl (3.4 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