{"id":42168893,"url":"https://github.com/mojtabaahn/fast-validate","last_synced_at":"2026-01-26T21:22:04.114Z","repository":{"id":62592058,"uuid":"499824515","full_name":"mojtabaahn/fast-validate","owner":"mojtabaahn","description":"fast data validation in python","archived":false,"fork":false,"pushed_at":"2022-06-26T09:44:57.000Z","size":22,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-13T16:50:16.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mojtabaahn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-04T12:48:56.000Z","updated_at":"2024-09-11T15:00:07.000Z","dependencies_parsed_at":"2022-11-04T07:19:32.015Z","dependency_job_id":null,"html_url":"https://github.com/mojtabaahn/fast-validate","commit_stats":null,"previous_names":["jsqtalent/fast-validate","mojtabaahn/fast-validate"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mojtabaahn/fast-validate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaahn%2Ffast-validate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaahn%2Ffast-validate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaahn%2Ffast-validate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaahn%2Ffast-validate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mojtabaahn","download_url":"https://codeload.github.com/mojtabaahn/fast-validate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaahn%2Ffast-validate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28788368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:13:08.818Z","status":"ssl_error","status_checked_at":"2026-01-26T21:13:08.448Z","response_time":59,"last_error":"SSL_read: 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":[],"created_at":"2026-01-26T21:22:03.380Z","updated_at":"2026-01-26T21:22:04.102Z","avatar_url":"https://github.com/mojtabaahn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Packagist License](https://img.shields.io/pypi/l/fastvalidate?style=for-the-badge)\n![GitHub repo size](https://img.shields.io/github/repo-size/mojtabaahn/fast-validate?style=for-the-badge)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/fastvalidate?style=for-the-badge)\n![PyPI](https://img.shields.io/pypi/v/fastvalidate?style=for-the-badge)\n\n#### Requirements\n\n- Python 3.6+\n\n#### Installation \u0026 Upgrade\n\n```shell\npip install fastvalidate --upgrade\n```\n\n#### Dictionary Validation\n\n```python\nfrom fastvalidate import Validator\n\nvalidator = Validator({\n    'first_name': 'Mo',\n    'last_name': None,\n    'age': '5',\n    'email': 'mojtabaa.hn@gmail',\n    'website': 'yup',\n    'languages': ['en', 'fa'],\n}, {\n    'first_name': 'required|min:3',\n    'last_name': 'required|min:3',\n    'age': 'required|numeric|gt:10|lt:120',\n    'email': 'required|email',\n    'website': 'required|url',\n    'languages': 'required|list|min:3'\n})\n\nvalidator.validate().errors()\n# {\n#     'first_name': 'Field length must be at least 3 characters',\n#     'last_name': 'Field is required',\n#     'age': 'Field must be greater than 10',\n#     'email': 'Field must be email',\n#     'website': 'Field must be url',\n#     'languages': 'Field must have at least 3 items'\n# }\n```\n\n#### Pydantic Validation\n\n```python\nfrom fastvalidate import BaseModel\n\n\nclass User(BaseModel):\n    email: str\n    website: str\n\n    class Config:\n        rules = dict(\n            email='required|email|min:3',\n            website='required|url|min:3'\n        )\n\n\nuser = User(email='whatever', website='whoever')\n# ValidationError\n# [\n#     dict(loc=('email',), msg='Field must be email', type='value_error'),\n#     dict(loc=('website',), msg='Field must be url', type='value_error')\n# ]\n\n```\n\n#### Available Rules\n\n| Type               | Applicable              On         | signature                                        |\n| ----               | ----                               | ----                                             |\n| Boolean            | string, boolean                    | `bool`, `boolean`                                |\n| Numeric            | string, integer                    | `numeric`, `int`, `integer`                      |\n| List               | string(json), list                 | `list`, `array`                                  |\n| Dictionary         | string(json), dict                 | `dict`                                           |\n| Email              | string                             | `email`                                          |\n| Password           | string                             | `password`                                       |\n| RegEx              | string                             | `regex:\u003cpattern\u003e`                                |\n| URL                | string                             | `url`                                            |\n| Length             | string, integer, float, list, dict | `len:\u003clength\u003e`, `length:\u003clength\u003e`                |\n| Min                | string, integer, float, list, dict | `min:\u003cthreshold\u003e`                                |\n| Max                | string, integer, float, list, dict | `max:\u003cthreshold\u003e`                                |\n| Choice             | string                             | `choice:\u003cx\u003e,\u003cy\u003e,\u003cz\u003e` `in:\u003cx\u003e,\u003cy\u003e,\u003cz\u003e`            |\n| Greater Than       | int                                | `gt:\u003cthreshold\u003e`                                 |\n| Greater Than Equal | int                                | `gte:\u003cthreshold\u003e`                                |\n| Less Than          | int                                | `lt:\u003cthreshold\u003e`                                 |\n| Less Than Equal    | int                                | `lte:\u003cthreshold\u003e`                                |\n| Alpha              | string                             | `alpha`                                          |\n| Alpha Numeric      | string                             | `alpha_num`,`alpha_numeric`                      |\n| Alpha Num Dash     | string                             | `alpha_dash`                                     |\n| Date               | string                             | `date`                                           |\n| UUID               | string                             | `uuid`                                           |\n| IPV4               | string                             | `ipv4`                                           |\n| IPV6               | string                             | `ipv6`                                           |\n| IP                 | string                             | `ip`                                             |\n| Mac Address        | string                             | `mac`,`mac_address`                              |\n\n#### Testing\n\n```bash\n# install pytest\npip install pytest\n\n# run tests\npython -m pytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmojtabaahn%2Ffast-validate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmojtabaahn%2Ffast-validate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmojtabaahn%2Ffast-validate/lists"}