Skip to main content

Library for maintaining tracked requests sessions

Project description

fry

All right! I'm a delivery boy!

Image of Fry

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


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)

Uploaded Source

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

Hashes for fry-0.2.0.tar.gz
Algorithm Hash digest
SHA256 76ee45d30a444151cf72193b7dcde03cbf0255a6be3db179c08b462d96661fb3
MD5 06aa15c1c31bdaa3528d24a924a2bfe4
BLAKE2b-256 8234e68a4a6b6ff16cef2b5b298ba5df165b08727a084e27cfd6680194fb92e0

See more details on using hashes here.

Supported by

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