Generate Faust Avro Models from Avro Schema files.
Project description
Faust Avro Code Generator
This is a Python library that generates Faust models from Avro schemas.
Installation
You can install the library using pip:
pip install faust_avro_code_gen
Configuration
You can configure the library for your application using either pyproject.toml
or a standalone configuration file.
Using pyproject.toml
Add the following section to your pyproject.toml
:
[tool.faust_avro_code_gen]
schema_dir = "path/to/your/schemas"
outfile = "path/to/your/models.py"
schema_registry_url = "http://localhost:8081"
faust_app_models_module = "models"
Using a standalone configuration file
Create a faust_avro_code_gen.toml
file in your project root with the following content:
schema_dir = "path/to/your/schemas"
outfile = "path/to/your/models.py"
schema_registry_url = "http://localhost:8081"
faust_app_models_module = "models"
Usage
You can use the library from the command line as follows:
python -m faust_avro_code_gen
If you have already registered your schemas with a Schema Registry, you can also verify that the schemas are correctly rendered by running the following command:
python -m faust_avro_code_gen --verify
This will generate Faust models from the Avro schemas in the directory specified in your configuration.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file faust_avro_model_codegen-0.1.2.tar.gz
.
File metadata
- Download URL: faust_avro_model_codegen-0.1.2.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.13 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04e999e629dfd0b1d982cbe42ce7f666151272ac9c4d5389c0442fc0e7442371 |
|
MD5 | f2fd68c8609e391db58604e18a636e06 |
|
BLAKE2b-256 | 8b419505410715b2fbedeb7f634894602b024c0a42c673694e8f020b11aed302 |
File details
Details for the file faust_avro_model_codegen-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: faust_avro_model_codegen-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.13 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33388bd854aeca344d2e956520af1620c237cf15d1c316ac97287e018b21273a |
|
MD5 | 9cc476b822524a5aa3681285c0df2d22 |
|
BLAKE2b-256 | 9a9d5130b2d309bce84f961658f49dda075c1c157cf7c8fb01b806b762c42b31 |