Skip to main content

Tastypie Queryset Client

Client for Tastypie. Provide operation similar to the Django Model API .

This is a fork of original project modified to run under python >=3.3

Usage

Get

>>> client = Client("http://api.server.com/your/v1/")
>>> client.your.objects.get(name="your")
<your: {u"id": u"1", u"name": u"your", u"status": u"any"}>

Count

>>> client = Client("http://api.server.com/your/v1/")
>>> client.your.objects.count()
100

Filter

>>> client = Client("http://api.server.com/your/v1/")
>>> client.your.objects.filter(name="your")
<QuerySet <class 'Response'> (3/3)>

Save

>>> client = Client("http://api.server.com/your/v1/")
>>> your = client.your(name="name")
>>> your
<your: {u"name": u"name"}>
>>> your.save()  # save Your object.
>>> your
<your: {u"id": u"2", u"name": u"name"}>

Delete

>>> client = Client("http://api.server.com/your/v1/")
>>> message = client.message(subject="subject delete 1", body="body delete 1")
>>> message.save()
>>> message.id
<message: {u"id": u"1", u"subject": u"subject delete 1", u"body": u"body delete 1"}>
>>> message.delete()  # remove Message object.
>>> try:
>>>     message.id
>>> except AttributeError:
>>>     assert True  # throw AttributeError.

Setup

$ pip install tastypie-queryset-client

Documentation

tastypie-queryset-client.readthedocs.org

License

MIT License

Metadata

Release files for tastypie-queryset-client-p3k 0.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tastypie-queryset-client-p3k 0.7.2
File Size Uploaded Provenance
tastypie-queryset-client-p3k-0.7.2.tar.gz 23.6 kB Without provenance Details

Release files / tastypie-queryset-client-p3k-0.7.2.tar.gz

Download URL tastypie-queryset-client-p3k-0.7.2.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
06742b8e6df5dede57963a249db0c4ea3f3212b7f6218227a6ed32222db0da18
BLAKE2b-256 checksum
How to use checksums
b02c8ab73d132a272b4d2f8de901cb11bb00c46188de5ab71e31b7be1f1d04e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for tastypie-queryset-client-p3k 0.7.2

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.

Release history Release notifications | RSS feed

This release

0.7.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page