Library for maintaining tracked requests sessions
Project description
fry
All right! I'm a delivery boy!
Description
Fry is an extension of the python requests library built to better manage service-level http interactions.
- Manages dependency settings within the Session object, lessening the amount of overhead boilerplate code
- Dependency settings include retry count and timeout; split per host
- Given a statsd object, will also record and report stats per request; split per endpoint
StatsD libraries currently supported:
- datadog
Usage
import fry
adapter_settings = {
'http://www.example.com': {
'retry': {
'total': 3,
'read': 3
},
'adapter': {
'pool_maxsize': 4,
},
'adapter_config': {
'timeout': 0.5
}
}
}
fsession = fry.FrySession(stats_client=DogStatsd('example'), adapter_settings=adapter_settings)
signature = 'hostname.endpoint'
request_params = {'test': 'value'}
response = fsession.make_request('GET', 'http://www.example.com', signature, params=request_params)
Development
Update the version when updating the library in: fry/__init__.py
Build the library locally: python setup.py sdist
Change Log
0.2.0
- Support for datadog statsd api
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
fry-0.2.0.tar.gz
(4.7 kB
view details)
File details
Details for the file fry-0.2.0.tar.gz
.
File metadata
- Download URL: fry-0.2.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76ee45d30a444151cf72193b7dcde03cbf0255a6be3db179c08b462d96661fb3 |
|
MD5 | 06aa15c1c31bdaa3528d24a924a2bfe4 |
|
BLAKE2b-256 | 8234e68a4a6b6ff16cef2b5b298ba5df165b08727a084e27cfd6680194fb92e0 |