Skip to main content

This is a small program which tries to guess what environment variables will be needed by other Python programs.

Build Status PyPI version

This tool should work on Python 2.7 and Python 3.3+

Usage

guessenv [-h] [-v] [-q] [-O] [-A] [-x EXCLUDE] [-X] files [files ...]

By default, guessenv will walk through all the files and directories specified on the command line, look for patterns which seem to be searching for an environment variable, and print out all of the "required" environment variables (those accessed through something akin to os.environ[...]).

If invoked with the -O argument, it will also print out optional environment variables (accessed through os.getenv(...) or os.environ.get(...).

If invoked with the -A argument, it will exit non-zero if any "required" environment variables are not currently present in the environment.

If invoked with the -v argument, it will print more verbose information about where variables were found.

If invoked with the -q argument, it will print nothing (unless -A is also passed and any variables are missing)

The -x and -X arguments allow you to exclude files or directories when doing recursive searches.

License

This work is licensed under the ISC license, a copy of which can be found in LICENSE.txt.

Release files for guessenv 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for guessenv 0.2
File Size Uploaded
guessenv-0.2.tar.gz 4.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for guessenv 0.2
File Interpreter ABI Platform
guessenv-0.2-py3-none-any.whl Python 3 none any Details
guessenv-0.2-py2-none-any.whl Python 2 none any Details

Total release size: 14.8 kB

Release files / guessenv-0.2.tar.gz

Download URL guessenv-0.2.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9945b9c5932c91527d974b6faed99bd55d820af63a70b364d4de563899cb52aa
BLAKE2b-256 checksum
How to use checksums
c3f9b0f7eaad496537c8dc0fe5e88d5e0d82babd1dd8ced1506795a8c0a83af2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / guessenv-0.2-py3-none-any.whl

Download URL guessenv-0.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87bcb50060ac89d89337e97776f1da7941f2ab3c7cbeb2708f575ac495fb61ba
BLAKE2b-256 checksum
How to use checksums
4c4b2481503b0bc0b090979cb691cfb401cb1bb0ed38d4ec3d873a54d0ee133b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / guessenv-0.2-py2-none-any.whl

Download URL guessenv-0.2-py2-none-any.whl
Size 5.1 kB
Tags Python 2
SHA-256 checksum
How to use checksums
4fb054160886161e4290503b69a4166cb89b6eeff90894d633b9de0f60bdfefa
BLAKE2b-256 checksum
How to use checksums
ff4593761ab3ab4c8744af95ffde878d98c57aefd3259e217dae46c6aaa37b0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.2 This release

3 release files

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page