Skip to main content

Integrates ripozo with django for fast, flexible Hypermedia, HATEOAS, and other REST apis

Project description

test status test coverage documentation status

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.

Project details


Download files

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

Source Distribution

django-ripozo-1.0.0.tar.gz (14.4 kB view details)

Uploaded Source

File details

Details for the file django-ripozo-1.0.0.tar.gz.

File metadata

File hashes

Hashes for django-ripozo-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5f6ca8f71ee9b856c4ec1a0b7d29b4535a7ad62dbd4dea8d44d095fc59f133b2
MD5 babd583cb88b6591ea775c2fc23080c7
BLAKE2b-256 379e293ab91fb1140b5f4d369f4376ae6cbc45b690e4f4e5b6ca75bfba484f9f

See more details on using hashes here.

Supported by

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