Metadata-Version: 2.1
Name: buflow
Version: 1.0.0
Summary: Python bindings for the Buflow API
Home-page: https://github.com/buflow/buflow-python
Author: Buflow
Author-email: support@buflow.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Description-Content-Type: text/markdown

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:

- https://buflow.com/docs

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

```python
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)
```


