versions.py 0.1.0
Parsing, inspecting and specifying versions.
License: MIT
Requires Python: >=3.7
Keywords: python,version,versions

# versions.py

[![License][License Badge]][License]
[![Version][Version Badge]][Package]
[![Downloads][Downloads Badge]][Package]
[![Discord][Discord Badge]][Discord]
<!--
[![Documentation][Documentation Badge]][Documentation]
-->
[![Check][Check Badge]][Actions]
<!--
[![Test][Test Badge]][Actions]
[![Coverage][Coverage Badge]][Coverage]
-->

**Parsing, inspecting and specifying versions.**

## Table of Contents

- [Installing](#installing)
  - [pip](#pip)
  - [poetry](#poetry)
- [Examples](#examples)
  - [Versions](#versions)
  - [Segments](#segments)
<!--
- [Documentation](#documenation)
-->
- [Changelog](#changelog)
- [Support](#support)
- [Contributing](#contributing)
- [License](#license)

## Installing

**Python 3.7 or above is required.**

### pip

Installing with `pip` is quite simple:

```console
$ pip install versions.py
```

Alternatively, the library can be installed from source:

```console
$ git clone https://github.com/nekitdev/versions.py.git
$ cd versions.py
$ python -m pip install .
```

### poetry

Adding `versions.py` to dependencies:

```console
$ poetry add versions.py
```

Or directly specifying it in the configuration:

```toml
[tool.poetry.dependencies."versions.py"]
version = "^0.1.0"
```

Alternatively, the latest version can be included, installing from source:

```toml
[tool.poetry.dependencies."versions.py"]
git = "https://github.com/nekitdev/versions.py.git"
```

## Examples

### Versions

```python
from versions import parse_version

version = parse_version("1.0.0-dev.1+build.1")

print(version)  # 1.0.0-dev.1+build.1
```

### Segments

```python
print(version.release)  # 1.0.0
print(version.dev)      # dev.1
print(version.local)    # build.1
```

<!--
## Documentation
Documentation is located [here][Documentation].
-->

## Support

Please send an [email][Email] or refer to the official [Discord server][Discord] for support.

## Changelog

Changelog can be found [here][Changelog].

## Contributing

If you are interested in contributing to `versions.py`, make sure to take a look at the
[Contributing Guide][Contributing Guide], as well as the [Code of Conduct][Code of Conduct].

## License

`versions.py` is licensed under the MIT License terms. See [License][License] for details.

[Email]: mailto:support@nekit.dev

[Discord]: https://nekit.dev/discord

[Actions]: https://github.com/nekitdev/versions.py/actions

[Changelog]: https://github.com/nekitdev/versions.py/blob/main/CHANGELOG.md
[Code of Conduct]: https://github.com/nekitdev/versions.py/blob/main/CODE_OF_CONDUCT.md
[Contributing Guide]: https://github.com/nekitdev/versions.py/blob/main/CONTRIBUTING.md
[Security]: https://github.com/nekitdev/versions.py/blob/main/SECURITY.md

[License]: https://github.com/nekitdev/versions.py/blob/main/LICENSE

[Package]: https://pypi.org/project/versions.py
[Coverage]: https://codecov.io/gh/nekitdev/versions.py
[Documentation]: https://versions-py.readthedocs.io/

[Discord Badge]: https://img.shields.io/badge/chat-discord-5865f2
[License Badge]: https://img.shields.io/pypi/l/versions.py
[Version Badge]: https://img.shields.io/pypi/v/versions.py
[Downloads Badge]: https://img.shields.io/pypi/dm/versions.py

[Documentation Badge]: https://readthedocs.org/projects/versions-py/badge

[Check Badge]: https://github.com/nekitdev/versions.py/workflows/check/badge.svg
[Test Badge]: https://github.com/nekitdev/versions.py/workflows/test/badge.svg
[Coverage Badge]: https://codecov.io/gh/nekitdev/versions.py/branch/main/graph/badge.svg