Giter Site home page Giter Site logo

fry's Introduction

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

fry's People

Contributors

laundrybox avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.