Skip to main content

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

Project description

Travis CI build SonarCloud Quality SonarCloud Maintainability Codacy Maintainability Maintainability Pypi project Pypi total project downloads

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

How do I install this package?

As usual, just download it using pip:

pip install environments_utils

Tests Coverage

Since some software handling coverages sometime get slightly different results, here’s three of them:

Coveralls Coverage SonarCloud Coverage Code Climate Coverate

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.2.tar.gz (3.1 kB view hashes)

Uploaded Source

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