Skip to main content

Django-based REST API Framework

Project description

# Rinzler REST Framework

Django-based REST Framework

# Requires

```PHP
pip install rinzler
```

# Usage
```Python

# urls.py
from your_controller import Controller
from rinzler.core.url_assembler import UrlAssembler

assembler = UrlAssembler()

urlpatterns = [
assembler.mount('', Controller)
]


# your_controller.py

from django.http.request import HttpRequest
from django.views.generic import TemplateView

from rinzler.core.response import Response

class Controller(TemplateView):

def connect(self, app):

router = app['router']

router.get('/', self.hello_world)
return app

# end-point callbacks here:
@staticmethod
def hello_world(request: HttpRequest, app: dict(), **params: dict):
"""
Default route callback
:param request HttpRequest
:param app Rinzler's object
:param params dict url params, if present
:rtype: Response
"""
response = {
"status": True,
"data": "Hello World!"
}

return Response(response, content_type="application/json")
```


Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

rinzler-1.14.0-py2.py3-none-any.whl (9.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file rinzler-1.14.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for rinzler-1.14.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 185a6a0e7de34c076dc2d9aaf461ecdbc1402ad7a47d8b3414a01f3e3a9c6f16
MD5 e181a8fb1b9614bc23378750b3f280ee
BLAKE2b-256 80251a0ab21b39e916e07e22ae14f44ac3a6234aceca98c366f1d7180e309f89

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page