
Research
Security News
The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Easily generate type-safe and async Python applications from AsyncAPI 3 specifications.
[!IMPORTANT] Although commits to dev branch might seem infrequent, the project is under active development as of March 2025.
We currently produce only those changes that are required to satisfy our personal use cases.
The number of commits will grow as we see increase in popularity of it, so do not hesitate to star this repo, open issues, and pull requests.
Link to this github repository
Easily generate type-safe and async Python applications from AsyncAPI 3 specifications.
Application
class from AsyncAPI 3 specifications, implementing every operation in the filepython>=3.9
pydantic>=2
pytz
codegen
extra
jinja2
typer
datamodel-code-generator
pyyaml
amqp
extra
aio-pika
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.
The following method was tested with pants version 2.23.1. Pleas note that Pants plugin API is still in development and things might break.
This library can act as a plugin for Pants. More specifically, it creates a new target type: asyncapi_python_service
-- which can be used like:
# BUILD
asyncapi_python_service(
name="asyncapi_app",
service="app.asyncapi.yaml",
sources=[
"app.asyncapi.yaml",
"lib.asyncapi.yaml",
"commons.*.asyncapi.yaml"
]
)
This will be generating python module named asyncapi_app
on codegen-export
and export
goals.
This target can later be used as a dependency of python_sources
.
# BUILD
python_sources(
dependencies=[
":asyncapi_app",
":reqs",
],
)
python_requirements(
name="reqs",
)
Note that this plugin does not do dependency injection, so asyncapi-python must be a dependency
# requirements.txt
asyncapi-python[amqp]
In order to deploy this plugin into your pants monorepo, create the following structure inside your plugins folder:
pants-plugins/
└── asyncapi_python_plugin
├── BUILD
├── __init__.py
├── register.py
└── requirements.txt
requirements.txt
must contain:
asyncapi-python
register.py
should have:
from asyncapi_python_pants.register import *
BUILD
must include:
python_sources(
dependencies=[":reqs"],
)
python_requirements(
name="reqs",
)
__init__.py
can be empty, but it has to exist.
Finally, add pants-plugins
to your PYTHONPATH
, and add the created folder as a backend package:
# pants.toml
backend_packages = [
"asyncapi_python_plugin",
...
]
pythonpath = ["%(buildroot)s/pants-plugins"]
When everything is done, test if the plugin works by running pants export-codegen ::
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 Case | AMQP |
---|---|
Pub-Sub | ✅ amqp-pub-sub |
Work Queue | ✅ amqp-work-queue |
RPC | ✅ amqp-rpc |
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.
Contributions are welcome! Please feel free to open an Issue or submit a Pull Request.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
FAQs
Easily generate type-safe and async Python applications from AsyncAPI 3 specifications.
We found that asyncapi-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.