Integrates ripozo with django for fast, flexible Hypermedia, HATEOAS, and other REST apis.
Full django-ripozo documentation
Looking for the ripozo documentation?
Minimal App
You’ll need to instantiate the django project in the standard manner. If you aren’t sure how to do this, check out the excellent django documentation.
In your app you’ll need a resources.py file.
from ripozo import ResourceBase, apimethod
class MyResource(ResourceBase):
@apimethod(methods=['GET'])
def say_hello(cls, request):
return cls(properties=dict(hello='world'))
And in your urls.py file
from ripozo.adapters import SirenAdapter, HalAdapter
from .resources import MyResource
dispatcher = DjangoDispatcher()
dispatcher.register_resources(MyResource)
dispatcher.register_adapters(SirenAdapter, HalAdapter)
urlpatterns = dispatcher.url_patterns
And just like that you have a fully functional application.
Looking for a more extensive example? Check out an example with database interactions as well.
Metadata
Release files for django-ripozo 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-ripozo-1.0.0.tar.gz | 14.4 kB | Details |
Release files / django-ripozo-1.0.0.tar.gz
| Download URL | django-ripozo-1.0.0.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f6ca8f71ee9b856c4ec1a0b7d29b4535a7ad62dbd4dea8d44d095fc59f133b2
|
|
BLAKE2b-256 checksum How to use checksums |
379e293ab91fb1140b5f4d369f4376ae6cbc45b690e4f4e5b6ca75bfba484f9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |