checkversions


Namecheckversions JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/muhammad-fiaz/checkversions.git
SummaryCheckVersions is a powerful and intuitive version comparison tool for software development.
upload_time2023-12-08 16:48:46
maintainer
docs_urlNone
authorMuhammad Fiaz
requires_python>=3.8
licenseMIT License
keywords version comparison software development semantic versioning version control software versioning release management
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# CheckVersions

[![Run Tests](https://github.com/muhammad-fiaz/checkversions/actions/workflows/python-package.yml/badge.svg)](https://github.com/muhammad-fiaz/checkversions/actions/workflows/python-package.yml)
[![PyPI Version](https://img.shields.io/pypi/v/checkversions)](https://pypi.org/project/checkversions/)
[![Python Versions](https://img.shields.io/pypi/pyversions/checkversions)](https://pypi.org/project/checkversions/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Downloads](https://img.shields.io/pypi/dm/checkversions)](https://pypi.org/project/checkversions/)
[![Last Commit](https://img.shields.io/github/last-commit/muhammad-fiaz/checkversions)](https://github.com/muhammad-fiaz/checkversions)
[![GitHub Issues](https://img.shields.io/github/issues/muhammad-fiaz/checkversions)](https://github.com/muhammad-fiaz/checkversions/issues)
[![GitHub Stars](https://img.shields.io/github/stars/muhammad-fiaz/checkversions)](https://github.com/muhammad-fiaz/checkversions/stargazers)
[![GitHub Forks](https://img.shields.io/github/forks/muhammad-fiaz/checkversions)](https://github.com/muhammad-fiaz/checkversions/network)

[![Maintainer](https://img.shields.io/badge/Maintainer-muhammad--fiaz-blue)](https://github.com/muhammad-fiaz)
[![Sponsor on GitHub](https://img.shields.io/badge/Sponsor%20on%20GitHub-Become%20a%20Sponsor-blue)](https://github.com/sponsors/muhammad-fiaz)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Stability](https://img.shields.io/badge/Stability-Stable-green)](https://github.com/muhammad-fiaz/checkversions)

</div>


CheckVersions is a powerful and intuitive version comparison tool designed to simplify the process of discerning the latest and older versions in software development.

## Features

- **Semantic Version Analysis:** 🧐 Leverage our sophisticated semantic versioning analysis engine to compare versions like "0.0.0-beta" effortlessly.

- **Automated Version Ranking:** πŸš€ CheckVersions automatically ranks versions based on their priority, allowing you to quickly identify the latest version.

- **Efficient Version Delta Assessment:** πŸ“Š CheckVersions provides a simple and efficient way to assess the difference between two versions.

- **User-Friendly Interface:** 🎨 Our intuitive user interface ensures that developers can effortlessly compare versions.

- **Secure Version Analysis:** πŸ”’ Security is paramount. CheckVersions ensures version comparison is performed securely, protecting your intellectual property and facilitating risk-free decision-making in your development process.

- **Custom Hierarchy** πŸ“ Customize the hierarchy of version words to suit your needs. For instance, you can assign a higher priority to "beta" than "alpha" if you wish.

- **Older Version Retrieval:** ⏳ Optionally retrieve the older version when comparing two versions by setting the `older_version` parameter to `True`.

## Getting Started

## Installation

```bash
pip install checkversions
```
## Usage
```python3
from checkversions import *

# Example 1: Basic Version Comparison
current_version = "v1.0.0"
latest_version = "v1.0.0-beta"
result = compare_versions(current_version, latest_version)
print(result)
# Output: v1.0.0
```
In this example, we demonstrate a basic version comparison. The compare_versions function is used to compare the current_version (v1.0.0) with the latest_version (v1.0.0-beta). The result is printed, and it shows that the latest version is v1.0.0.

```python3
from checkversions import *

# Example 2: Comparing Versions with Hyphens and Words
version1 = "2.0.0-beta"
version2 = "2.0.1-alpha"
result = compare_versions(version1, version2)
print(result)
# Output: 2.0.1-alpha

```
In this example, we showcase version comparison with hyphens and additional words. The compare_versions function compares version1 (2.0.0-beta) with version2 (2.0.1-alpha). The result is printed, indicating that the latest version is 2.0.1-alpha.

## Default Hierarchy
```json
{
  "beta": 0,
  "prerelease": 1,
  "alpha": 2,
  "unstable": 3,
  "stable": 4,
  "release": 5
}

```
The default hierarchy is a JSON representation that assigns priority values to version words. For instance, "beta" has a priority of 0, "prerelease" has a priority of 1, and so on.

## Custom Hierarchy

```python3
from checkversions import *

# Example 3: Custom Hierarchy
# Define a custom hierarchy
custom_hierarchy = {"beta": 0, "alpha": 1, "rc": 2, "gamma": 3, "stable": 4}

version1 = "v1.0.0-beta"
version2 = "v1.0.1-alpha"
result = compare_versions(version1, version2, custom_hierarchy)
print(result)
# Output: v1.0.1-alpha

```
In this example, we introduce a custom hierarchy for version comparison. The custom_hierarchy dictionary is defined with version words and their corresponding priority. The compare_versions function uses this custom hierarchy to compare version1 (v1.0.0-beta) with version2 (v1.0.1-alpha). The result is printed, indicating that the latest version is v1.0.1-alpha.

## Older Version

```python3
from checkversions import *
current_version = "v1.0.0"
latest_version = "v1.0.0-beta"
# Example with older_version=True
result_older = compare_versions(current_version, latest_version, older_version=True)
print(f"Older version: {result_older}")
# Output: Older version: v1.0.0-beta
```
In this example, by setting older_version=True, the function returns and prints the older version (v1.0.0-beta) based on the provided versions (v1.0.0 and v1.0.0-beta). If older_version is omitted or set to False, it would return and print the latest version.

## Contributing
Contributions are welcome! Before contributing, please read our [Contributing Guidelines](CONTRIBUTING.md) to ensure a smooth and collaborative development process.

## Code of Conduct

Please review our [Code of Conduct](CODE_OF_CONDUCT.md) to understand the standards of behavior we expect from contributors and users of this project.

## License
This project is licensed under the [MIT License](). See [LICENSE](LICENSE) for more details.

## Support the Project
<br>
<div align="center">

<h5> <strong> πŸ’° You can help me improve more by offering a little support on any platform❀️</strong></h5>

[![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/muhammadfiaz) [![Patreon](https://img.shields.io/badge/Patreon-F96854?style=for-the-badge&logo=patreon&logoColor=white)](https://patreon.com/muhammadfiaz) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/muhammadfiaz)
[![Sponsor muhammad-fiaz](https://img.shields.io/badge/Sponsor-%231EAEDB.svg?&style=for-the-badge&logo=GitHub-Sponsors&logoColor=white)](https://github.com/sponsors/muhammad-fiaz)
[![Open Collective Backer](https://img.shields.io/badge/Open%20Collective-Backer-%238CC84B?style=for-the-badge&logo=open-collective&logoColor=white)](https://opencollective.com/muhammadfiaz)
</div>



## Happy Coding ❀️



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/muhammad-fiaz/checkversions.git",
    "name": "checkversions",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "version comparison,software development,semantic versioning,version control,software versioning,release management",
    "author": "Muhammad Fiaz",
    "author_email": "contact@muhammmadfiaz.com",
    "download_url": "https://files.pythonhosted.org/packages/8c/f3/7042f5820c28c2aa72fd769030cbfadd446e888cf040f105d7f789080f05/checkversions-0.0.5.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n# CheckVersions\n\n[![Run Tests](https://github.com/muhammad-fiaz/checkversions/actions/workflows/python-package.yml/badge.svg)](https://github.com/muhammad-fiaz/checkversions/actions/workflows/python-package.yml)\n[![PyPI Version](https://img.shields.io/pypi/v/checkversions)](https://pypi.org/project/checkversions/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/checkversions)](https://pypi.org/project/checkversions/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Downloads](https://img.shields.io/pypi/dm/checkversions)](https://pypi.org/project/checkversions/)\n[![Last Commit](https://img.shields.io/github/last-commit/muhammad-fiaz/checkversions)](https://github.com/muhammad-fiaz/checkversions)\n[![GitHub Issues](https://img.shields.io/github/issues/muhammad-fiaz/checkversions)](https://github.com/muhammad-fiaz/checkversions/issues)\n[![GitHub Stars](https://img.shields.io/github/stars/muhammad-fiaz/checkversions)](https://github.com/muhammad-fiaz/checkversions/stargazers)\n[![GitHub Forks](https://img.shields.io/github/forks/muhammad-fiaz/checkversions)](https://github.com/muhammad-fiaz/checkversions/network)\n\n[![Maintainer](https://img.shields.io/badge/Maintainer-muhammad--fiaz-blue)](https://github.com/muhammad-fiaz)\n[![Sponsor on GitHub](https://img.shields.io/badge/Sponsor%20on%20GitHub-Become%20a%20Sponsor-blue)](https://github.com/sponsors/muhammad-fiaz)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Stability](https://img.shields.io/badge/Stability-Stable-green)](https://github.com/muhammad-fiaz/checkversions)\n\n</div>\n\n\nCheckVersions is a powerful and intuitive version comparison tool designed to simplify the process of discerning the latest and older versions in software development.\n\n## Features\n\n- **Semantic Version Analysis:** \ud83e\uddd0 Leverage our sophisticated semantic versioning analysis engine to compare versions like \"0.0.0-beta\" effortlessly.\n\n- **Automated Version Ranking:** \ud83d\ude80 CheckVersions automatically ranks versions based on their priority, allowing you to quickly identify the latest version.\n\n- **Efficient Version Delta Assessment:** \ud83d\udcca CheckVersions provides a simple and efficient way to assess the difference between two versions.\n\n- **User-Friendly Interface:** \ud83c\udfa8 Our intuitive user interface ensures that developers can effortlessly compare versions.\n\n- **Secure Version Analysis:** \ud83d\udd12 Security is paramount. CheckVersions ensures version comparison is performed securely, protecting your intellectual property and facilitating risk-free decision-making in your development process.\n\n- **Custom Hierarchy** \ud83d\udcdd Customize the hierarchy of version words to suit your needs. For instance, you can assign a higher priority to \"beta\" than \"alpha\" if you wish.\n\n- **Older Version Retrieval:** \u23f3 Optionally retrieve the older version when comparing two versions by setting the `older_version` parameter to `True`.\n\n## Getting Started\n\n## Installation\n\n```bash\npip install checkversions\n```\n## Usage\n```python3\nfrom checkversions import *\n\n# Example 1: Basic Version Comparison\ncurrent_version = \"v1.0.0\"\nlatest_version = \"v1.0.0-beta\"\nresult = compare_versions(current_version, latest_version)\nprint(result)\n# Output: v1.0.0\n```\nIn this example, we demonstrate a basic version comparison. The compare_versions function is used to compare the current_version (v1.0.0) with the latest_version (v1.0.0-beta). The result is printed, and it shows that the latest version is v1.0.0.\n\n```python3\nfrom checkversions import *\n\n# Example 2: Comparing Versions with Hyphens and Words\nversion1 = \"2.0.0-beta\"\nversion2 = \"2.0.1-alpha\"\nresult = compare_versions(version1, version2)\nprint(result)\n# Output: 2.0.1-alpha\n\n```\nIn this example, we showcase version comparison with hyphens and additional words. The compare_versions function compares version1 (2.0.0-beta) with version2 (2.0.1-alpha). The result is printed, indicating that the latest version is 2.0.1-alpha.\n\n## Default Hierarchy\n```json\n{\n  \"beta\": 0,\n  \"prerelease\": 1,\n  \"alpha\": 2,\n  \"unstable\": 3,\n  \"stable\": 4,\n  \"release\": 5\n}\n\n```\nThe default hierarchy is a JSON representation that assigns priority values to version words. For instance, \"beta\" has a priority of 0, \"prerelease\" has a priority of 1, and so on.\n\n## Custom Hierarchy\n\n```python3\nfrom checkversions import *\n\n# Example 3: Custom Hierarchy\n# Define a custom hierarchy\ncustom_hierarchy = {\"beta\": 0, \"alpha\": 1, \"rc\": 2, \"gamma\": 3, \"stable\": 4}\n\nversion1 = \"v1.0.0-beta\"\nversion2 = \"v1.0.1-alpha\"\nresult = compare_versions(version1, version2, custom_hierarchy)\nprint(result)\n# Output: v1.0.1-alpha\n\n```\nIn this example, we introduce a custom hierarchy for version comparison. The custom_hierarchy dictionary is defined with version words and their corresponding priority. The compare_versions function uses this custom hierarchy to compare version1 (v1.0.0-beta) with version2 (v1.0.1-alpha). The result is printed, indicating that the latest version is v1.0.1-alpha.\n\n## Older Version\n\n```python3\nfrom checkversions import *\ncurrent_version = \"v1.0.0\"\nlatest_version = \"v1.0.0-beta\"\n# Example with older_version=True\nresult_older = compare_versions(current_version, latest_version, older_version=True)\nprint(f\"Older version: {result_older}\")\n# Output: Older version: v1.0.0-beta\n```\nIn this example, by setting older_version=True, the function returns and prints the older version (v1.0.0-beta) based on the provided versions (v1.0.0 and v1.0.0-beta). If older_version is omitted or set to False, it would return and print the latest version.\n\n## Contributing\nContributions are welcome! Before contributing, please read our [Contributing Guidelines](CONTRIBUTING.md) to ensure a smooth and collaborative development process.\n\n## Code of Conduct\n\nPlease review our [Code of Conduct](CODE_OF_CONDUCT.md) to understand the standards of behavior we expect from contributors and users of this project.\n\n## License\nThis project is licensed under the [MIT License](). See [LICENSE](LICENSE) for more details.\n\n## Support the Project\n<br>\n<div align=\"center\">\n\n<h5> <strong> \ud83d\udcb0 You can help me improve more by offering a little support on any platform\u2764\ufe0f</strong></h5>\n\n[![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/muhammadfiaz) [![Patreon](https://img.shields.io/badge/Patreon-F96854?style=for-the-badge&logo=patreon&logoColor=white)](https://patreon.com/muhammadfiaz) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/muhammadfiaz)\n[![Sponsor muhammad-fiaz](https://img.shields.io/badge/Sponsor-%231EAEDB.svg?&style=for-the-badge&logo=GitHub-Sponsors&logoColor=white)](https://github.com/sponsors/muhammad-fiaz)\n[![Open Collective Backer](https://img.shields.io/badge/Open%20Collective-Backer-%238CC84B?style=for-the-badge&logo=open-collective&logoColor=white)](https://opencollective.com/muhammadfiaz)\n</div>\n\n\n\n## Happy Coding \u2764\ufe0f\n\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "CheckVersions is a powerful and intuitive version comparison tool for software development.",
    "version": "0.0.5",
    "project_urls": {
        "Bug Tracker": "https://github.com/muhammad-fiaz/checkversions/issues",
        "Documentation": "https://github.com/muhammad-fiaz/checkversions#readme",
        "Homepage": "https://github.com/muhammad-fiaz/checkversions.git",
        "Source Code": "https://github.com/muhammad-fiaz/checkversions.git"
    },
    "split_keywords": [
        "version comparison",
        "software development",
        "semantic versioning",
        "version control",
        "software versioning",
        "release management"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8cf37042f5820c28c2aa72fd769030cbfadd446e888cf040f105d7f789080f05",
                "md5": "bfc999402209bc8b094ba25d564355b8",
                "sha256": "e09323bf09c043bf8f765032a277295a5f7ccfd561767c77cffa117b646b9995"
            },
            "downloads": -1,
            "filename": "checkversions-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "bfc999402209bc8b094ba25d564355b8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8085,
            "upload_time": "2023-12-08T16:48:46",
            "upload_time_iso_8601": "2023-12-08T16:48:46.105263Z",
            "url": "https://files.pythonhosted.org/packages/8c/f3/7042f5820c28c2aa72fd769030cbfadd446e888cf040f105d7f789080f05/checkversions-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-08 16:48:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "muhammad-fiaz",
    "github_project": "checkversions",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "checkversions"
}
        
Elapsed time: 0.19938s