Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tchx84/grestful
gRESTful helps you integrate RESTful web services with your Glib2 code
https://github.com/tchx84/grestful
Last synced: about 1 month ago
JSON representation
gRESTful helps you integrate RESTful web services with your Glib2 code
- Host: GitHub
- URL: https://github.com/tchx84/grestful
- Owner: tchx84
- License: lgpl-2.1
- Created: 2013-06-23T20:04:16.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-03T02:52:48.000Z (about 11 years ago)
- Last Synced: 2024-10-15T23:35:19.980Z (3 months ago)
- Language: Python
- Homepage:
- Size: 133 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
## gRESTful
gRESTful helps you integrate RESTful web services with your Glib2 code.### Example
This is a quick example for the TinyUrl RESTful API. Yes, that is all you
need. Check the examples directory for the full example.class TinyUrl(Object):
CREATE_URL = 'http://tiny-url.info/api/v1/create'
@asynchronous
@check_is_not_created
def create(self, url):
self._post(self.CREATE_URL, self._params(url))
def _params(self, url):
params = [
('apikey', 'INSERT_YOURS'),
('provider', '0_mk'),
('format', 'json'),
('url', url)]
return paramsFor a more complex example check https://github.com/tchx84/journalx-gobject.
### Dependencies
* python 2.7.x
* pygobject3
* pycurl### Features
* Asynchronous to the bone.
* Access RESTful resources just as if they were GObject-based objects.
* Extremely easy to use.### Development
* Feel free to hack it and send pull requests ;)