Skip to main content

mork: A project for installing packages across the virtualenv boundary.

https://img.shields.io/pypi/v/mork.svg https://img.shields.io/pypi/l/mork.svg https://api.travis-ci.com/sarugaku/mork.svg?branch=master https://ci.appveyor.com/api/projects/status/5mo40rneihk6y8po/branch/master?svg=true https://img.shields.io/pypi/pyversions/mork.svg https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg Documentation Status

Summary

Mork is a library designed for installing and querying python packages inside virtual environments.

🐉 See What’s Installed

>>> import mork
>>> venv = mork.VirtualEnv.from_project_path('/home/user/git/pipenv')
>>> dists = venv.get_distributions()
>>> [dist for dist in dists][:3]
[wheel 0.31.1 (/home/user/.virtualenvs/pipenv-MfOPs1lW/lib/python3.7/site-packages), Werkzeug 0.14.1 (/home/user/.virtualenvs/pipenv-MfOPs1lW/lib/python3.7/site-packages), vistir 0.1.4 (/home/user/.virtualenvs/pipenv-MfOPs1lW/lib/python3.7/site-packages)]

🐉 Install A Package

>>> from requirementslib.models.requirements import Requirement
>>> r = Requirement.from_line("requests")
>>> venv.install(r, editable=False)

🐉 Uninstall a Package

>>> pkg = "pytz"
>>> with venv.uninstall(pkg, auto_confirm=True) as uninstall:
        if uninstall.paths:
            cleaned = pkg
>>> print("Removed package: %s" % cleaned)

🐉 Display Information about Python

>>> venv.python
'/home/user/.virtualenvs/pipenv-MfOPs1lW/bin/python'
>>> venv.python_version
'3.7'

🐉 Run Commands Inside the Virtualenv

>>> cmd = venv.run("env")
>>> [line for line in cmd.out.splitlines() if line.startswith("VIRTUAL_ENV")]
['VIRTUAL_ENV=/user/hawk/.virtualenvs/pipenv-MfOPs1lW']
>>> cmd = venv.run_py(["import os; print(os.environ.get('VIRTUAL_ENV'))"])
Deactivating virtualenv...
>>> cmd.out
'/home/user/.virtualenvs/pipenv-MfOPs1lW\n'
>>> with venv.activated():
        print(os.environ["VIRTUAL_ENV"])
/home/hawk/.virtualenvs/pipenv-MfOPs1lW

Read the documentation.

Metadata

Release files for mork 0.1.4

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

Source distribution (sdist)

Source distribution for mork 0.1.4
File Size Uploaded Provenance Actions
mork-0.1.4.tar.gz 14.8 kB Without provenance Details for mork-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mork 0.1.4
File Interpreter ABI Platform Actions
mork-0.1.4-py2.py3-none-any.whl Python 3, Python 2 none any Details for mork-0.1.4-py2.py3-none-any.whl

Total release size: 23.2 kB

Release files / mork-0.1.4.tar.gz

Download URL mork-0.1.4.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b1b41bc31603eef1b50e42e75ae2d74d7a0d9ab46ea4d0dd1ba387a451870873
BLAKE2b-256 checksum
How to use checksums
c5840dfcdf0b9a265cb1dd2f331d03aa3e2208fcc84ebefa91fc4843ad2c1146
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

Release files / mork-0.1.4-py2.py3-none-any.whl

Download URL mork-0.1.4-py2.py3-none-any.whl
Size 8.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
13772edb4724915cf0cfa30d31426e0565487a3b2d7883b8468718eaed8ecfc2
BLAKE2b-256 checksum
How to use checksums
68ccbb165d54a71797d5e0d90fa192c6e7b65d21f368ffbd57902fc0ba1c625b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

Security for mork 0.1.4

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.

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