Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Command line interface from dataclasses-avroschema to work with avsc
resources
python 3.9+
https://marcosschroh.github.io/dc-avro/
You can validate one avro schema
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
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}}
]
}
You can validate several .avsc
files with lint
command
dc-avro lint tests/schemas/example.avsc tests/schemas/example_v2.avsc
👍 Total valid schemas: 2
tests/schemas/example.avsc
tests/schemas/example_v2.avsc
To see all the commands execute dc-avro --help
Add the following lines to your .pre-commit-config.yaml
file to enable avro schemas linting
- repo: https://github.com/marcosschroh/dc-avro.git
rev: 0.7.0
hooks:
- id: lint-avsc
additional_dependencies: [typing_extensions]
schema
schemas
models
from schemas
schema
schema
schemas
schema
poetry install
./scripts/format
./scripts/test
FAQs
Unknown package
We found that dc-avro demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.