Skip to main content

Ensure pip package version, and auto update if not

Project description

Usage:

import pip_ensure_version

# pip_ensure_version.set_debug()

pip_ensure_version.require_package(
    "tqdm",     # package name
    "4.47",     # pin version (optional)
)

pip_ensure_version.require_gitpackage(
    "soraxas-toolbox",                          # package name
    "soraxas/python-soraxas_toolbox",           # repo name (default to github)
    "aa00d757b58c43523d7c518cdac600d4a75c6015", # commit id (optional)
)

pip_ensure_version.require_gitpackage(
    "easy-visualiser",
    ">0.1.2",
)

# at this point, the requested package will be up-to-date
import tqdm
import soraxas_toolbox
import easy_visualiser

...

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

pip-ensure-version-1.0.1.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

pip_ensure_version-1.0.1-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

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