This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

bqlib - BigQuery Python Library

BigQuery Python Library

See: Google BigQuery

Requirements

  • Python 2.6 or later (not support for 3.x)

Setup

$ pip install bqlib

How to use

Single Query - BQJob

BQJob is a class for starting the BigQuery job and fetching the result.
You can use either run_sync(synchronous) or run_async(asynchronous) method.
from bqlib import BQJob

project_id = 'example_project'
query = 'SELECT foo FROM bar'
http = authorized_http

bqjob = BQJob(http, project_id, query=query)

# run synchronously
job_result = bqjob.run_sync()

# or run asynchronously
bqjob.run_async()
# ... do other things ...

job_result = bqjob.get_result()

print job_result # [{u'foo': 10}, {u'foo': 20}, ...]

Multiple Queries - BQJobGroup

BQJobGroup is a class for putting multiple BQJobs into an one group.
Each BQJob in that group are executed concurrently.
from bqlib import BQJob, BQJobGroup

bqjob1 = BQJob(http, project_id, query=query)
bqjob2 = BQJob(http, project_id, query=query)

job_group = BQJobGroup([bqjob1, bqjob2])
# synchronously
results = job_group.run_sync()

# or asynchronously
job_group.run_async()
# ... do other things ...

results = job_group.get_results()

print results # [[{'foo': 10}, {'foo': 20}], [{'bar': 'test'}]]

Note

  • Concurrent Requests to BigQUery
    • Concurrent requests to BigQuery is restricted to 20 requests by Quota Policy.
    • If you want to set up concurrent requests to 20, you also have to set up at traffic controls in api-console page.

License

This library is disributed as MIT license.

History

2013-10-22 bqlib 0.0.1

  • First release

2014-03-18 bqlib 0.0.2

  • Bug fixes
Release History

Release History

0.0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bqlib-0.0.2.macosx-10.9-intel.tar.gz (9.4 kB) Copy SHA256 Checksum SHA256 any Dumb Binary Mar 18, 2014
bqlib-0.0.2-py2.7.egg (11.2 kB) Copy SHA256 Checksum SHA256 2.7 Egg Mar 18, 2014
bqlib-0.0.2.tar.gz (5.5 kB) Copy SHA256 Checksum SHA256 Source Mar 18, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting