Skip to main content

Intelligent asynchronous HTTP client

Project description

https://travis-ci.org/Yelp/fido.svg?branch=master https://coveralls.io/repos/Yelp/fido/badge.svg PyPi version

Introduction

Fido is a simple, asynchronous HTTP client built on top of Crochet, Twisted and concurrent.futures. It is intended to be used in environments where there is no event loop, and where you cannot afford to spin up lots of threads (otherwise you could just use a ThreadPoolExecutor).

Here is an example of using Fido:

future = fido.fetch('http://www.foo.bar')
# Work happens in a background thread...
response = future.result(timeout=2)
print response.body

Frequently Asked Questions

Do you support SSL?

Yes, although this has not been vetted by security professionals. One should use this functionality at their own risk. In more detail: Fido uses the Twisted defaults, which delegate to pyOpenSSL and service_identity for the actual SSL work.

Is the API stable?

Probably not. However, it is currently very simple, so it shouldn’t be hard to upgrade code if there’s a non backwards-compatible change.

Do I need to initialize Crochet?

No, crochet.setup is automatically invoked by fido.fetch.

How do I use an http_proxy?

Just set the http_proxy (all lowercase) environment variable to the URL of the http proxy before starting your python process.

Example:

$ export http_proxy="http://localhost:8000"
$ python -c "import fido; print fido.fetch("http://www.yelp.com").result().body

Installation

Fido can be installed using pip install, like so:

$ pip install --upgrade fido

License

Copyright (c) 2015, Yelp, Inc. All rights reserved. Apache v2

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

fido-2.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

fido-2.0.0-py2-none-any.whl (4.9 kB view details)

Uploaded Python 2

File details

Details for the file fido-2.0.0.tar.gz.

File metadata

  • Download URL: fido-2.0.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fido-2.0.0.tar.gz
Algorithm Hash digest
SHA256 c8bfa949cbd4d44200f8e5278cae9d9e6c7ca945d9586a851ba94d9dcd37adbd
MD5 4f9ed8ff4e4d7b9cb4cd6386f25b493f
BLAKE2b-256 9f0a4bc3bf27878a4a3eafd9588f4d0d7bbdaa1d137c60eba39699a672a7de56

See more details on using hashes here.

File details

Details for the file fido-2.0.0-py2-none-any.whl.

File metadata

File hashes

Hashes for fido-2.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 f0dc7f249327384649e000de2a5f32489683e5eafd54d8d37764b80cf6517763
MD5 e3eb885883bf0bc39887d264b476e805
BLAKE2b-256 b0832b2e1c8729b573a387f0b26dbabdac58de637123c28042e8bb3e07ce3fe1

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