Git Product home page Git Product logo

aqueduct-client's Introduction

AqueductClient

AqueductClient is a simple Python wrapper around Quantopian's Aqueduct API. It lets you easily create Pipeline executions and load their results.

AqueductClient supports Python 2.7 and Python 3.4+.

Installation

$ pip install aqueduct-client

Configuration

To use AqueductClient, you need a Quantopian API Key. Once you have it, there are several ways to use it:

  1. Use a credentials file: create ~/.quantopian/credentials (Linux or OS X) or %UserProfile%\.quantopian\credentials (Windows) and put the following in it:
[default]
API_KEY = your_api_key
  1. Use an environment variable: set QUANTOPIAN_API_KEY to your API key.
  2. Pass your API key directly into the create_client method (see below) using the api_key kwarg.

Usage

Note: Fuller documentation will be coming soon.

To use AqueductClient, create an instance. In this case, we are loading credentials from disk or environment variable.

from aqueduct_client import create_client

client = create_client()

To run a new pipeline execution, use submit_pipeline_execution. Required parameters are code (string), start_date and end_date (date-like strings, dates, or Pandas timestamps). Optional parameters are name (string), params (a dict of parameters to pass to your pipeline), and asset_identifier_format (which can be "symbol" (default), "sid", and "fsym_region_id"). submit_pipeline_execution returns an id, which you can pass to get_pipeline_execution to monitor this pipeline's execution status.

get_all_pipeline_executions and get_pipeline_execution(id) let you load existing pipelines. Each pipeline has a status field, which can be IN-PROGRESS, SUCCESS, or FAILED.

For a successful pipeline, get_pipeline_results_dataframe(id) loads that pipeline's results into a pandas DataFrame. For a failed pipeline, get_pipeline_execution_error(id) shows you the information about the error.

aqueduct-client's People

Contributors

richafrank 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.