{"id":15403184,"url":"https://github.com/woodruffw/cazart","last_synced_at":"2025-04-16T03:13:30.380Z","repository":{"id":52406500,"uuid":"203000926","full_name":"woodruffw/cazart","owner":"woodruffw","description":"Flask + schema = cazart!","archived":false,"fork":false,"pushed_at":"2021-06-28T00:09:33.000Z","size":22,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-16T03:13:23.051Z","etag":null,"topics":["flask","jsonschema","validation"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/cazart/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/woodruffw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-18T12:34:53.000Z","updated_at":"2021-06-28T00:09:36.000Z","dependencies_parsed_at":"2022-08-28T18:13:34.626Z","dependency_job_id":null,"html_url":"https://github.com/woodruffw/cazart","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodruffw%2Fcazart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodruffw%2Fcazart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodruffw%2Fcazart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodruffw%2Fcazart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/woodruffw","download_url":"https://codeload.github.com/woodruffw/cazart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249188428,"owners_count":21227015,"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":["flask","jsonschema","validation"],"created_at":"2024-10-01T16:06:40.352Z","updated_at":"2025-04-16T03:13:30.347Z","avatar_url":"https://github.com/woodruffw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"cazart\n======\n\n![license](https://raster.shields.io/badge/license-MIT%20with%20restrictions-green.png)\n[![Build Status](https://img.shields.io/github/workflow/status/woodruffw/cazart/CI/master)](https://github.com/woodruffw/cazart/actions?query=workflow%3ACI)\n\n*Flask + schema = cazart!*\n\n**cazart** is a small helper for writing schematized JSON endpoints with Flask. It rolls\n[schema](https://github.com/keleshev/schema) into Flask's `route` decorator, allowing\nfor one-shot route and schema specification.\n\n## Installation\n\n**cazart** requires Python 3.6 or newer.\n\n```bash\npip3 install cazart\n```\n\n## Usage\n\nTo use **cazart**, just swap your `Flask` instance out for a `Cazart` one:\n\n```python\nfrom cazart import Cazart\n\napp = Cazart(__name__)\n```\n\nYou can access all of Flask's baseline functionality (including non-validated routes)\nvia `app.flask`.\n\nThen, use `app.route` to specify a combination route and schema:\n\n```python\nfrom cazart import Cazart\nfrom schema import Schema, Or\n\napp = Cazart(__name__)\n\n\n@app.route(\"/cazart\", schema=Schema({\"name\": Or(\"alice\", \"bob\", \"mary\")}))\ndef cazart(res):\n    print(f\"my verified payload is {res}!\")\n    return (\"ok\", 200)\n```\n\nSee the [examples](./example) for full usage examples, including custom error handling\nand dispatching to different schemas on a route based on HTTP method.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoodruffw%2Fcazart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoodruffw%2Fcazart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoodruffw%2Fcazart/lists"}