Skip to main content

Chaining http requests into one call.

Project description

pia

https://img.shields.io/pypi/v/pia.svg https://img.shields.io/travis/soasme/pia.svg Documentation Status

Not written yet.

Quick Start

Example:

$ cat programs/soasme/weather.yml
pipe:
- method: get
  url: https://query.yahooapis.com/v1/public/yql
  params:
    format: json
    q: 'select * from weather.forecast where woeid in (select woeid from geo.places(1) where text="beijing")'
- method: post
  url: http://127.0.0.1:8000/builtin/jq
  params:
    program: '.query.results.channel|{title:.description,wind:.wind.speed|tonumber|(./3.60)|tostring,forcast:.item.forecast[0].text}'

$ curl -H"content-type: application/json" -d '{"message":"hello world"}' -X POST "http://127.0.0.1:8000/soasme/weather?city=beijing"
{"title": "Yahoo! Weather for Beijing, Beijing, CN", "wind": "3.0555555555555554", "forcast": "Sunny"}

Features

  • TODO

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2016-1-22)

  • First release on PyPI.

Project details


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