jomiel-messages


Namejomiel-messages JSON
Version 0.2.1.1 PyPI version JSON
download
home_pagehttps://github.com/guendto/jomiel-messages
SummaryPython bindings for jomiel protobuf messages
upload_time2023-10-04 16:04:18
maintainer
docs_urlNone
authorToni Gündoğdu
requires_python>=3.6
licenseApache2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # jomiel-messages

[![pypi-pyversions](https://img.shields.io/pypi/pyversions/jomiel-messages?color=%230a66dc)][pypi]
[![pypi-v](https://img.shields.io/pypi/v/jomiel-messages?color=%230a66dc)][pypi]
[![pypi-wheel](https://img.shields.io/pypi/wheel/jomiel-messages?color=%230a66dc)][pypi]
[![pypi-status](https://img.shields.io/pypi/status/jomiel-messages?color=%230a66dc)][pypi]
[![code-style](https://img.shields.io/badge/code%20style-black-000000.svg)][black]

[pypi]: https://pypi.org/project/jomiel-messages
[black]: https://pypi.org/project/black

The Python bindings for the [jomiel] protobuf messages.

[jomiel]: https://github.com/guendto/jomiel

## About

The bindings have been generated from the protobuf declaration files of
[jomiel-proto]

[jomiel-proto]: https://github.com/guendto/jomiel-proto/

## Installation

```shell
pip install jomiel-messages
```

Install from the repository, e.g. for development:

```shell
git clone https://github.com/guendto/jomiel-messages.git
cd jomiel-messages
./bin/gen
pip install -e .
```

## Usage

Serialize an inquiry message:

```python
from jomiel_messages.protobuf.v1alpha1.message_pb2 import Inquiry

inquiry = Inquiry()
inquiry.media.input_uri = 'https://foo.bar/baz'
serialized_string = Inquiry.SerializeToString(inquiry)
# ...
```

De-serialize a response message:

```python
from jomiel_messages.protobuf.v1alpha1.message_pb2 import Response
from jomiel_messages.protobuf.v1alpha1.status_pb2 import STATUS_CODE_OK

response = Response()
response.ParseFromString(serialized_string)

if response.status.code != STATUS_CODE_OK:
  print(f"message={response.status.message})
  print(f"status-code={response.status.code}")
  print(f"error-code={response.status.error}")
  print(f"http-code={response.status.http.code}")
  # ...
else:
  # ...
```

## License

`jomiel-messages` is licensed under the [Apache License version
2.0][aplv2].

[aplv2]: https://www.tldrlegal.com/l/apache2

## Acknowledgements

### Subprojects (as git subtrees)

- [src/jomiel_messages/proto/](src/jomiel_messages/proto/) of
  [jomiel-proto]

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/guendto/jomiel-messages",
    "name": "jomiel-messages",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Toni G\u00fcndo\u011fdu",
    "author_email": "47444442+guendto@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/2a/b6/3c27e345fbf2512eaaa1aa3ac032460e08778a8dba7bb10ab80a0763a659/jomiel_messages-0.2.1.1.tar.gz",
    "platform": "any",
    "description": "# jomiel-messages\n\n[![pypi-pyversions](https://img.shields.io/pypi/pyversions/jomiel-messages?color=%230a66dc)][pypi]\n[![pypi-v](https://img.shields.io/pypi/v/jomiel-messages?color=%230a66dc)][pypi]\n[![pypi-wheel](https://img.shields.io/pypi/wheel/jomiel-messages?color=%230a66dc)][pypi]\n[![pypi-status](https://img.shields.io/pypi/status/jomiel-messages?color=%230a66dc)][pypi]\n[![code-style](https://img.shields.io/badge/code%20style-black-000000.svg)][black]\n\n[pypi]: https://pypi.org/project/jomiel-messages\n[black]: https://pypi.org/project/black\n\nThe Python bindings for the [jomiel] protobuf messages.\n\n[jomiel]: https://github.com/guendto/jomiel\n\n## About\n\nThe bindings have been generated from the protobuf declaration files of\n[jomiel-proto]\n\n[jomiel-proto]: https://github.com/guendto/jomiel-proto/\n\n## Installation\n\n```shell\npip install jomiel-messages\n```\n\nInstall from the repository, e.g. for development:\n\n```shell\ngit clone https://github.com/guendto/jomiel-messages.git\ncd jomiel-messages\n./bin/gen\npip install -e .\n```\n\n## Usage\n\nSerialize an inquiry message:\n\n```python\nfrom jomiel_messages.protobuf.v1alpha1.message_pb2 import Inquiry\n\ninquiry = Inquiry()\ninquiry.media.input_uri = 'https://foo.bar/baz'\nserialized_string = Inquiry.SerializeToString(inquiry)\n# ...\n```\n\nDe-serialize a response message:\n\n```python\nfrom jomiel_messages.protobuf.v1alpha1.message_pb2 import Response\nfrom jomiel_messages.protobuf.v1alpha1.status_pb2 import STATUS_CODE_OK\n\nresponse = Response()\nresponse.ParseFromString(serialized_string)\n\nif response.status.code != STATUS_CODE_OK:\n  print(f\"message={response.status.message})\n  print(f\"status-code={response.status.code}\")\n  print(f\"error-code={response.status.error}\")\n  print(f\"http-code={response.status.http.code}\")\n  # ...\nelse:\n  # ...\n```\n\n## License\n\n`jomiel-messages` is licensed under the [Apache License version\n2.0][aplv2].\n\n[aplv2]: https://www.tldrlegal.com/l/apache2\n\n## Acknowledgements\n\n### Subprojects (as git subtrees)\n\n- [src/jomiel_messages/proto/](src/jomiel_messages/proto/) of\n  [jomiel-proto]\n",
    "bugtrack_url": null,
    "license": "Apache2.0",
    "summary": "Python bindings for jomiel protobuf messages",
    "version": "0.2.1.1",
    "project_urls": {
        "Homepage": "https://github.com/guendto/jomiel-messages"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab7ab79ace6335a749f24c34ca7b7f0a46c8aaba47029a5624eecee831334e6e",
                "md5": "c1ff5660a9d80c1c68bbcc5f4ecf6d38",
                "sha256": "db4e6d86c8c8429ad68475bd2682fe30fd579915ff77ae321731b5cb470ebd23"
            },
            "downloads": -1,
            "filename": "jomiel_messages-0.2.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c1ff5660a9d80c1c68bbcc5f4ecf6d38",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 10714,
            "upload_time": "2023-10-04T16:04:16",
            "upload_time_iso_8601": "2023-10-04T16:04:16.726969Z",
            "url": "https://files.pythonhosted.org/packages/ab/7a/b79ace6335a749f24c34ca7b7f0a46c8aaba47029a5624eecee831334e6e/jomiel_messages-0.2.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ab63c27e345fbf2512eaaa1aa3ac032460e08778a8dba7bb10ab80a0763a659",
                "md5": "3aff25e12614904ce1b158ec74b7c946",
                "sha256": "424ce66e85ebce2dad18d73f23d06bf0be08e19ad4a9ce715df16fc5ab2f5344"
            },
            "downloads": -1,
            "filename": "jomiel_messages-0.2.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3aff25e12614904ce1b158ec74b7c946",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 10819,
            "upload_time": "2023-10-04T16:04:18",
            "upload_time_iso_8601": "2023-10-04T16:04:18.610006Z",
            "url": "https://files.pythonhosted.org/packages/2a/b6/3c27e345fbf2512eaaa1aa3ac032460e08778a8dba7bb10ab80a0763a659/jomiel_messages-0.2.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-04 16:04:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "guendto",
    "github_project": "jomiel-messages",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "jomiel-messages"
}
        
Elapsed time: 0.12196s