{"id":28313917,"url":"https://github.com/karthikrangasai/anton","last_synced_at":"2026-05-08T17:35:17.898Z","repository":{"id":65273468,"uuid":"584115204","full_name":"karthikrangasai/anton","owner":"karthikrangasai","description":"`anton` is a Python library for auto instantiating yaml definitions to user defined dataclasses with runtime type checking.","archived":false,"fork":false,"pushed_at":"2023-04-22T10:46:20.000Z","size":3073,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-22T06:20:08.065Z","etag":null,"topics":["configuration-management","json","python","toml","yaml"],"latest_commit_sha":null,"homepage":"https://karthikrangasai.github.io/anton/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karthikrangasai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-01T12:39:16.000Z","updated_at":"2023-11-17T23:35:28.000Z","dependencies_parsed_at":"2025-05-24T19:09:08.130Z","dependency_job_id":"687c51b5-0728-47ca-ab38-929fbdb69e79","html_url":"https://github.com/karthikrangasai/anton","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/karthikrangasai/anton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthikrangasai%2Fanton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthikrangasai%2Fanton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthikrangasai%2Fanton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthikrangasai%2Fanton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karthikrangasai","download_url":"https://codeload.github.com/karthikrangasai/anton/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthikrangasai%2Fanton/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32790581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["configuration-management","json","python","toml","yaml"],"created_at":"2025-05-24T19:09:03.796Z","updated_at":"2026-05-08T17:35:17.884Z","avatar_url":"https://github.com/karthikrangasai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# anton\n\n[![CI testing](https://github.com/karthikrangasai/anton/actions/workflows/ci-testing.yml/badge.svg)](https://github.com/karthikrangasai/anton/actions/workflows/ci-testing.yml)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n\u003c!-- [![Documentation Status](https://readthedocs.org/projects/anton/badge/?version=latest)](https://anton.readthedocs.io/en/latest/?badge=latest) --\u003e\n\n\u003c!-- [![PyPI](https://img.shields.io/pypi/v/anton)](Add PyPI Link here) --\u003e\n\u003c!-- [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/karthikrangasai/anton/blob/master/training_notebook.ipynb) --\u003e\n\n\u003c/div\u003e\n\n`anton` is a Python library for auto instantiating yaml definitions to user defined dataclasses.\n\nAvoid boilerplate and get runtime type checking before the objects are created.\n\n\u003c!-- ## Installation\n\n```bash\npip install anton\n``` --\u003e\n\n## Usage\n\nGiven a `yaml` file definition in a file `index.yaml` as follows:\n\n```yaml\n# index.yaml\ninteger: 23\nstring: \"Hello world\"\npoint:\n  x: 0\n  y: 0\nline_segment:\n  first_point:\n    x: 10\n    y: 10\n  second_point:\n    x: 10\n    y: 10\n```\n\n`yaml_conf` lets you avoid writing the biolerplate code for loading the `yaml` file and parsing the python dictionary to instantiate the Dataclass object as follows:\n\n```py\n\u003e\u003e\u003e from dataclasses import dataclass\n\u003e\u003e\u003e from anton import yaml_conf\n\u003e\u003e\u003e\n\u003e\u003e\u003e @dataclass\n... class Point:\n...     x: int\n...     y: int\n...\n\u003e\u003e\u003e @dataclass\n... class LineSegment:\n...     first_point: Point\n...     second_point: Point\n...\n\u003e\u003e\u003e @yaml_conf()\n... class ExampleClass:\n...     integer: int\n...     string: str\n...     point: Point\n...     line_segment: LineSegment\n...\n\u003e\u003e\u003e example_obj = ExampleClass(conf_path=\"index.yaml\")\n\u003e\u003e\u003e example_obj\nExampleClass(integer=23, string='Hello world', point=Point(x=0, y=0), line_segment=LineSegment(first_point=Point(x=10, y=10), second_point=Point(x=10, y=10)))\n```\n\n## Roadmap\n\nCurrently the project only supports Python3.8\n\nRuntime type checking is supported for the following types:\n- int\n- float\n- str\n- bool\n- typing.List\n- typing.Dict\n- typing.Union\n- Any user defined dataclass\n\nThe ultimate aim is to support all python versions Python3.8+ and all possible type combinations.\n\n## Contributing\n\nPull requests are welcome !!! Please make sure to update tests as appropriate.\n\nFor major changes, please open an issue first to discuss what you would like to change.\n\nPlease do go through the [Contributing Guide](https://github.com/karthikrangasai/anton/blob/master/CONTRIBUTING.md) if some help is required.\n\nNote: `anton` currently in active development. Please [open an issue](https://github.com/karthikrangasai/anton/issues/new/choose) if you find anything that isn't working as expected.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarthikrangasai%2Fanton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarthikrangasai%2Fanton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarthikrangasai%2Fanton/lists"}