Skip to main content

requests extension for noseapp lib

Project description

Requests/Requests-Oauthlib extension for NoseApp library

Installation

pip install noseapp_requests

Usage

from noseapp.ext.requests import RequestsEx, make_config

endpoint = make_config()
endpoint.configure(
  base_url='http://httpbin.org/',
  key='httpbin'
)
endpoint.session_configure(
  always_return_json=True,
  raise_on_http_error=True
)
requests_ex = RequestsEx(endpoint)
api = requests_ex.get_endpoint_session('httpbin', auth=('user', 'pass'))
api.get('basic-auth/user/pass')
api.get('get', key1='val1') # GET with query-string parameters
api.post('post', key1='val1') # POST form-encoded data
api.post('post', {'key1': 'val1'}) # POST JSON data
api.get('status/400') # raises HTTPError

Documentation

http://noseapp-requests.readthedocs.org/

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

noseapp_requests-0.0.2.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file noseapp_requests-0.0.2.tar.gz.

File metadata

File hashes

Hashes for noseapp_requests-0.0.2.tar.gz
Algorithm Hash digest
SHA256 42ae018a8864a4471e0bfaa0e92088b6c84c9652a216a3f3974d897ea2249724
MD5 0e9d29e6969ed282718557e6f998d38f
BLAKE2b-256 8f4f8b9cf6f3a595cd1c021da1cc832d43b316993655db4cbe4812e19f1e2072

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page