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.2.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for resourceful-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95471b309cc8b9de3d1034f454d41b2612309cfe4de9e02597fbcfbb14583407 |
|
MD5 | e46f7006968a2b6a42bf2de8af72f7b0 |
|
BLAKE2b-256 | 6898821b267d9aca9de6bc026b59782ce229b0d0ea4f0540e0446bb201ecbe34 |