Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faust_avro_model_codegen-0.1.7.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

faust_avro_model_codegen-0.1.7-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file faust_avro_model_codegen-0.1.7.tar.gz.

File metadata

  • Download URL: faust_avro_model_codegen-0.1.7.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.13 Darwin/21.6.0

File hashes

Hashes for faust_avro_model_codegen-0.1.7.tar.gz
Algorithm Hash digest
SHA256 acbe6211eeac43439c5b7c9e6e7ed3ba01fa47a0a2b12c29d4a03ad43c15a692
MD5 424c148d76866b56b89020f551c3b2fb
BLAKE2b-256 a8a769cbabc6ee1bfa96205e0db7538491c16d2c065e6245da81cf9d586d2250

See more details on using hashes here.

File details

Details for the file faust_avro_model_codegen-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for faust_avro_model_codegen-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3a6b54d33b44a86e98365552da790c6243f9a3124b70e96b3b3b8f7d3aae3e76
MD5 412719c4d3c22edb9af4a72f97c26c78
BLAKE2b-256 21c14bab4fd34f0046708555a8fe8af880eaf53cb99fb2fea3d23955dc6dfefe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page