{"id":13705616,"url":"https://nf1s.github.io/sanic-camelcase-middleware/","last_synced_at":"2025-05-05T16:33:21.953Z","repository":{"id":39761676,"uuid":"239349547","full_name":"nf1s/sanic-camelcase-middleware","owner":"nf1s","description":"Middleware for camelizing request and response bodies for sanic","archived":true,"fork":false,"pushed_at":"2022-12-08T12:40:29.000Z","size":854,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-02T04:10:04.720Z","etag":null,"topics":["middleware","mkdocs","python","python3","python36","sanic","sanic-framework","sanic-middleware"],"latest_commit_sha":null,"homepage":"https://ahmednafies.github.io/sanic_camelcase_middleware/","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/nf1s.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-09T18:04:40.000Z","updated_at":"2024-07-20T10:00:44.000Z","dependencies_parsed_at":"2023-01-25T04:30:29.999Z","dependency_job_id":null,"html_url":"https://github.com/nf1s/sanic-camelcase-middleware","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nf1s%2Fsanic-camelcase-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nf1s%2Fsanic-camelcase-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nf1s%2Fsanic-camelcase-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nf1s%2Fsanic-camelcase-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nf1s","download_url":"https://codeload.github.com/nf1s/sanic-camelcase-middleware/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224455896,"owners_count":17314201,"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":["middleware","mkdocs","python","python3","python36","sanic","sanic-framework","sanic-middleware"],"created_at":"2024-08-02T22:00:44.966Z","updated_at":"2024-11-13T13:30:43.262Z","avatar_url":"https://github.com/nf1s.png","language":"Python","funding_links":[],"categories":["Extensions"],"sub_categories":["Utils"],"readme":"# Sanic Camelcase Middleware\n\n[![CircleCI](https://circleci.com/gh/nf1s/sanic-camelcase-middleware.svg?style=shield)](https://circleci.com/gh/nf1s/sanic-camelcase-middleware) [![codecov](https://codecov.io/gh/nf1s/sanic-camelcase-middleware/branch/master/graph/badge.svg)](https://codecov.io/gh/nf1s/sanic-camelcase-middleware) [![Downloads](https://pepy.tech/badge/sanic-camelcase-middleware)](https://pepy.tech/project/sanic-camelcase-middleware) ![GitHub Pipenv locked Python version](https://img.shields.io/github/pipenv/locked/python-version/nf1s/sanic-camelcase-middleware) ![GitHub](https://img.shields.io/github/license/nf1s/sanic-camelcase-middleware)\n\nMiddleware for camelizing request and response bodies for sanic\n\nFull documentation can be found [here](https://nf1s.github.io/sanic-camelcase-middleware/)\n\n## How to install\n\n```bash\n    pip install sanic-camelcase-middlware\n```\n\n### Example\n\n```python\n    from sanic import Sanic\n    from sanic_camelcase_middleware import Camelize\n\n    app = Sanic(__name__)\n    Camelize(app)\n```\n\n### Full example\n\n```python\n    from sanic import Sanic\n    from sanic.response import json\n    from sanic_camelcase_middleware import Camelize\n\n    app = Sanic(__name__)\n\n    Camelize(app)\n\n\n    @app.route(\"/post\", methods=[\"POST\"])\n    async def test(request):\n        return json(\"is_camelcase\": True, \"message\": request.json})\n\n\n    if __name__ == \"__main__\":\n        app.run(host=\"0.0.0.0\", port=8000)\n```\n\n### To disable the middleware for request payload\n\n```python\n    from sanic import Sanic\n    from sanic_camelcase_middleware import Camelize\n\n    app = Sanic(__name__)\n\n    # default `decamelize_request=True`\n    Camelize(app, decamelize_request=False)\n\n```\n\n### To disable the middleware for response body\n\n```python\n    from sanic import Sanic\n    from sanic_camelcase_middleware import Camelize\n\n    app = Sanic(__name__)\n\n    # default `camelize_response=True`\n    Camelize(app, camelize_response=False)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/nf1s.github.io%2Fsanic-camelcase-middleware%2F","html_url":"https://awesome.ecosyste.ms/projects/nf1s.github.io%2Fsanic-camelcase-middleware%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/nf1s.github.io%2Fsanic-camelcase-middleware%2F/lists"}