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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file faust_avro_model_codegen-0.1.8.tar.gz.
File metadata
- Download URL: faust_avro_model_codegen-0.1.8.tar.gz
- Upload date:
- Size: 7.8 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 |
705d8e69bd3f9c98ef1cede5c4a3f9eb15cf7d4d903ed49801c0059aded69949
|
|
| MD5 |
2875541e7b71bafa8345758fa3d71922
|
|
| BLAKE2b-256 |
dd7ccc27dcb09c4a3630e6a739b01776087497da992bd803ac36afab0ab1d0f8
|
File details
Details for the file faust_avro_model_codegen-0.1.8-py3-none-any.whl.
File metadata
- Download URL: faust_avro_model_codegen-0.1.8-py3-none-any.whl
- Upload date:
- Size: 10.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 |
0a5b546970044cf3fc3e3ecc357fc878cc88a3fe85279b98283e5a61ae822202
|
|
| MD5 |
0ad908ef8fba1fb32b9b0b126b2acd48
|
|
| BLAKE2b-256 |
4bfd2807f378d191c35830e3222d85c67a5512226f9e94f1de74211ecc0927e9
|