Skip to main content

PyEnvDiff

https://img.shields.io/pypi/v/pyenvdiff.svg https://travis-ci.org/jnmclarty/pyenvdiff-lib.svg?branch=master Documentation Status

Python environment comparison tool. Maximized for compatibility between versions 2.6 to 3.7, pypy, operating systems, distributions, and forks! Virtualenv, pyenv, pyvenv, conda, system!

Command Usage

From the command line, to get information on the current environment:

python -m pyenvdiff.info

Serialize the information to a file…

python -m pyenvdiff.info my_environment.yaml

Switch to another environment (you’ll need pyenvdiff installed in both)

python -m pyenvdiff.compare my_environment.yaml

Or compare two from any environment

python -m pyenvdiff.compare my_environment.yaml my_other_environment.yaml

Programmatic Usage

>>> from pyenvdiff import Environment

>>> e = Environment()
>>> e.to_yaml('my_env.yaml')

>>> o = Environment.from_yaml('other_env.yaml')

>>> e == o
True

>>> print(e)
... # prints a dump of the environment details

>>> from pyenvdiff import EnvironmentDiff
>>> ed = EnvironmentDiff(e, o)
>>> print(ed)
... # prints a diff of the two environments

Web Usage

An alpha-level web-based comparison tool is available to browse and compare. PyEnvDiff ships with a default API Key, which is severly throttled. Some jerk is likely to abuse it, but until then, try it out.

Get a free personal API Key.

Install your own API key by setting a global environment variable “PYENVDIFF_API_KEY”, set to the api key.

From any two python interpreters, you can run:

python -m pyenvdiff.post --email your.email@someserver.com

or…

python -m pyenvdiff.post --domain your.website.com

…for more optional meta data fields:

python -m pyenvdiff.post -h

Which should output… something like the below, (once for each environment you run it).

Posting environment information to https://osa.pyenvdiff.com
Using API KEY: ...
Successful POST, use SHA XXXX for reference or comparison.

Then, use that SHA to fill in the link below:

https://pyenvdiff.com/view.html?sha=XXX

After you’ve collected another SHA from another environment…use the link format below, where XXXX and YYYY are two relevant SHAs.

https://pyenvdiff.com/compare.html?left=XXXX&right=YYYY

Sooo much room for activities!

  • Compare dev, test & prod!

  • Works on my machine, strange it doesn’t work on yours

  • Confirming deployments

  • Auditing user desktops, servers, research environments & ecosystems

  • Filing (or requesting) bug reports

Installation

There are no manditory, nor automatically installing, dependencies.

pip install pyenvdiff

OR just copy & paste pyenvdiff anywhere on PYTHONPATH

There is one optional dependency. The core functionality doesn’t use it. It’s only needed for more advanced HTML-based comparison.

pip install ghdiff

Under the hood

  • Zero dependency, pure-python, harmless pip install pyenvdiff or copy anywhere on PYTHONPATH.

  • As-needed import statements, to maximize compatibility across python flavours.

  • Favours compatible python-code over succinct or newer-style python-code

  • Free software: BSD license

  • Documentation: https://pyenvdiff.readthedocs.io.

Credits

This package was started with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2016-12-24)

  • First release on PyPI.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyenvdiff-0.1.0.zip (36.2 kB view details)

Uploaded Source

File details

Details for the file pyenvdiff-0.1.0.zip.

File metadata

  • Download URL: pyenvdiff-0.1.0.zip
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyenvdiff-0.1.0.zip
Algorithm Hash digest
SHA256 d1893363f7a3135acc88b06c021f5e3090d886681aa553c6714bfe001f42b461
MD5 20fcc82dea5920a417d33939dc286f38
BLAKE2b-256 7e08e1cb75c92c6066019a22d34da590ae68f1330189e955108fe847256623fb

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.0

1 file

0.2.0

1 file

This release

0.1.0 This release

1 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