{"id":30213717,"url":"https://github.com/aweirddev/exacting","last_synced_at":"2026-01-20T17:57:22.022Z","repository":{"id":301095222,"uuid":"1007797704","full_name":"AWeirdDev/exacting","owner":"AWeirdDev","description":"exacting is a picky dataclass runtime utility collection, making sure all type annotations are followed.","archived":false,"fork":false,"pushed_at":"2025-06-29T06:00:38.000Z","size":716,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-31T00:11:17.965Z","etag":null,"topics":["python-data-structures","python-dataclass-type-validator","python-dataclasses"],"latest_commit_sha":null,"homepage":"https://aweirddev.github.io/exacting/","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/AWeirdDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-06-24T14:43:05.000Z","updated_at":"2025-06-29T06:00:24.000Z","dependencies_parsed_at":"2025-06-25T06:18:45.729Z","dependency_job_id":"66e797c7-acb2-4c31-b41e-42ae8e4e80ca","html_url":"https://github.com/AWeirdDev/exacting","commit_stats":null,"previous_names":["aweirddev/exacting"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AWeirdDev/exacting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Fexacting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Fexacting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Fexacting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Fexacting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AWeirdDev","download_url":"https://codeload.github.com/AWeirdDev/exacting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Fexacting/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270330904,"owners_count":24565888,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["python-data-structures","python-dataclass-type-validator","python-dataclasses"],"created_at":"2025-08-13T23:16:15.491Z","updated_at":"2026-01-20T17:57:21.996Z","avatar_url":"https://github.com/AWeirdDev.png","language":"Python","readme":"# Exacting\n\n\u003e *(adj.) making great demands on one's skill, attention, or other resources.*\n\n✅ [**Docs**](https://aweirddev.github.io/exacting) and [**PyPi**](https://pypi.org/project/exacting)\n\n`exacting` is a picky dataclass runtime utility collection, making sure all type annotations are followed.\n\nEssentially... **THE** go-to option for dataclasses. heh.\n\n**🔑 Key features**:\n\n- **100% static typing.** Because I hate nothing too.\n- Generally **faster** than [`pydantic`](https://pydantic.dev)!\n\n![i aint lying about static typing](https://github.com/user-attachments/assets/875517ff-5dd5-4b63-98fa-e1218ff00627)\n\n## Quick tour\n\nThis won't take you long :)\n\n**🛍️ Get `exacting`**:\n\n```haskell\npip install -U exacting\n```\n\n**🔥 Define some model**:\n\n(Let's just say you're on Python 3.10+... good boy!)\n\n```python\nfrom exacting import Exact\n\nclass Actor(Exact):\n    name: str\n    portrays: str\n\nclass Show(Exact):\n    name: str\n    description: str | None\n    actors: list[Actor]\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eNawh... I'm on an older version\u003c/b\u003e\u003c/summary\u003e\n\nOh, it's definitely okay! We got you covered 🔥🔥\n\n```python\nfrom typing import List, Optional\nfrom exacting import Exact\n\nclass Actor(Exact):\n    name: str\n    portrays: str\n\nclass Show(Exact):\n    name: str\n    description: Optional[str]\n    actors: List[Actor]\n```\n\n\u003c/details\u003e\n\n\u003cbr /\u003e\n\n**📦 Build 'em**:\n\n```python\n# (1) ✅ OK, exacting is happi\nShow(\n    name=\"Severance\",\n    description=\"great show\",\n    actors=[\n        Actor(name=\"Adam Scott\", portrays=\"Mark S.\"),\n        Actor(name=\"Britt Lower\", portrays=\"Helly R.\"),\n    ]\n)\n\n# (2) ❌ Nuh-uh, exacting is angri\nShow(\n    name=123,\n    description=False,\n    actors=[\n        \"Walter White\",\n        \"Jesse Pinkman\"\n    ]\n)\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e🔴 \u003cb\u003eValidationError: During validation of…\u003c/b\u003e\u003c/summary\u003e\n\n\n```python\nValidationError:\nDuring validation of dataclass Show at field 'name', got:\n  • Expected type \u003cclass 'str'\u003e, got \u003cclass 'int'\u003e\n```\n\n\u003c/details\u003e\n\n\u003cbr /\u003e\n\nNormally, when you use the parameters passed in example (2) above, the Python `dataclasses` library might as well just go with it, because they only put the additional **static typing** to the model, but not at **runtime**. Exacting makes sure that at both times, types are all enforced. It even gives you a detailed error message on where this occurs! (In a cool way)\n\nIt's worth noting that error generations are *lazy*, which means once Exacting finds out about a problem about a dataclass, it raises a `ValidationError`. This saves a lot of computation time if you have a larger model.\n\n![praise pydantic](https://github.com/user-attachments/assets/c322bff2-2624-479d-9967-7184580b36c1)\n\nYeah, we also got fields! Use it like how you'd expect it. Quite literally, lol.\n\n```python\nfrom exacting import Exact, field\n\n\ndef create_ai_slop():\n    return \"tick tock\"\n\nclass Comment(Exact):\n    user: str = field(regex=\"^@.+$\")\n    stars: int = field(minv=1, maxv=5)\n    body: str = field(default_factory=create_ai_slop)\n\n# ✅ OK, exacting is HYPED\nComment(\n    user=\"@waltuh\",\n    stars=5\n)\n\n# ❌ Hell nawh, exacting holdin' you at gunpoint\nComment(\n    user=\"ooga booga\",  # Regex validation '^@.+$' on str failed\n    stars=-1,  # Expected min value of 1, got -1\n    body=None  # Expected type \u003cclass 'str'\u003e, got \u003cclass 'NoneType'\u003e\n)\n```\n\nWoah! That's a lot of code to process. To put it simply, exacting supports:\n\n- **Regex** validation on `str`\n- **Min/max** validation on value (e.g., `int`, `float`) or length (e.g., `str`, `list`)\n- **Default** values or factory! Y'know, the old `dataclasses` way, mmmMMM\n- This is extra, but **custom** validation! You can make your own if you like\n\n![praise pydantic, exactign sucks](https://github.com/user-attachments/assets/5969c54a-14d0-4023-9f80-b89ae9ea8374)\n\nKind of, but somehow native performance is way better than Rust. That is, exacting is *generally* faster than Pydantic on a few benchmarks. Woooosh\n\nAnyway, thanks for sticking with us, you can [read the docs](https://aweirddev.github.io/exacting) if you'd like.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faweirddev%2Fexacting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faweirddev%2Fexacting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faweirddev%2Fexacting/lists"}