/eve-requests

Client SDK for RESTful web services powered by the Eve REST framework

Primary LanguagePythonOtherNOASSERTION

Eve-Requests

Client SDK for Eve-powered RESTful APIs.

Usage

from eve_requests import Client, Settings

settings = Settings()
settings.base_url = "https://eve-demo.herokuapp.com"

# or let the settings auto-configure by downloading and parsing 
# the remote OpenAPI specification (needs Eve-Swagger extension 
# on the server). Currently raises NotImplemntedError.
#
# settings = Settings.from_url('https://myapi/docs/swagger.json')

client = Client(settings)
json = {"firstname": "john", "lastname": "doe"}

r = client.post("people", json, auth=('user','pw'))

print(r.status_code)    # 201
print(r.json())         # { ... }

Current State

(very) early development. Feedback and contributors welcome.

License

Eve-Requests is a Nicola Iarocci open source project, distributed under the BSD license.