Skip to content

Requests-based client that automatically manages cache headers

License

Notifications You must be signed in to change notification settings

tarekziade/restjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

restjson

NOT RELEASED YET

A Client for flask_restless-based RESTful HTTP services.

Based on Requests, restjson implements a few extra features:

  • uses ultrajson for encoding/decoding data
  • local disk cache based on the ETag and If-None-Match header
  • replay queries on networks errors
  • Automatic If-Match support on PUT, DELETE & PATCH queries

Quick Start

Getting one entry:

>>> from restjson.client import Client
>>> c = Client('http://localhost:5001/api/')
>>> import pprint
>>> pprint.pprint(c.get_entry('user', 2))
{'editor': True,
'email': '[email protected]',
'firstname': 'Tarek',
'github': 'tarekziade',
'id': 2,
'last_modified': None,
'lastname': 'Ziade',
'mozqa': True}

About

Requests-based client that automatically manages cache headers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published