AsyncAPI Sphinx Extension¶

This extension adds some directives to integrate documentation for your pub-sub application using asyncapi specification.
You can use asyncapi specifications in your source code doc string or in your documentation to generate a beautiful documentation plus overview. Further the specification might be used for other things as well (not supported yet).
Warning
This is still in a early stage.
Installation¶
Install the sphinx extension with pip install asyncapi_sphinx_ext.
Usage¶
The extension adds two directives asyncapi_channels and asyncapi_overview.
The asyncapi_channels directive is used to add the some pub/sub documentation and the asyncapi_overview is used to create a table with the all the pub/sub topics defined.
For a full example checkout usage_example.
Important Links¶
Features¶
asyncapi_sphinx_ext adds two directives asyncapi_channels and asyncapi_overview to document pub/sub endpoints, directly in your source code as python docstring.
It further adds a sphinx builder to extract all the documented pub/sub endpoints and export them as a single asyncapi yaml.
Configuration Parameters¶
- asyncapi_data
Dictionary with AsyncApi spec meta data.
Invoking the builder¶
sphinx-build -b asyncapi source/ build/asynapi
Contents¶
Example Usage¶
Published Topics¶
crazy_horse/<id>/msg |
Current crazy horse message of the day, crazy_horse.do_aynthing |
crazy_horse/<id>/state |
Current crazy horse status, crazy_horse.do_nothing |
crazy_horse/<id>/test |
Current crazy horse status, crazy_horse.do_nothing |
Subscribed Topics¶
crazy_pig/<id>/msg |
Current crazy horse message of the day, crazy_horse.do_aynthing |
crazy_horse.lib¶
Crazy horse is a library for nothing
-
crazy_horse.
do_aynthing
(msg)[source]¶ This function does also nothing
- crazy_horse/<id>/msg
- publish
- summary
- Current crazy horse message of the day
- message
- contentType
- application/json
- payload
- properties
- at
- type
- number
- format
- unix epoch in seconds
- crazy_pig/<id>/msg
- subscribe
- summary
- Current crazy horse message of the day
- message
- contentType
- application/json
- payload
- properties
- at
- type
- number
- format
- unix epoch in seconds
-
crazy_horse.
do_nothing
(msg)[source]¶ This function does nothing
- crazy_horse/<id>/state
- publish
- summary
- Current crazy horse status
- message
- contentType
- application/json
- payload
- properties
- at
- type
- number
- format
- unix epoch in seconds
- temperature
- type
- number
- crazy_horse/<id>/test
- publish
- summary
- Current crazy horse status
- message
- contentType
- application/json
- payload
- properties
- at
- type
- number
- format
- unix epoch in seconds
- temperature
- type
- number