Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asyncapi-python

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asyncapi-python

Easily generate type-safe and async Python applications from AsyncAPI 3 specifications.

  • 0.1.2
  • PyPI
  • Socket score

Maintainers
1

AsyncAPI Python Code Generator

Link to this github repository

Easily generate type-safe and async Python applications from AsyncAPI 3 specifications.

Features

  • Creates Application class from AsyncAPI 3 specifications, implementing every operation in the file
  • Generates typed Python code (messages are generated using datamodel-code-generator)
  • Performs dynamic validation of messages with Pydantic 2
  • Enforces the user code to implement all consumer methods as described by spec
  • Provides async code
  • Spec parser references other files through absolute or relative paths
  • Spec parser references other files through url
  • Supports request-reply pattern
  • Supports publish-subscribe pattern
  • AsyncAPI trait support
  • Customizable message encoder/decoder

Requirements

  • python>=3.10
  • pydantic>=2
  • pytz
  • For codegen extra
    • jinja2
    • typer
    • datamodel-code-generator
    • pyyaml
  • For amqp extra
    • aio-pika

Installation

For code generation (development env), run:

pip install asyncapi-python[codegen]

For runtime, run:

pip install asyncapi-python[amqp]

You can replace amqp with any other supported protocols. For more info, see Supported Protocols section.

Supported Protocols / Use Cases

Below, you may see the table of protocols and the supported use cases. The tick signs (✅) contain links to the examples for each implemented protocol-use case pair, while the hammer signs (🔨) contain links to the Issues tracking the progress for protocol-use case pairs. The list of protocols and use cases is expected to increase over the progress of development.

Use CaseAMQP
Pub-Sub✅ amqp-pub-sub
Work Queue✅ amqp-work-queue
RPC✅ amqp-rpc

Documentation

Although there's no documentation available at the moment, a set of comprehensive examples with comments for each implemented use-case is under the examples directory.

Contributing

Contributions are welcome! Please feel free to open an Issue or submit a Pull Request.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc