pydantic-avro 0.8.0__tar.gz → 0.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/PKG-INFO +1 -1
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/pyproject.toml +1 -2
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/setup.py +1 -1
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/LICENSE +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/README.md +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/src/pydantic_avro/__init__.py +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/src/pydantic_avro/__main__.py +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/src/pydantic_avro/base.py +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/src/pydantic_avro/from_avro/__init__.py +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/src/pydantic_avro/from_avro/avro_to_pydantic.py +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/src/pydantic_avro/from_avro/class_registery.py +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/src/pydantic_avro/from_avro/types.py +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/src/pydantic_avro/py.typed +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/src/pydantic_avro/to_avro/__init__.py +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/src/pydantic_avro/to_avro/base.py +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/src/pydantic_avro/to_avro/config.py +0 -0
- {pydantic_avro-0.8.0 → pydantic_avro-0.8.1}/src/pydantic_avro/to_avro/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pydantic-avro"
|
|
3
|
-
version = "0.8.
|
|
3
|
+
version = "0.8.1"
|
|
4
4
|
description = "Converting pydantic classes to avro schemas"
|
|
5
5
|
authors = ["Peter van 't Hof' <peter.vanthof@godatadriven.com>"]
|
|
6
6
|
|
|
@@ -9,7 +9,6 @@ readme = "README.md"
|
|
|
9
9
|
license = "MIT"
|
|
10
10
|
homepage = "https://github.com/godatadriven/pydantic-avro"
|
|
11
11
|
repository = "https://github.com/godatadriven/pydantic-avro"
|
|
12
|
-
include = ["LICENSE"]
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
packages = [{ include = "pydantic_avro", from = "src" }]
|
|
@@ -18,7 +18,7 @@ entry_points = \
|
|
|
18
18
|
|
|
19
19
|
setup_kwargs = {
|
|
20
20
|
'name': 'pydantic-avro',
|
|
21
|
-
'version': '0.8.
|
|
21
|
+
'version': '0.8.1',
|
|
22
22
|
'description': 'Converting pydantic classes to avro schemas',
|
|
23
23
|
'long_description': '[](https://github.com/godatadriven/pydantic-avro/actions/workflows/python-package.yml)\n[](https://codecov.io/gh/godatadriven/pydantic-avro)\n[](https://badge.fury.io/py/pydantic-avro)\n[](https://github.com/godatadriven/pydantic-avro/actions/workflows/codeql-analysis.yml)\n\n# pydantic-avro\n\nThis library can convert a pydantic class to a avro schema or generate python code from a avro schema.\n\n### Install\n\n```bash\npip install pydantic-avro\n```\n\n### Pydantic class to avro schema\n\n```python\nimport json\nfrom typing import Optional\n\nfrom pydantic_avro.base import AvroBase\n\n\nclass TestModel(AvroBase):\n key1: str\n key2: int\n key2: Optional[str]\n\n\nschema_dict: dict = TestModel.avro_schema()\nprint(json.dumps(schema_dict))\n\n```\n\n### Avro schema to pydantic\n\n```shell\n# Print to stdout\npydantic-avro avro_to_pydantic --asvc /path/to/schema.asvc\n\n# Save it to a file\npydantic-avro avro_to_pydantic --asvc /path/to/schema.asvc --output /path/to/output.py\n```\n\n### Specify expected Avro type\n\n```python\nfrom datetime import datetime\nfrom pydantic import Field\nfrom pydantic_avro.base import AvroBase \n\nclass ExampleModel(AvroBase):\n field1: int = Field(..., avro_type="long") # Explicitly set Avro type to "long"\n field2: datetime = Field(..., avro_type="timestamp-millis") # Explicitly set Avro type to "timestamp-millis"\n```\n\n### Install for developers\n\n###### Install package\n\n- Requirement: Poetry 1.*\n\n```shell\npoetry install\n```\n\n###### Run unit tests\n```shell\npytest\ncoverage run -m pytest # with coverage\n# or (depends on your local env) \npoetry run pytest\npoetry run coverage run -m pytest # with coverage\n```\n\n##### Run linting\n\nThe linting is checked in the github workflow. To fix and review issues run this:\n```shell\nblack . # Auto fix all issues\nisort . # Auto fix all issues\npflake . # Only display issues, fixing is manual\n```\n',
|
|
24
24
|
'author': "Peter van 't Hof'",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|