Skip to main content

Python bindings for the Buflow API

Project description

Official Buflow Bindings for Python

A Python library for Buflow's API.

Setup

You can install this package by using the pip tool and installing:

$ pip install Buflow

Or:

$ easy_install Buflow

Setting up a Buflow Account

Sign up for Buflow at https://buflow.com

Using the Buflow API

Documentation for the python bindings can be found alongside Buflow's other bindings here:

In the standard documentation, most of the reference pages will have examples in Buflow's official bindings (including Python). Just click on the Python tab to get the relevant documentation.

Example

import buflow
import os


buflow.api_key = os.environ.get("STRIPE_SECRET_KEY")

print("Creating task...")

task_params = {
  "questions": [
    "Is there a tree in this image?",
    "Is there a pedestrian in this image?",
  ],
}
resp = buflow.Task.create(
  task_type='binary_classification',
  task_params=task_params,
  content='http://cdn.lamag.com/wp-content/uploads/sites/9/2016/07/134002821-800x500.jpg',
  content_type='image',
  priority='medium',
  instructions='Answer questions asked.',
  callback_url='https://www.example.com/labels',
)

print("Success: %r" % resp)

task_id = resp["task_id"]

print("Fetching task...")
resp = buflow.Task.get(task_id)

print("Success: %r" % resp)

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

buflow-1.0.0.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

buflow-1.0.0-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

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