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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file noseapp_requests-0.0.2.tar.gz.
File metadata
- Download URL: noseapp_requests-0.0.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42ae018a8864a4471e0bfaa0e92088b6c84c9652a216a3f3974d897ea2249724
|
|
| MD5 |
0e9d29e6969ed282718557e6f998d38f
|
|
| BLAKE2b-256 |
8f4f8b9cf6f3a595cd1c021da1cc832d43b316993655db4cbe4812e19f1e2072
|