awesomeversion


Nameawesomeversion JSON
Version 21.5.0 PyPI version JSON
download
home_pagehttps://github.com/ludeeus/awesomeversion
SummaryOne version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them.
upload_time2021-05-07 14:43:44
maintainer
docs_urlNone
authorLudeeus
requires_python
licenseMIT license
keywords calver semver 0ver version buildver
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AwesomeVersion

[![codecov](https://codecov.io/gh/ludeeus/awesomeversion/branch/main/graph/badge.svg)](https://codecov.io/gh/ludeeus/awesomeversion)
![python version](https://img.shields.io/badge/Python-3.6=><=3.9-blue.svg)
![dependencies](https://img.shields.io/badge/Dependencies-0-blue.svg)
[![PyPI](https://img.shields.io/pypi/v/awesomeversion)](https://pypi.org/project/awesomeversion)
![Actions](https://github.com/ludeeus/awesomeversion/workflows/Actions/badge.svg?branch=main)

_One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them._

Make anything a version object, and compare against a vast section of other version formats.

## Installation

```bash
python3 -m pip install awesomeversion
```

## Example usage

These are some examples of what you can do, more examples can be found in the `tests` directory.

```python
from awesomeversion import AwesomeVersion

current = AwesomeVersion("1.2.2")
upstream = AwesomeVersion("1.2.3")

print(upstream > current)
> True
```

```python
from awesomeversion import AwesomeVersion

version = AwesomeVersion("1.2.3b0")

print(version.beta)
> True
```

```python
from awesomeversion import AwesomeVersion

current = AwesomeVersion("2021.1.0")
upstream = AwesomeVersion("2021.1.0b2")

print(upstream > current)
> False
```

```python
from awesomeversion import AwesomeVersion

current = AwesomeVersion("latest")
upstream = AwesomeVersion("2021.1.0")

print(upstream > current)
> False
```

```python
from awesomeversion import AwesomeVersion

current = AwesomeVersion("latest")
upstream = AwesomeVersion("dev")

print(upstream > current)
> True
```

```python
from awesomeversion import AwesomeVersion

with AwesomeVersion("20.12.0") as current:
    with AwesomeVersion("20.12.1") as upstream:
        print(upstream > current)
> True
```

```python
from awesomeversion import AwesomeVersion

with AwesomeVersion("20.12.0") as current:
    print("2020.12.1" > current)
> True
```

## Contribute

**All** contributions are welcome!

1. Fork the repository
2. Clone the repository locally and open the devcontainer or use GitHub codespaces
3. Do your changes
4. Lint the files with `make black`
5. Ensure all tests passes with `make test`
6. Ensure 100% coverage with `make coverage`
7. Commit your work, and push it to GitHub
8. Create a PR against the `main` branch



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ludeeus/awesomeversion",
    "name": "awesomeversion",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "calver,semver,0ver,version,buildver",
    "author": "Ludeeus",
    "author_email": "hi@ludeeus.dev",
    "download_url": "https://files.pythonhosted.org/packages/14/ad/9464418e0d26518f5d030ae6a7292998a429cd51474fb5f0aa7faf282478/awesomeversion-21.5.0.tar.gz",
    "platform": "",
    "description": "# AwesomeVersion\n\n[![codecov](https://codecov.io/gh/ludeeus/awesomeversion/branch/main/graph/badge.svg)](https://codecov.io/gh/ludeeus/awesomeversion)\n![python version](https://img.shields.io/badge/Python-3.6=><=3.9-blue.svg)\n![dependencies](https://img.shields.io/badge/Dependencies-0-blue.svg)\n[![PyPI](https://img.shields.io/pypi/v/awesomeversion)](https://pypi.org/project/awesomeversion)\n![Actions](https://github.com/ludeeus/awesomeversion/workflows/Actions/badge.svg?branch=main)\n\n_One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them._\n\nMake anything a version object, and compare against a vast section of other version formats.\n\n## Installation\n\n```bash\npython3 -m pip install awesomeversion\n```\n\n## Example usage\n\nThese are some examples of what you can do, more examples can be found in the `tests` directory.\n\n```python\nfrom awesomeversion import AwesomeVersion\n\ncurrent = AwesomeVersion(\"1.2.2\")\nupstream = AwesomeVersion(\"1.2.3\")\n\nprint(upstream > current)\n> True\n```\n\n```python\nfrom awesomeversion import AwesomeVersion\n\nversion = AwesomeVersion(\"1.2.3b0\")\n\nprint(version.beta)\n> True\n```\n\n```python\nfrom awesomeversion import AwesomeVersion\n\ncurrent = AwesomeVersion(\"2021.1.0\")\nupstream = AwesomeVersion(\"2021.1.0b2\")\n\nprint(upstream > current)\n> False\n```\n\n```python\nfrom awesomeversion import AwesomeVersion\n\ncurrent = AwesomeVersion(\"latest\")\nupstream = AwesomeVersion(\"2021.1.0\")\n\nprint(upstream > current)\n> False\n```\n\n```python\nfrom awesomeversion import AwesomeVersion\n\ncurrent = AwesomeVersion(\"latest\")\nupstream = AwesomeVersion(\"dev\")\n\nprint(upstream > current)\n> True\n```\n\n```python\nfrom awesomeversion import AwesomeVersion\n\nwith AwesomeVersion(\"20.12.0\") as current:\n    with AwesomeVersion(\"20.12.1\") as upstream:\n        print(upstream > current)\n> True\n```\n\n```python\nfrom awesomeversion import AwesomeVersion\n\nwith AwesomeVersion(\"20.12.0\") as current:\n    print(\"2020.12.1\" > current)\n> True\n```\n\n## Contribute\n\n**All** contributions are welcome!\n\n1. Fork the repository\n2. Clone the repository locally and open the devcontainer or use GitHub codespaces\n3. Do your changes\n4. Lint the files with `make black`\n5. Ensure all tests passes with `make test`\n6. Ensure 100% coverage with `make coverage`\n7. Commit your work, and push it to GitHub\n8. Create a PR against the `main` branch\n\n\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them.",
    "version": "21.5.0",
    "split_keywords": [
        "calver",
        "semver",
        "0ver",
        "version",
        "buildver"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "ed54ab7a84c1608f6f6a51ac52abf761",
                "sha256": "00efebb1ed644281f4c43aaf554eca503aac6403783d7eea93332d46719ad32a"
            },
            "downloads": -1,
            "filename": "awesomeversion-21.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ed54ab7a84c1608f6f6a51ac52abf761",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11074,
            "upload_time": "2021-05-07T14:43:41",
            "upload_time_iso_8601": "2021-05-07T14:43:41.778995Z",
            "url": "https://files.pythonhosted.org/packages/fc/64/688e6bc804115a5bf896af2bdb5f858b5d0e661cd4f82cc5b7f866f5b9f1/awesomeversion-21.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "41474935e481d8a258098bbbe9a813ba",
                "sha256": "7e4a0f4b7f44a780f0a715094b5ee4768a760880105936ad316caecf0b78d263"
            },
            "downloads": -1,
            "filename": "awesomeversion-21.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "41474935e481d8a258098bbbe9a813ba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8471,
            "upload_time": "2021-05-07T14:43:44",
            "upload_time_iso_8601": "2021-05-07T14:43:44.051165Z",
            "url": "https://files.pythonhosted.org/packages/14/ad/9464418e0d26518f5d030ae6a7292998a429cd51474fb5f0aa7faf282478/awesomeversion-21.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-05-07 14:43:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "ludeeus",
    "error": "Could not fetch GitHub repository",
    "lcname": "awesomeversion"
}
        
Elapsed time: 0.27023s