Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/followtheprocess/madonna
Python semver parsing library.
https://github.com/followtheprocess/madonna
library python semver semver-parser
Last synced: 20 days ago
JSON representation
Python semver parsing library.
- Host: GitHub
- URL: https://github.com/followtheprocess/madonna
- Owner: FollowTheProcess
- License: mit
- Created: 2021-10-08T19:09:08.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-22T08:21:30.000Z (25 days ago)
- Last Synced: 2024-10-23T12:09:25.790Z (24 days ago)
- Topics: library, python, semver, semver-parser
- Language: Python
- Homepage: https://followtheprocess.github.io/madonna/
- Size: 1.66 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing/code_of_conduct.md
- License: LICENSE
Awesome Lists containing this project
README
# Madonna
[![License](https://img.shields.io/github/license/FollowTheProcess/madonna)](https://github.com/FollowTheProcess/madonna)
[![PyPI](https://img.shields.io/pypi/v/madonna.svg?logo=python)](https://pypi.python.org/pypi/madonna)
[![GitHub](https://img.shields.io/github/v/release/FollowTheProcess/madonna?logo=github&sort=semver)](https://github.com/FollowTheProcess/madonna)
[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![CI](https://github.com/FollowTheProcess/madonna/workflows/CI/badge.svg)](https://github.com/FollowTheProcess/madonna/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/FollowTheProcess/madonna/branch/main/graph/badge.svg?token=OLMR2P3J6N)](https://codecov.io/gh/FollowTheProcess/madonna)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/FollowTheProcess/madonna/main.svg)](https://results.pre-commit.ci/latest/github/FollowTheProcess/madonna/main)**A Python semver parsing library.**
* Free software: MIT License
* Documentation: [https://FollowTheProcess.github.io/madonna/]()
## Project Description
Madonna is a small, simple [semver] utility library with support for parsing, writing, and otherwise interacting with semantic versions in code.
**Why the stupid name?**
Get it? "Like a Version"... 👏🏻
Also naming things on PyPI is hard!
## Installation
```shell
pip install madonna
```## Quickstart
The only construct in madonna is the `Version` object, you can use it for all sorts of useful things...
### Create a New Version
```python
from madonna import Versionv = Version(major=1, minor=2, patch=4)
```### Parse a Version from a string
```python
from madonna import VersionVersion.from_string("v1.2.4-rc.1+build.123")
# Version(major=1, minor=2, patch=4, prerelease="rc.1", buildmetadata="build.123")
```### Or JSON
```python
from madonna import VersionVersion.from_json('{"major": 1, "minor": 2, "patch": 4}')
```And you can also dump a `Version` to a variety of formats too!
## Contributing
`madonna` is an open source project and, as such, welcomes contributions of all kinds :smiley:
Your best bet is to check out the [contributing guide] in the docs!
### Credits
This package was created with [cookiecutter](https://github.com/cookiecutter/cookiecutter) and the [FollowTheProcess/cookie_pypackage] project template.
[FollowTheProcess/cookie_pypackage]: https://github.com/FollowTheProcess/cookie_pypackage
[contributing guide]: https://FollowTheProcess.github.io/madonna/contributing/contributing.html
[semver]: https://semver.org