[](https://coveralls.io/github/u1234x1234/tempenviron?branch=master)
# tempenviron
`tempenviron` allows you to temporary modify your environment variables with context manager.
## Usage:
```python
from tempenviron import updated_environ
# Update with keyword arg
assert 'RANDOM_ENVIRONMENT_VARIABLE' not in os.environ
with updated_environ(RANDOM_ENVIRONMENT_VARIABLE='SOME_VALUE'):
assert os.environ['RANDOM_ENVIRONMENT_VARIABLE'] == 'SOME_VALUE'
assert 'RANDOM_ENVIRONMENT_VARIABLE' not in os.environ
# Or pass a dictionary
with updated_environ({'var1': 'val1', 'var2': 'val2'}):
assert os.environ['var1'] == 'val1'
assert os.environ['var2'] == 'val2'
# Or both. In that case keywords have a higher priority
with updated_environ({'var1': 'val1', 'var2': 'val2'}, var2='val3'):
assert os.environ['var2'] == 'val3'
# To temporary delete an environment variable, set the variable to None
os.environ['var1'] = 'val1'
with updated_environ(var1=None):
assert 'var1' not in os.environ
assert os.environ['var1'] == 'val1'
```
Metadata
Release files for tempenviron 0.0.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 |
|---|---|---|---|---|
| tempenviron-0.0.1.tar.gz | 2.0 kB | Without provenance | Details for tempenviron-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tempenviron-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for tempenviron-0.0.1-py3-none-any.whl |
Total release size: 5.7 kB
Release files / tempenviron-0.0.1.tar.gz
| Download URL | tempenviron-0.0.1.tar.gz |
|---|---|
| Size | 2.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74940ef5754fe9f5a9aa5d558fb4cc55bf32d00b321fa88ee6d14760ee38ef91
|
|
BLAKE2b-256 checksum How to use checksums |
767263e66f5ee0253f4ae0067b7783638ded4f1b1d2ff133cfb139edcbf48951
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.6.4
|
Release files / tempenviron-0.0.1-py3-none-any.whl
| Download URL | tempenviron-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a519962bb796c74dec1a4303941fa84f5e67d6bab57bf7e3817263456aa30bf2
|
|
BLAKE2b-256 checksum How to use checksums |
ab7dc1441b89146504c431280219a9cfde6ee95688e235cfdbded1ddf2d970f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.6.4
|
Security for tempenviron 0.0.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.