Sanic Camelcase Middleware
Middleware for camelizing request and response bodies for sanic
Full documentation can be found here
How to install
pip install sanic-camelcase-middlware
Example
from sanic import Sanic
from sanic_camelcase_middleware import Camelize
app = Sanic(__name__)
Camelize(app)
Full example
from sanic import Sanic
from sanic.response import json
from sanic_camelcase_middleware import Camelize
app = Sanic(__name__)
Camelize(app)
@app.route("/post", methods=["POST"])
async def test(request):
return json("is_camelcase": True, "message": request.json})
if __name__ == "__main__":
app.run(host="0.0.0.0", port=8000)
To disable the middleware for request payload
from sanic import Sanic
from sanic_camelcase_middleware import Camelize
app = Sanic(__name__)
# default `decamelize_request=True`
Camelize(app, decamelize_request=False)
To disable the middleware for response body
from sanic import Sanic
from sanic_camelcase_middleware import Camelize
app = Sanic(__name__)
# default `camelize_response=True`
Camelize(app, camelize_response=False)
Metadata
Release files for sanic-camelcase-middleware 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sanic_camelcase_middleware-1.3.1.tar.gz | 3.3 kB | Without provenance | Details for sanic_camelcase_middleware-1.3.1.tar.gz |
Release files / sanic_camelcase_middleware-1.3.1.tar.gz
| Download URL | sanic_camelcase_middleware-1.3.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55346b972f632d3ebdac650c86a9b15cc9e5dff01bb26864d0174a0488632b6c
|
|
BLAKE2b-256 checksum How to use checksums |
a01ac34b98c9883832fadf51313cbaa8ad0fc91747401ef9652c17990e29222c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/0.23 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.7.5
|
Security for sanic-camelcase-middleware 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.