simple-env
Simple Processing of Environmental Variables
features
- automatic removal of quotes (
"and') - automatic conversion of Booleans (
"true","True", and"TRUE"are converted intoTrue) - automatic conversion of Integers
- automatic suggestion of typo corrections
usage
get variable
import simple_env as se
email_host = se.get("EMAIL_HOST")
# email_host is "smtp.gmail.com"
email_use_tls = se.get("EMAIL_USE_TLS")
# email_use_tls is True
email_port = se.get("EMAIL_PORT")
# email_port is 8080
suppress warnings
By default, simple env warns when it can't find a variable and offers an alternative suggestion if possible.
email_use_tls = se.get("USE_TLS")
prints
[simple-env] could not find "USE_TLS", did you mean "EMAIL_USE_TLS"?
check if environmental variable is set
import simple_env as se
hasState = se.has("STATE")
# hasState is True if the variable is set to null
Metadata
Release files for simple-env 0.4.0
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 |
|---|---|---|---|---|
| simple-env-0.4.0.tar.gz | 3.0 kB | Without provenance | Details for simple-env-0.4.0.tar.gz |
Release files / simple-env-0.4.0.tar.gz
| Download URL | simple-env-0.4.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17b107e64dd6be5bb4163bb47ba39bf48adac426f2682687436d3f3e8f9b4e6f
|
|
BLAKE2b-256 checksum How to use checksums |
167c99b21e80d9eb0f87241dc0e85c3c1656358c660594b801320d8ef3bdfb22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
|
Security for simple-env 0.4.0
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.