Skip to main content

Class-based environment variables typed specification

Project description

named-env

Class-based environment variables typed specification.

Installation

pip install named-env

Usage example

from named_env import EnvironmentNamespace, RequiredInteger
import os


class WebApplicationEnvironmentNamespace(EnvironmentNamespace):
    WEB_SERVER_PORT = RequiredInteger()


env = WebApplicationEnvironmentNamespace()

if __name__ == "__main__":
    os.environ["WEB_SERVER_PORT"] = "80"
    print(env.WEB_SERVER_PORT)  # 80
    print(type(env.WEB_SERVER_PORT))  # int

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

named_env-2.4.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

named_env-2.4.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file named_env-2.4.1.tar.gz.

File metadata

  • Download URL: named_env-2.4.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.16 Darwin/24.2.0

File hashes

Hashes for named_env-2.4.1.tar.gz
Algorithm Hash digest
SHA256 72b2cff18bb2c465fcd63bbf786b5d854900980f35b139259a36199d85756154
MD5 3398daa04aa55a596a1bdd047c1ac13b
BLAKE2b-256 f17ff54b1737c9450c61d8c395e0a62b63a21e801b0ae9edbc5cf97ce0652d75

See more details on using hashes here.

File details

Details for the file named_env-2.4.1-py3-none-any.whl.

File metadata

  • Download URL: named_env-2.4.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.16 Darwin/24.2.0

File hashes

Hashes for named_env-2.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0540a6a1361a7646b1b2b63cd0ec02a387b0d78e5338800d6e57619cd4218400
MD5 a33d848d7dc955df6a02829e8c78844c
BLAKE2b-256 1f23ec6d62385cd7d00bca9360869dfefe44a5f9f7cf78cecc399373d405e664

See more details on using hashes here.

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