Skip to main content

Check for a newer version of your package and notify the user about it

Project description

Logo Vermon

PyPI - Status PyPI GitHub release (latest by date) License MIT

Index

About

Vermon monitors the version of the package specified on the pypi platform, compares the version of the package installed in your environment with the latest published version and, if less, shows a warning with instructions for updating in the terminal.

For example: suppose you created a package called foo and published version 1.0.0 in pypi. Some users are already using the foo package as a dependency on their projects. You found a bug and released a patch with the fix, now the latest version of foo is 1.0.1. All users using version 1.0.0 (less than the last release) of the package will receive a warning on the terminal similar to this one whenever they run the project:

> python your_project.py
You are using an old version of the foo package (v1.0.0)
a new version has been released (v1.0.1).
Please run: python -m pip install foo --upgrade

Now users know they have a dependency that needs to be updated ;)

Install

Use pipenv to install fordev in your environment. It will create a virtual environment and separate all dependencies and subdependencies from your global environment.

Install with pipenv

Create a directory and enter it:

$ mkdir my_project && cd my_project

Install with pipenv using:

$ pipenv install vermon

Now activate the virtual environment:

$ pipenv shell

Install with pip and virtualenv

Alternatively, if you don't want to use pipenv, use pip + virtualenv to do the same thing.

Create a directory and enter it:

$ mkdir my_project && cd my_project

Create and activate the virtual environment:

$ virtualenv venv && source venv/Scripts/activate

Note: In linux environment, use source venv/bin/activate to activate the virtual environment.

Now install with pip:

$ pip install vermon

Done, now you can start the job ;)

Use

To use the vermon package, call Vermon.run method in your package's __init__.py file:

from vermon import Vermon

Vermon.run(
    package='YOUR_PACKAGE',
    current_version=your_package.__version__
)

Done 🎉

Contributions

All contributions are welcome!

Found a problem, want to give a tip? open an issue

Do you have a solution to the problem? Send me a PR

Did you like this project? Click on the star ⭐

License

This project is using the MIT license, see in MIT LICENSE.

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

vermon-0.1.0.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

vermon-0.1.0-py3-none-any.whl (6.5 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