Skip to main content

Resource centered REST API clients

Project description

PyPI latest CI Status

Resource centered REST API clients

Ideas on how to use

Not all features stated in the following examples are implemented. This section serves only as motivation for future functionalities.

import resources

class PersonResource(resources.Resource):
    class Meta:
        base_endpoint = ''

class PageResource(resources.Resource):
    class Meta:
        endpoints = {
            'delete': '{}/'
            'filter': ''
            'get': '{}/'
            'patch': '{}/'
            'post': ''
            'put': ''

    owner = resources.RelatedField(
        source_field='owner_url',  # default is owner_id
        auto_follow=True,  # default is False

    comments = resources.MultipleRelatedField(

# GET / single
person = Person.objects.get(pk=1)

# GET / list
person_reqset = Person.objects.filter(age=18)
for person in person_reqset:  # lazy request

person = Person.objects.create(name='John Doe', age=18)

person.age = 20

person = Person.objects.update_or_create(name='John Doe', age=30)

Project details

Release history Release notifications

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
resources-0.0.1.tar.gz (3.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page