{"id":15442906,"url":"https://github.com/hendrikboeck/parasite","last_synced_at":"2026-02-11T00:03:29.843Z","repository":{"id":243076750,"uuid":"811440922","full_name":"hendrikboeck/parasite","owner":"hendrikboeck","description":"Typescripts zod for Python 3.11+ (WIP)","archived":false,"fork":false,"pushed_at":"2024-07-04T11:08:36.000Z","size":419,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-22T23:56:38.705Z","etag":null,"topics":["data-validation","pip","poetry-python","python","python-3","python-3-11","python-3-12","python-package","python3","zod","zod-validation"],"latest_commit_sha":null,"homepage":"https://hendrikboeck.github.io/parasite/","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/hendrikboeck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2024-06-06T15:50:05.000Z","updated_at":"2024-07-04T11:05:53.000Z","dependencies_parsed_at":"2024-06-23T19:47:09.474Z","dependency_job_id":"ee4f491e-96e8-4bfa-b504-d17cf7123593","html_url":"https://github.com/hendrikboeck/parasite","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"8da37068265771e8a6e3c9358ac93f1a95d5732b"},"previous_names":["hendrikboeck/parasite"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/hendrikboeck/parasite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendrikboeck%2Fparasite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendrikboeck%2Fparasite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendrikboeck%2Fparasite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendrikboeck%2Fparasite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hendrikboeck","download_url":"https://codeload.github.com/hendrikboeck/parasite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendrikboeck%2Fparasite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29322733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"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":["data-validation","pip","poetry-python","python","python-3","python-3-11","python-3-12","python-package","python3","zod","zod-validation"],"created_at":"2024-10-01T19:31:28.137Z","updated_at":"2026-02-11T00:03:29.805Z","avatar_url":"https://github.com/hendrikboeck.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Stars][stars-shield]\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n[![Code Coverage][coverage-shield]](#code-coverage)\n\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://github.com/hendrikboeck/parasite\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/hendrikboeck/parasite/main/.github/parasite_logo.png\" alt=\"Logo\" width=\"128\" height=\"128\"\u003e\n\u003c/a\u003e\n\n\u003ch1 align=\"center\"\u003eparasite \u003ccode\u003ev0.1.10\u003c/code\u003e\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ccode\u003ezod\u003c/code\u003e inspired library for Python 3.11+\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/hendrikboeck/parasite/issues/new?labels=bug\u0026template=bug-report---.md\"\u003eReport Bug\u003c/a\u003e\n    |\n    \u003ca href=\"https://github.com/ohendrikboeck/parasite/issues/new?labels=enhancement\u0026template=feature-request---.md\"\u003eRequest Feature\u003c/a\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\n\u003e [!WARNING]\n\u003e\n\u003e This library is under active development, expect things to break or not to work as expected.\n\u003e Creating an issue for bugs you encounter would be appreciated. Documentation is currently work in\n\u003e progress.\n\n## Table of Contents\n\n- [Why?](#why)\n- [What about the name?](#what-about-the-name)\n- [Getting Started](#getting-started)\n  - [Installing](#installing)\n  - [Example usage](#example-usage)\n- [Documentation](#documentation)\n- [Code Coverage](#code-coverage)\n- [License (_MIT License_)](#license-mit-license)\n\n## Why?\n\nData and object validation in Python is essential to ensure that the inputs to a program are\naccurate and adhere to expected formats, thereby preventing runtime errors and enhancing code\nreliability. The TypeScript library `zod` offers a concise and expressive syntax for schema\nvalidation, making it easier to define and enforce data structures. Implementing a similar library\nin Python would greatly benefit developers by providing a streamlined, declarative approach to\nvalidation, reducing boilerplate code and improving maintainability. This would facilitate more\nrobust data handling and enhance the overall quality of Python applications.\n\n## What about the name?\n\nI chose the name \"Parasite\" for this library because it draws heavy inspiration from the TypeScript\n`zod` library, which excels in schema validation with its concise and expressive syntax. The name\n\"Parasite\" is also a nod to one of Superman's iconic supervillains, serving as an homage to the\nlibrary that inspired this creation.\n\n## Getting Started\n\n### Installing\n\nInstall using `pip`:\n\n```sh\npip install parasite\n```\n\nInstall using `poetry` CLI:\n\n```sh\npoetry add parasite\n```\n\nor using `pyproject.toml`:\n\n```toml\n[tool.poetry.dependencies]\nparasite = \"^0.1.0\"\n```\n\n### Example usage\n\n```python\nfrom parasite import p\n\nschema = p.obj({\n    \"name\": p.string().required(),\n    \"age\": p.number().integer().min(0).optional(),\n}).strip()\n\ndata = {\n    \"name\": \"John Doe\",\n    \"age\": 42,\n    \"extra\": \"This will be stripped\",\n}\n\nschema.parse(data)   # {\"name\": \"John Doe\", \"age\": 42}\nschema.parse({})   # ValidationError: Missing required key: \"name\"\n```\n\n## Documentation\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e You can find the sphinx online documentation [here](https://hendrikboeck.github.io/parasite)!\n\n## Code Coverage\n\n\n\n```\n---------- coverage: platform linux, python 3.11.9-final-0 -----------\nName                       Stmts   Miss  Cover\n----------------------------------------------\nsrc/parasite/__init__.py      22      0   100%\nsrc/parasite/_const.py        17      0   100%\nsrc/parasite/_utils.py         7      0   100%\nsrc/parasite/any.py           27      0   100%\nsrc/parasite/array.py         70      0   100%\nsrc/parasite/boolean.py       72      0   100%\nsrc/parasite/errors.py         1      0   100%\nsrc/parasite/never.py         18      0   100%\nsrc/parasite/null.py          29      0   100%\nsrc/parasite/number.py       106      0   100%\nsrc/parasite/object.py        93      0   100%\nsrc/parasite/string.py       207      0   100%\nsrc/parasite/type.py          29      0   100%\nsrc/parasite/variant.py       61      0   100%\n----------------------------------------------\nTOTAL                        759      0   100%\n```\n\n\n## License (_MIT License_)\n\nCopyright (c) 2024, Hendrik Böck \u003c\u003chendrikboeck.dev@protonmail.com\u003e\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n[license-shield]: https://img.shields.io/github/license/hendrikboeck/parasite?style=for-the-badge\n[license-url]: https://github.com/hendrikboeck/parasite/blob/main/LICENSE\n[issues-shield]: https://img.shields.io/github/issues/hendrikboeck/parasite?style=for-the-badge\n[issues-url]: https://github.com/hendrikboeck/parasite/issues\n[forks-shield]: https://img.shields.io/github/forks/hendrikboeck/parasite?style=for-the-badge\n[forks-url]: https://github.com/hendrikboeck/parasite/forks\n[contributors-shield]: https://img.shields.io/github/contributors/hendrikboeck/parasite?style=for-the-badge\n[contributors-url]: https://github.com/hendrikboeck/parasite/contributors\n[stars-shield]: https://img.shields.io/github/stars/hendrikboeck/parasite?style=for-the-badge\n[coverage-shield]: https://img.shields.io/badge/Code%20Coverage-100%25-brightgreen.svg?style=for-the-badge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhendrikboeck%2Fparasite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhendrikboeck%2Fparasite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhendrikboeck%2Fparasite/lists"}