All Projects → asyncapi → python-paho-template

asyncapi / python-paho-template

Licence: Apache-2.0 license
Python Paho template for the AsyncAPI generator

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-paho-template

event-gateway
AsyncAPI Event Gateway
Stars: ✭ 35 (+105.88%)
Mutual labels:  asyncapi
html-template
HTML template for AsyncAPI Generator
Stars: ✭ 38 (+123.53%)
Mutual labels:  asyncapi
java-spring-cloud-stream-template
Java Spring Cloud Stream template for the AsyncAPI Generator
Stars: ✭ 26 (+52.94%)
Mutual labels:  asyncapi
jasyncapi
/jay-sync-api/ is a Java code-first tool for AsyncAPI specification
Stars: ✭ 29 (+70.59%)
Mutual labels:  asyncapi
asynction
SocketIO python framework driven by the AsyncAPI specification. Built on top of Flask-SocketIO. Inspired by Connexion.
Stars: ✭ 40 (+135.29%)
Mutual labels:  asyncapi
openapi-filter
Filter internal paths, operations, parameters, schemas etc from OpenAPI/Swagger/AsyncAPI definitions
Stars: ✭ 112 (+558.82%)
Mutual labels:  asyncapi
nestjs-asyncapi
NestJS AsyncAPI module - generate the documentation of your event-based services using decorators
Stars: ✭ 88 (+417.65%)
Mutual labels:  asyncapi
parser-go
It parses AsyncAPI documents.
Stars: ✭ 43 (+152.94%)
Mutual labels:  asyncapi
converter-go
Convert AsyncAPI documents from older to newer versions with Golang
Stars: ✭ 17 (+0%)
Mutual labels:  asyncapi
java-spring-template
Java Spring template for the AsyncAPI Generator
Stars: ✭ 41 (+141.18%)
Mutual labels:  asyncapi
go-watermill-template
Go template for the AsyncAPI Generator using Watermill module
Stars: ✭ 38 (+123.53%)
Mutual labels:  asyncapi
Spec
The AsyncAPI specification allows you to create machine-readable definitions of your asynchronous APIs.
Stars: ✭ 1,860 (+10841.18%)
Mutual labels:  asyncapi
modelina
Library for generating data models based on inputs such as AsyncAPI, OpenAPI, or JSON Schema documents.
Stars: ✭ 55 (+223.53%)
Mutual labels:  asyncapi
home
This is the home page for the API specification toolbox.
Stars: ✭ 16 (-5.88%)
Mutual labels:  asyncapi
boats
Beautiful Open Api Template System
Stars: ✭ 28 (+64.71%)
Mutual labels:  asyncapi
nodejs-template
Node.js template for the AsyncAPI Generator
Stars: ✭ 19 (+11.76%)
Mutual labels:  asyncapi
nestjs-asyncapi
Async API module for Nestjs that provides documentation generation using your existing code (similar to Nestjs swagger module)
Stars: ✭ 22 (+29.41%)
Mutual labels:  asyncapi
wsapix
Next generation Websocket framework for nodejs
Stars: ✭ 17 (+0%)
Mutual labels:  asyncapi

python-paho-template

This is the Python Paho template for the AsyncAPI generator.

It is basically working but may not generate perfect code for every AsyncAPI document. It works correctly with the temperature.yml file included in the samples directory, which demonstrates a subscriber, a publisher, and a payload class with an embedded enum type.

Support for arrays, specifying function names and other features are yet to be implemented.

About the samples directory

In the samples directory there is an example of code that is close to what we intend to generate.

Configuration

To run the sample code, copy config-template.ini to config.ini and enter the connection details.

If no authentication is needed, you need not provide the username and password values.

If no host is given, the template attempts to find an mqtt host in the servers section of the AsyncAPI document to use instead.

Specification Conformance

Note that this template interprets the AsyncAPI document in conformance with the AsyncAPI Specification. This means that when the template sees a subscribe operation, it will generate code to publish to that operation's channel. It is possible to override this, see the 'view' parameter in the parameters section below.

How to Use This Template

Install the AsyncAPI Generator

npm install -g @asyncapi/generator

Run the Generator using the Python Paho Template

ag ~/AsyncApiDocument.yaml @asyncapi/python-paho-template

Copy config-template.ini to config.ini and edit it to provide the connection details.

Parameters

Parameters can be passed to the generator using command line arguments in the form -p param=value -p param2=value2. Here is a list of the parameters that can be used with this template. In some cases these can be put into the AsyncAPI documents using the specification extensions feature. In those cases, the 'info' prefix means that it belongs in the info section of the document.

Parameter Extension Default Description
view info.x-view client By default, this template generates publisher code for subscribe operations and vice versa. You can switch this by setting this parameter to 'provider'.

Specification Extensions

The following specification extensions are supported. In some cases their value can be provided as a command line parameter. The 'info' prefix means that it belongs in the info section of the document.

Extension Parameter Default Description
info.x-view view client By default, this template generates publisher code for subscribe operations and vice versa. You can switch this by setting this parameter to 'provider'.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].