dc-avro-0.6.4
توضیحات
-
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | dc-avro-0.6.4 |
| نام | dc-avro |
| نسخه کتابخانه | 0.6.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Marcos Schroh |
| ایمیل نویسنده | marcos.schroh@kpn.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/dc-avro/ |
| مجوز | MIT |
# Dataclasses Avro Schema CLI
Command line interface from [dataclasses-avroschema](https://github.com/marcosschroh/dataclasses-avroschema) to work with `avsc` resources
[](https://github.com/marcosschroh/dc-avro/actions/workflows/tests.yaml)
[](https://github.com/marcosschroh/dc-avro/blob/master/LICENSE)
[](https://codecov.io/gh/marcosschroh/dc-avro)

## Requirements
`python 3.7+`
## Documentation
https://marcosschroh.github.io/dc-avro/
## Usage
You can validate `avro schemas` either from a `local file` or `url`:
Assuming that we have a local file `schema.avsc` that contains an `avro schema`, we can check whether it is valid
```bash
dc-avro validate-schema --path schema.avsc
Valid schema!! 👍
{
'type': 'record',
'name': 'UserAdvance',
'fields': [
{'name': 'name', 'type': 'string'},
{'name': 'age', 'type': 'long'},
{'name': 'pets', 'type': {'type': 'array', 'items': 'string', 'name': 'pet'}},
{'name': 'accounts', 'type': {'type': 'map', 'values': 'long', 'name': 'account'}},
{'name': 'favorite_colors', 'type': {'type': 'enum', 'name': 'FavoriteColor', 'symbols': ['BLUE', 'YELLOW', 'GREEN']}},
{'name': 'has_car', 'type': 'boolean', 'default': False},
{'name': 'country', 'type': 'string', 'default': 'Argentina'},
{'name': 'address', 'type': ['null', 'string'], 'default': None},
{'name': 'md5', 'type': {'type': 'fixed', 'name': 'md5', 'size': 16}}
]
}
```
To see all the commands execute `dc-avro --help`
## Features
* [x] Validate `schemas`
* [x] Generate `models` from `schemas`
* [x] Data deserialization with `schema`
* [x] Data serialization with `schema`
* [x] View diff between `schemas`
* [] Generate fake data from `schema`
## Development
1. Install requirements: `poetry install`
2. Code linting: `./scripts/format`
3. Run tests: `./scripts/test`
نیازمندی
| مقدار | نام |
|---|---|
| >=22.1.0,<23.0.0 | aiofiles |
| >=0.23.3,<0.24.0 | httpx |
| >=0,<1 | dataclasses-avroschema |
| >=0.7.0,<0.8.0 | typer[all] |
| >=6.2.3,<7.0.0 | deepdiff |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl dc-avro-0.6.4:
pip install dc-avro-0.6.4.whl
نصب پکیج tar.gz dc-avro-0.6.4:
pip install dc-avro-0.6.4.tar.gz