Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
You can use this tool to compare 2 versions in order to know if is greater, lesser or equal to the other.
pip install version-comparison
get_lesser()
function return the lesser version of the provided, if none is lesser, the result is a None
value.
get_greater()
function return the greater version of the provided, if none is greater, the result is a None
value.
compare()
function return which one is greater, lesser or equal to the other.
from versions_comparison import Comparison
versions = Comparison(version_1, version_2)
versions.get_lesser()
versions.get_greater()
versions.compare()
dot numbers
: You can use numbers like 1.5
, 0.1.9
, 8.6.3
chars
: You can validate a version with chars. b > a
or d < z
There are a coulpe of exceptions that could be used to catch possible errors throwed by the library.
FormatVersion
: This exception is thrown when the version provided does not have a valid format.StringFormat
: This exception is thrown when the version provided is not a valid string type.from versions_comparison.exceptions import FormatVersion, StringFormat
FAQs
Get a comparison between 2 version strings
We found that version-comparison demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.