Skip to main content

Python library for easy message broker handling using Pydantic

Project description

pikantic

PyPI PyPI - Python Version PyPI License Code Style: black

Python library for easy message broker handling using Pydantic

Basic Usage

import pikantic
from pydantic import BaseModel

app = pikantic.Pikantic(AMQP_URI)


class PersonModel(BaseModel):
    name: str
    age: int


@app.on_rabbit('test_queue')
async def handle_message(msg: aio_pika.Message, person: PersonModel):
    print(msg.body)
    print(person.age)


if __name__ == '__main__':
    app.run()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pikantic-0.1.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

pikantic-0.1.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file pikantic-0.1.2.tar.gz.

File metadata

  • Download URL: pikantic-0.1.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.5 Windows/10

File hashes

Hashes for pikantic-0.1.2.tar.gz
Algorithm Hash digest
SHA256 72e47a0911baeb82a5553b89086d864890e67a864537e061b74bc6a8cdd26400
MD5 780e8214fd73a8788748c05404d1b672
BLAKE2b-256 640deddf2eed2704251e30e7a5ee06c9c98038233b83a7d505d8617316f38678

See more details on using hashes here.

File details

Details for the file pikantic-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pikantic-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.5 Windows/10

File hashes

Hashes for pikantic-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e6a932f01146f1f0bd412e5cf8fc1839422cf5ceeeb633c4408c19a383967e39
MD5 e05dcf0a195537c3572e6dae6008be88
BLAKE2b-256 51bad43fd622ed0dbc4b84ee9c146e2c3c6f9756e91fb45b4ef570ef9a3182f0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page