rabe-cridlib


Namerabe-cridlib JSON
Version 0.12.1 PyPI version JSON
download
home_pagehttps://github.com/radiorabe/python-rabe-cridlib
SummaryGenerate CRIDs for RaBe
upload_time2024-10-02 17:30:23
maintainerNone
docs_urlNone
authorRaBe IT-Reaktion
requires_python<4.0,>=3.11
licenseAGPL-3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RaBe cridlib for Python

Generate [RaBe CRIDs](https://github.com/radiorabe/crid-spec) based on several data sources:

* Songticker for current CRID
* `archiv.rabe.ch` for past CRIDs
* LibreTime for future CRIDs (currently only data for the next 7 days and only available internally at RaBe)

## Installation

```bash
poetry add rabe-cridlib

# or on old setup style projects
pip -m install rabe-cridlib
```

## Usage

```python
>>> import cridlib
>>>
>>> # parse an existing crid
>>> crid = cridlib.parse("crid://rabe.ch/v1/klangbecken#t=clock=19930301T131200.00Z")
>>> print(f"version: {crid.version}, show: {crid.show}, start: {crid.start}")
version: v1, show: klangbecken, start: 1993-03-01 13:12:00

>>> # get crid for current show
>>> crid = cridlib.get()
>>> print(f"version: {crid.version}, show: {crid.show}")  # doctest:+ELLIPSIS
version: v1, show: ...

```

## Development

```bash
# setup a dev env
python -mvenv env
. env/bin/activate

# install a modern poetry version
python -mpip install poetry>=1.2.0

# install deps and dev version
poetry install

# make changes, run tests
pytest
```

## Release Management

The CI/CD setup uses semantic commit messages following the [conventional commits standard](https://www.conventionalcommits.org/en/v1.0.0/).
There is a GitHub Action [`semantic-release.yaml` in radiorabe/actions](https://github.com/radiorabe/actions/blob/main/.github/workflows/semantic-release.yaml)
that uses [go-semantic-commit](https://go-semantic-release.xyz/) to create new
releases.

The commit message should be structured as follows:

```
<type>[optional scope]: <description>

[optional body]

[optional footer(s)]
```

The commit contains the following structural elements, to communicate intent to the consumers of your library:

1. **fix:** a commit of the type `fix` patches gets released with a PATCH version bump
1. **feat:** a commit of the type `feat` gets released as a MINOR version bump
1. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:` gets released as a MAJOR version bump
1. types other than `fix:` and `feat:` are allowed and don't trigger a release

If a commit does not contain a conventional commit style message you can fix
it during the squash and merge operation on the PR.

Once a commit has landed on the `main` branch a release will be created and automatically published to [pypi](https://pypi.org/)
using the GitHub Action in [.github/workflows/release.yaml](./.github/workflows/release.yaml) which uses [poetry](https://python-poetry.org/)
to publish the package to pypi.

## License

This package is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.

## Copyright

Copyright (c) 2022 [Radio Bern RaBe](http://www.rabe.ch)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/radiorabe/python-rabe-cridlib",
    "name": "rabe-cridlib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": "RaBe IT-Reaktion",
    "author_email": "it@rabe.ch",
    "download_url": "https://files.pythonhosted.org/packages/36/3e/a62eee0103f9f249166d0754ff7bfdc391a812a87ce435f12be3d8e98e95/rabe_cridlib-0.12.1.tar.gz",
    "platform": null,
    "description": "# RaBe cridlib for Python\n\nGenerate [RaBe CRIDs](https://github.com/radiorabe/crid-spec) based on several data sources:\n\n* Songticker for current CRID\n* `archiv.rabe.ch` for past CRIDs\n* LibreTime for future CRIDs (currently only data for the next 7 days and only available internally at RaBe)\n\n## Installation\n\n```bash\npoetry add rabe-cridlib\n\n# or on old setup style projects\npip -m install rabe-cridlib\n```\n\n## Usage\n\n```python\n>>> import cridlib\n>>>\n>>> # parse an existing crid\n>>> crid = cridlib.parse(\"crid://rabe.ch/v1/klangbecken#t=clock=19930301T131200.00Z\")\n>>> print(f\"version: {crid.version}, show: {crid.show}, start: {crid.start}\")\nversion: v1, show: klangbecken, start: 1993-03-01 13:12:00\n\n>>> # get crid for current show\n>>> crid = cridlib.get()\n>>> print(f\"version: {crid.version}, show: {crid.show}\")  # doctest:+ELLIPSIS\nversion: v1, show: ...\n\n```\n\n## Development\n\n```bash\n# setup a dev env\npython -mvenv env\n. env/bin/activate\n\n# install a modern poetry version\npython -mpip install poetry>=1.2.0\n\n# install deps and dev version\npoetry install\n\n# make changes, run tests\npytest\n```\n\n## Release Management\n\nThe CI/CD setup uses semantic commit messages following the [conventional commits standard](https://www.conventionalcommits.org/en/v1.0.0/).\nThere is a GitHub Action [`semantic-release.yaml` in radiorabe/actions](https://github.com/radiorabe/actions/blob/main/.github/workflows/semantic-release.yaml)\nthat uses [go-semantic-commit](https://go-semantic-release.xyz/) to create new\nreleases.\n\nThe commit message should be structured as follows:\n\n```\n<type>[optional scope]: <description>\n\n[optional body]\n\n[optional footer(s)]\n```\n\nThe commit contains the following structural elements, to communicate intent to the consumers of your library:\n\n1. **fix:** a commit of the type `fix` patches gets released with a PATCH version bump\n1. **feat:** a commit of the type `feat` gets released as a MINOR version bump\n1. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:` gets released as a MAJOR version bump\n1. types other than `fix:` and `feat:` are allowed and don't trigger a release\n\nIf a commit does not contain a conventional commit style message you can fix\nit during the squash and merge operation on the PR.\n\nOnce a commit has landed on the `main` branch a release will be created and automatically published to [pypi](https://pypi.org/)\nusing the GitHub Action in [.github/workflows/release.yaml](./.github/workflows/release.yaml) which uses [poetry](https://python-poetry.org/)\nto publish the package to pypi.\n\n## License\n\nThis package is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.\n\n## Copyright\n\nCopyright (c) 2022 [Radio Bern RaBe](http://www.rabe.ch)\n",
    "bugtrack_url": null,
    "license": "AGPL-3",
    "summary": "Generate CRIDs for RaBe",
    "version": "0.12.1",
    "project_urls": {
        "Homepage": "https://github.com/radiorabe/python-rabe-cridlib",
        "Repository": "https://github.com/radiorabe/python-rabe-cridlib"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab58bdc12641aecbfc4344859176330616f30763041bdb51e42d23a468144ce0",
                "md5": "cb4c4c42c51a7c9fb31c1302111aca83",
                "sha256": "5d618fc1b4f5982a72e6546491a6b6ab73df102a4da509d2357c9fdb8eea94e5"
            },
            "downloads": -1,
            "filename": "rabe_cridlib-0.12.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cb4c4c42c51a7c9fb31c1302111aca83",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 20683,
            "upload_time": "2024-10-02T17:30:22",
            "upload_time_iso_8601": "2024-10-02T17:30:22.080909Z",
            "url": "https://files.pythonhosted.org/packages/ab/58/bdc12641aecbfc4344859176330616f30763041bdb51e42d23a468144ce0/rabe_cridlib-0.12.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "363ea62eee0103f9f249166d0754ff7bfdc391a812a87ce435f12be3d8e98e95",
                "md5": "bc48c3db53728fd4413ef9744d3b9e35",
                "sha256": "1bb94ffbac64c96c112632005a94028176c4ff753aac0c690c81dd0fa61f1845"
            },
            "downloads": -1,
            "filename": "rabe_cridlib-0.12.1.tar.gz",
            "has_sig": false,
            "md5_digest": "bc48c3db53728fd4413ef9744d3b9e35",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 19325,
            "upload_time": "2024-10-02T17:30:23",
            "upload_time_iso_8601": "2024-10-02T17:30:23.504811Z",
            "url": "https://files.pythonhosted.org/packages/36/3e/a62eee0103f9f249166d0754ff7bfdc391a812a87ce435f12be3d8e98e95/rabe_cridlib-0.12.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-02 17:30:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "radiorabe",
    "github_project": "python-rabe-cridlib",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "rabe-cridlib"
}
        
Elapsed time: 0.34970s