{"id":18810343,"url":"https://github.com/absaoss/py2k","last_synced_at":"2025-04-13T20:30:57.133Z","repository":{"id":36989996,"uuid":"343405243","full_name":"AbsaOSS/py2k","owner":"AbsaOSS","description":"A Python to Kafka Serialization Tool","archived":false,"fork":false,"pushed_at":"2023-02-27T01:08:59.000Z","size":473,"stargazers_count":13,"open_issues_count":19,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-12T19:50:39.307Z","etag":null,"topics":["pandas-dataframes","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbsaOSS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-01T12:17:02.000Z","updated_at":"2024-09-20T16:44:32.000Z","dependencies_parsed_at":"2023-02-19T02:46:09.325Z","dependency_job_id":null,"html_url":"https://github.com/AbsaOSS/py2k","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsaOSS%2Fpy2k","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsaOSS%2Fpy2k/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsaOSS%2Fpy2k/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsaOSS%2Fpy2k/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbsaOSS","download_url":"https://codeload.github.com/AbsaOSS/py2k/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223603202,"owners_count":17172059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pandas-dataframes","python"],"created_at":"2024-11-07T23:19:51.690Z","updated_at":"2024-11-07T23:19:52.343Z","avatar_url":"https://github.com/AbsaOSS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to Py2k\n\n[![Tests](https://github.com/AbsaOSS/py2k/actions/workflows/ci.yml/badge.svg)](https://github.com/AbsaOSS/py2k/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/AbsaOSS/py2k/branch/main/graph/badge.svg?token=ICP840115H)](https://codecov.io/gh/AbsaOSS/py2k)\n[![pypi](https://img.shields.io/pypi/v/py2k.svg)](https://pypi.python.org/pypi/py2k)\n[![downloads](https://img.shields.io/pypi/dm/py2k.svg)](https://pypistats.org/packages/py2k)\n[![versions](https://img.shields.io/pypi/pyversions/py2k.svg)](https://github.com/AbsaOSS/py2k)\n[![license](https://img.shields.io/github/license/AbsaOSS/py2k.svg)](https://github.com/AbsaOSS/py2k/blob/main/LICENSE)\n\nA high level Python to Kafka API with Schema Registry compatibility and automatic avro schema creation.\n\n- Free software: Apache2 license\n\n## Installation\n\nPy2K is currently available on PIP:\n\n```bash\npip install py2k\n```\n\n## Documentation\n\nYou can view additional documentation on our [website](https://absaoss.github.io/py2k).\n\n## Contributing\n\nPlease see the [Contribution Guide](.github/CONTRIBUTING.md) for more information.\n\n## Usage\n\n### Minimal Example\n\n```python\nfrom py2k.record import PandasToRecordsTransformer\nfrom py2k.writer import KafkaWriter\n\n# assuming we have a pandas DataFrame, df\nrecords = PandasToRecordsTransformer(df=df, record_name='test_model').from_pandas()\n\nwriter = KafkaWriter(\n    topic=\"topic_name\",\n    schema_registry_config=schema_registry_config,\n    producer_config=producer_config\n)\n\nwriter.write(records)\n```\n\nFor additional examples please see the [examples](./examples) folder\n\n## Features\n\n- Schema Registry Integration\n- Automatic Avro Serialization from pandas DataFrames\n- Automatic Avro Schema generation from pandas DataFrames and Pydantic objects\n\n## License\n\n    Copyright 2021 ABSA Group Limited\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabsaoss%2Fpy2k","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabsaoss%2Fpy2k","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabsaoss%2Fpy2k/lists"}