Human friendly HTTP client for RESTful APIs
Project description
resourceful
Human friendly HTTP client for RESTful APIs
Usage
>>> import resourceful
>>> solaire = resourceful.API(url='https://api.le-systeme-solaire.net/rest')
>>> bodies = solaire.resource('bodies')
>>> bodies.url
'https://api.le-systeme-solaire.net/rest/bodies'
>>> solaire.bodies.url
'https://api.le-systeme-solaire.net/rest/bodies'
>>> rsp = bodies.get()
>>> rsp.json()
{
"bodies": [
{
"id": "lune",
"name": "La Lune",
"englishName": "Moon",
"isPlanet": false,
"moons": null,
"semimajorAxis": 384400,
"perihelion": 363300,
"aphelion": 405500,
"eccentricity": 0.0549,
"inclination": 5.145,
"mass": {
"massValue": 7.346,
"massExponent": 22
},
"vol": {
"volValue": 2.1968,
"volExponent": 10
},
"density": 3.344,
"gravity": 1.62,
"escape": 2380,
...
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
resourceful-0.1.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for resourceful-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7a548b26c04150784cdf4d0326bac60b71849c4b382b9be7a5591843d11036b |
|
MD5 | edab170e4ee3ed7e1d6aebb22cbf7812 |
|
BLAKE2b-256 | 2218bec608041d6358e88766d59b860182cfdb122f0f81162e9fb71434610347 |