https://github.com/ikeikeikeike/tastypie-queryset-client
Client for Tastypie. Provide operation similar to the Django Model API .
https://github.com/ikeikeikeike/tastypie-queryset-client
Last synced: about 1 month ago
JSON representation
Client for Tastypie. Provide operation similar to the Django Model API .
- Host: GitHub
- URL: https://github.com/ikeikeikeike/tastypie-queryset-client
- Owner: ikeikeikeike
- License: mit
- Created: 2012-06-28T22:22:14.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-02-20T00:30:45.000Z (over 12 years ago)
- Last Synced: 2025-05-09T12:23:41.271Z (about 1 month ago)
- Language: Python
- Homepage: http://ikeikeikeike.github.com/tastypie-queryset-client/
- Size: 318 KB
- Stars: 16
- Watchers: 4
- Forks: 11
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.rst
- License: LICENSE
Awesome Lists containing this project
README
Tastypie Queryset Client
========================Client for [Tastypie](https://github.com/toastdriven/django-tastypie). Provide operation similar to the Django Model API .
Usage
=====Get
------
```python
>>> client = Client("http://api.server.com/your/v1/")
>>> client.your.objects.get(name="your")```
Count
------
```python
>>> client = Client("http://api.server.com/your/v1/")
>>> client.your.objects.count()
100
```Filter
------
```python
>>> client = Client("http://api.server.com/your/v1/")
>>> client.your.objects.filter(name="your")
(3/3)>
```Save
----
```python
>>> client = Client("http://api.server.com/your/v1/")
>>> your = client.your(name="name")
>>> your>>> your.save() # save Your object.
>>> your```
Delete
------
```python
>>> client = Client("http://api.server.com/your/v1/")
>>> message = client.message(subject="subject delete 1", body="body delete 1")
>>> message.save()
>>> message.id>>> message.delete() # remove Message object.
>>> try:
>>> message.id
>>> except AttributeError:
>>> assert True # throw AttributeError.
```Requirements
=============Tastypie: [Over the 0.9.12-alpha](https://github.com/toastdriven/django-tastypie/commit/daca57ad5f62afcf1ffacaaf77bc3715a1b9a04f).
Setup
=====
```bash
$ pip install tastypie-queryset-client
```Documentation
==============[tastypie-queryset-client.readthedocs.org](http://tastypie-queryset-client.readthedocs.org)
License
=======
MIT License