Detailed display of the difference between two given python virtual environments.
Project description
:snake: pyenvcomp
The python virtual environment comparator tool. Compare two python virtualenvs and find out the differences.
Installation
pip install pyenvcomp
Usage
compare path1 path2 [--display [all|diff|separate]]
path1 - path to one virtual environment.
path2 - path to another virtual environment.
List of display types available:
all
- displays all the differences, similarities and extra modules in each virtual environments. This is the default display option.diff
- displays just the list of modules which are present in both the virtual environments but have different versions.separate
- displays two different tables of extra modules in each virtual environments.
usage: compare [-h] [-d DISPLAY] env path1 env path2
positional arguments:
env path1 location of the first virtual environment
env path2 location of the second virtual environment
optional arguments:
-h, --help show this help message and exit
-d DISPLAY, --display DISPLAY
Compare envs based on either of these available options [all|diff|separate]
:man_technologist: Example
Input:
compare /home/koustav/Documents/test_env_1 /home/koustav/Documents/test_env_2 --display all
where, test_env_1
and test_env_2
are two python virtual environments.
Output:
SAME MODULE VERSIONS
╔═════════════════╤═══════════════════════╤═══════════════════════╗
║ Module │ test_env_1(python3.8) │ test_env_2(python3.8) ║
╠═════════════════╪═══════════════════════╪═══════════════════════╣
║ appdirs │ 1.4.3 │ 1.4.3 ║
║ CacheControl │ 0.12.6 │ 0.12.6 ║
║ certifi │ 2019.11.28 │ 2019.11.28 ║
║ chardet │ 3.0.4 │ 3.0.4 ║
║ colorama │ 0.4.3 │ 0.4.3 ║
║ contextlib2 │ 0.6.0 │ 0.6.0 ║
║ distlib │ 0.3.0 │ 0.3.0 ║
║ distro │ 1.4.0 │ 1.4.0 ║
║ html5lib │ 1.0.1 │ 1.0.1 ║
║ idna │ 2.8 │ 2.8 ║
║ ipaddr │ 2.2.0 │ 2.2.0 ║
║ lockfile │ 0.12.2 │ 0.12.2 ║
║ msgpack │ 0.6.2 │ 0.6.2 ║
║ packaging │ 20.3 │ 20.3 ║
║ pep517 │ 0.8.2 │ 0.8.2 ║
║ pip │ 20.0.2 │ 20.0.2 ║
║ pkg_resources │ 0.0.0 │ 0.0.0 ║
║ progress │ 1.5 │ 1.5 ║
║ pyparsing │ 2.4.6 │ 2.4.6 ║
║ python_dateutil │ 2.8.1 │ 2.8.1 ║
║ pytoml │ 0.1.21 │ 0.1.21 ║
║ pytz │ 2020.1 │ 2020.1 ║
║ requests │ 2.22.0 │ 2.22.0 ║
║ retrying │ 1.3.3 │ 1.3.3 ║
║ setuptools │ 44.0.0 │ 44.0.0 ║
║ six │ 1.14.0 │ 1.14.0 ║
║ urllib3 │ 1.25.8 │ 1.25.8 ║
║ webencodings │ 0.5.1 │ 0.5.1 ║
║ wheel │ 0.34.2 │ 0.34.2 ║
╚═════════════════╧═══════════════════════╧═══════════════════════╝
DIFFERENT MODULE VERSIONS
╔════════╤═══════════════════════╤═══════════════════════╗
║ Module │ test_env_1(python3.8) │ test_env_2(python3.8) ║
╠════════╪═══════════════════════╪═══════════════════════╣
║ numpy │ 1.19.2 │ 1.19.1 ║
║ pandas │ 1.1.2 │ 1.1.3 ║
╚════════╧═══════════════════════╧═══════════════════════╝
ONLY IN test_env_1 (python3.8)
╔═══════════════════════╤═════════╗
║ test_env_1(python3.8) │ version ║
╠═══════════════════════╪═════════╣
║ wrapt │ 1.12.1 ║
║ pikepdf │ 1.19.3 ║
║ lazy_object_proxy │ 1.4.3 ║
║ pylint │ 2.6.0 ║
║ toml │ 0.10.1 ║
║ Pillow │ 7.2.0 ║
║ lxml │ 4.5.2 ║
║ astroid │ 2.4.2 ║
║ isort │ 5.6.4 ║
║ mccabe │ 0.6.1 ║
╚═══════════════════════╧═════════╝
ONLY IN test_env_2 (python3.8)
╔═══════════════════════╤═════════╗
║ test_env_2(python3.8) │ version ║
╠═══════════════════════╪═════════╣
║ Werkzeug │ 1.0.1 ║
║ MarkupSafe │ 1.1.1 ║
║ tornado │ 6.0.4 ║
║ itsdangerous │ 1.1.0 ║
║ click │ 7.1.2 ║
║ Flask │ 1.1.2 ║
║ Jinja2 │ 2.11.2 ║
╚═══════════════════════╧═════════╝
Visuals in the terminal would look slightly different than the above output visual.
Future versions
In the upcoming versions following features will be added:
- Compare directly from
requirements.txt
file - Warning messages will be provided if any deprecated version of any module is being used.
Inspired by problems faced while doing R&D at my workplace! :nerd_face:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyenvcomp-1.0.1.tar.gz
.
File metadata
- Download URL: pyenvcomp-1.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fd46fdf754200b975f92da083175e62fe6ac54cbb4fe1e575d040b0406ad616 |
|
MD5 | 55cae39333f4bea701b3992597c192bf |
|
BLAKE2b-256 | 7730323730be6a1a4cefa9e76c3a79b3763ea7dc4fc0b359f9b74c5c1cc27bfa |
File details
Details for the file pyenvcomp-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: pyenvcomp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70ee826ad05d8ebcb1638dc8cfdf4310325d508e46ee7ce5efa5ddaf78054644 |
|
MD5 | 95b12240a439bd7ab7c613c86a84196d |
|
BLAKE2b-256 | e7c77a760bee7a4e88cac64062c09f73613ec4e980c4ddc487e313025ed10856 |