envclasses
envclasses is a library to map fields on dataclass object to environment variables.
Installation
pip install envclasses
Usage
Declare a class with dataclass and envclass decorators.
from envclasses import envclass, load_env
from dataclasses import dataclass
@envclass
@dataclass
class Foo:
v: int
foo = Foo(v=10)
load_env(foo, prefix='foo')
print(foo)
Run the script
$ python foo.py
Foo(v=10)
Run with environment variable
$ FOO_V=100 python foo.py
Foo(v=100)
Metadata
Release files for envclasses 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| envclasses-0.3.1.tar.gz | 5.3 kB | Without provenance | Details for envclasses-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| envclasses-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for envclasses-0.3.1-py3-none-any.whl |
Total release size: 10.6 kB
Release files / envclasses-0.3.1.tar.gz
| Download URL | envclasses-0.3.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13f9449e97a94b4ec6052edcd990aeebd0e58b63f5b6188200e82f4b3e5f72ef
|
|
BLAKE2b-256 checksum How to use checksums |
9caa911b382870649ec2fe3c61ee6906700cfdeae5e9c278343f4b9e1e809e0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.15 Darwin/21.6.0
|
Release files / envclasses-0.3.1-py3-none-any.whl
| Download URL | envclasses-0.3.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16026211b60a37a7c4e3702ad150a3584a33dc7bff5273e9b640ac739602c0b7
|
|
BLAKE2b-256 checksum How to use checksums |
0d31c8c5dd38b72eded40df850c6f1a5aa6fec19b9fe1cd209b5385b0a559e15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.15 Darwin/21.6.0
|
Security for envclasses 0.3.1
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.