Skip to main content

Utilities to identify which environments is your python script running within.

Project description

travis sonar_quality sonar_maintainability sonar_coverage Maintainability pip

Utilities to identify which environments is your python script running within.

How do I get this?

As usual, just run pip:

pip install environments_utils

is_tmux

Return a boolean representing if script is running within a TMUX-like terminal.

from environments_utils import is_tmux

if not is_tmux():
    print("This script is long running, consider starting it within a TMUX-like terminal.")

is_notebook

Return a boolean representing if script is running within a jupyter notebook.

from environments_utils import is_notebook
from tqdm import tqdm_notebook, tqdm as tqdm_cli

tqdm = tqdm_notebook if is_notebook() else tqdm_cli

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

environments_utils-1.0.1.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file environments_utils-1.0.1.tar.gz.

File metadata

  • Download URL: environments_utils-1.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.13.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for environments_utils-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3384a8d3fa0a47ac6b02ce22762866516e593fc58ac77c0d7c20903e05612b2e
MD5 f0e10d433ddf88490aea5ba35d3e7dda
BLAKE2b-256 837a8cd0cb3ac6b245c4e7a4df2214c9885e68ac2f3e7eb0b9dd7588db1e34db

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page