{ "info": { "author": "Open Knowledge Foundation", "author_email": "info@okfn.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# tableschema-bigquery-py\n\n[![Travis](https://img.shields.io/travis/frictionlessdata/tableschema-bigquery-py/master.svg)](https://travis-ci.org/frictionlessdata/tableschema-bigquery-py)\n[![Coveralls](http://img.shields.io/coveralls/frictionlessdata/tableschema-bigquery-py.svg?branch=master)](https://coveralls.io/r/frictionlessdata/tableschema-bigquery-py?branch=master)\n[![PyPi](https://img.shields.io/pypi/v/tableschema-bigquery.svg)](https://pypi.python.org/pypi/tableschema-bigquery)\n[![Gitter](https://img.shields.io/gitter/room/frictionlessdata/chat.svg)](https://gitter.im/frictionlessdata/chat)\n\nGenerate and load BigQuery tables based on [Table Schema](http://specs.frictionlessdata.io/table-schema/) descriptors.\n\n## Features\n\n- implements `tableschema.Storage` interface\n\n## Contents\n\n\n\n - [Getting Started](#getting-started)\n - [Installation](#installation)\n - [Examples](#examples)\n - [Documentation](#documentation)\n - [Storage](#storage)\n - [Contributing](#contributing)\n - [Changelog](#changelog)\n\n\n\n## Getting Started\n\n### Installation\n\nThe package use semantic versioning. It means that major versions could include breaking changes. It's highly recommended to specify `package` version range in your `setup/requirements` file e.g. `package>=1.0,<2.0`.\n\n```bash\npip install tableschema-bigquery\n```\n\nTo start using Google BigQuery service:\n- Create a new project - [link](https://console.developers.google.com/home/dashboard)\n- Create a service key - [link](https://console.developers.google.com/apis/credentials)\n- Download json credentials and set `GOOGLE_APPLICATION_CREDENTIALS` environment variable\n\n### Examples\n\nCode examples in this readme requires Python 3.3+ interpreter. You could see even more example in [examples](https://github.com/frictionlessdata/tableschema-bigquery-py/tree/master/examples) directory.\n\n```python\nimport io\nimport os\nimport json\nfrom tableschema import Table\nfrom apiclient.discovery import build\nfrom oauth2client.client import GoogleCredentials\n\n# Prepare BigQuery credentials\nos.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '.credentials.json'\ncredentials = GoogleCredentials.get_application_default()\nservice = build('bigquery', 'v2', credentials=credentials)\nproject = json.load(io.open('.credentials.json', encoding='utf-8'))['project_id']\n\n# Load and save table to BigQuery\ntable = Table('data.csv', schema='schema.json')\ntable.save('data', storage='bigquery', service=service, project=project, dataset='dataset')\n```\n\n## Documentation\n\nThe whole public API of this package is described here and follows semantic versioning rules. Everyting outside of this readme are private API and could be changed without any notification on any new version.\n\n### Storage\n\nPackage implements [Tabular Storage](https://github.com/frictionlessdata/tableschema-py#storage) interface (see full documentation on the link):\n\n![Storage](https://i.imgur.com/RQgrxqp.png)\n\nThis driver provides an additional API:\n\n#### `Storage(service, project, dataset, prefix='')`\n\n- `service (object)` - BigQuery `Service` object\n- `project (str)` - BigQuery project name\n- `dataset (str)` - BigQuery dataset name\n- `prefix (str)` - prefix for all buckets\n\n## Contributing\n\nThe project follows the [Open Knowledge International coding standards](https://github.com/okfn/coding-standards).\n\nRecommended way to get started is to create and activate a project virtual environment.\nTo install package and development dependencies into active environment:\n\n```\n$ make install\n```\n\nTo run tests with linting and coverage:\n\n```bash\n$ make test\n```\n\nFor linting `pylama` configured in `pylama.ini` is used. On this stage it's already\ninstalled into your environment and could be used separately with more fine-grained control\nas described in documentation - https://pylama.readthedocs.io/en/latest/.\n\nFor example to sort results by error type:\n\n```bash\n$ pylama --sort \n```\n\nFor testing `tox` configured in `tox.ini` is used.\nIt's already installed into your environment and could be used separately with more fine-grained control as described in documentation - https://testrun.org/tox/latest/.\n\nFor example to check subset of tests against Python 2 environment with increased verbosity.\nAll positional arguments and options after `--` will be passed to `py.test`:\n\n```bash\ntox -e py27 -- -v tests/\n```\n\nUnder the hood `tox` uses `pytest` configured in `pytest.ini`, `coverage`\nand `mock` packages. This packages are available only in tox envionments.\n\n## Changelog\n\nHere described only breaking and the most important changes. The full changelog and documentation for all released versions could be found in nicely formatted [commit history](https://github.com/frictionlessdata/tableschema-bigquery-py/commits/master).\n\n#### v1.0\n\n- Initial driver realease\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/frictionlessdata/jsontableschema-bigquery-py", "keywords": "frictionless data", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tableschema-bigquery", "package_url": "https://pypi.org/project/tableschema-bigquery/", "platform": "", "project_url": "https://pypi.org/project/tableschema-bigquery/", "project_urls": { "Homepage": "https://github.com/frictionlessdata/jsontableschema-bigquery-py" }, "release_url": "https://pypi.org/project/tableschema-bigquery/1.0.0/", "requires_dist": [ "six (>=1.9)", "python-slugify (>=1.2)", "google-api-python-client (>=1.5)", "unicodecsv (>=0.14)", "tableschema (>=1.0)", "tabulator (>=1.0)", "mock ; extra == 'develop'", "pylama ; extra == 'develop'", "pytest ; extra == 'develop'", "pytest-cov ; extra == 'develop'", "oauth2client ; extra == 'develop'", "tox ; extra == 'develop'" ], "requires_python": "", "summary": "Generate BigQuery tables, load and extract data, based on JSON Table Schema descriptors.", "version": "1.0.0" }, "last_serial": 5865824, "releases": { "0.6.0": [ { "comment_text": "", "digests": { "md5": "326a7a73d1fe6cb1fefd833b7612f895", "sha256": "74eae4236e9a43b4235453e05fee0f29136b840428d203f367c9dabc08c9e9fb" }, "downloads": -1, "filename": "tableschema_bigquery-0.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "326a7a73d1fe6cb1fefd833b7612f895", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11099, "upload_time": "2017-09-26T13:40:27", "url": "https://files.pythonhosted.org/packages/cd/c4/9e4b7fdac97ebd900f247df38a1fc9068ba63430d06e6e6a81787472d389/tableschema_bigquery-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b22f76e45769c812a925692c163de3a9", "sha256": "95f0f1486a61c875d6e64be7b845dbb5ca7cbda3d8a2fe08e8c5a89f222b69f9" }, "downloads": -1, "filename": "tableschema-bigquery-0.6.0.tar.gz", "has_sig": false, "md5_digest": "b22f76e45769c812a925692c163de3a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9200, "upload_time": "2017-09-26T13:40:28", "url": "https://files.pythonhosted.org/packages/cc/67/2c1970b78510ff7e42c330089e5801cb7783a8a76aefd4d30b88305fc4d4/tableschema-bigquery-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "3b3b4f3ff5f405a6db4773149ac7deb9", "sha256": "a5a1a213d3bce76f7aca05bf0ec39dd3b9502c154440a8ccbeecb5acb01eda2b" }, "downloads": -1, "filename": "tableschema_bigquery-0.6.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3b3b4f3ff5f405a6db4773149ac7deb9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11257, "upload_time": "2017-09-30T08:08:20", "url": "https://files.pythonhosted.org/packages/dd/f0/fa1d3692f2d0709c2d86b5850bf38a8bd285101af0cc6a6acd7a0192f804/tableschema_bigquery-0.6.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e2f77aaf59705356699ae578847afc2", "sha256": "ab275e5b3c1c3fb066d4d9add80b3442e1f3758d5e59ed9ecea0dddb872409f6" }, "downloads": -1, "filename": "tableschema-bigquery-0.6.1.tar.gz", "has_sig": false, "md5_digest": "4e2f77aaf59705356699ae578847afc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9306, "upload_time": "2017-09-30T08:08:22", "url": "https://files.pythonhosted.org/packages/6b/7b/9427984d4f03af3d130bde44f40907ecc2a02706718e923ae1b1a8f1dd8d/tableschema-bigquery-0.6.1.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "f8b72262c12b0c31dd9ddf6121d15b11", "sha256": "76c22a16f54fb29d10ee1a66f22ad62786ed6dcdb30ca2cb589085fedcac366a" }, "downloads": -1, "filename": "tableschema_bigquery-0.6.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f8b72262c12b0c31dd9ddf6121d15b11", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11291, "upload_time": "2017-10-01T06:41:45", "url": "https://files.pythonhosted.org/packages/3f/26/97040bb2c77867a5496a1c1f69d47752504fc2bfa1130ed45615445c82d7/tableschema_bigquery-0.6.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6ae81d570416003ddaee5e18edd4b96c", "sha256": "ab1b8204ac5913bb11b36ca63fb8e2a6a393afc9a685b3df1133bb08a15ade06" }, "downloads": -1, "filename": "tableschema-bigquery-0.6.2.tar.gz", "has_sig": false, "md5_digest": "6ae81d570416003ddaee5e18edd4b96c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9709, "upload_time": "2017-10-01T06:41:47", "url": "https://files.pythonhosted.org/packages/63/26/561bfc0693e942d4295a9f525f2f7556c93cffc85459952b638c6cdc7873/tableschema-bigquery-0.6.2.tar.gz" } ], "0.6.3": [ { "comment_text": "", "digests": { "md5": "8e2a815722e54963638e5d42443c8374", "sha256": "457034c8d4e856585ae7ac15735dc2dd99f6d8bd096eab558ebf0b83fa5bae90" }, "downloads": -1, "filename": "tableschema_bigquery-0.6.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8e2a815722e54963638e5d42443c8374", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11305, "upload_time": "2017-10-01T09:25:07", "url": "https://files.pythonhosted.org/packages/1e/9d/cd596d3b52bbdf393e657537e3f11624472587748bd1285623c03f8245eb/tableschema_bigquery-0.6.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8591cf8eabea81173f539c5fec144c0c", "sha256": "486dfbcff7672e211e3f003036b1a57dd24c9bf927338af808e6268ccb2243be" }, "downloads": -1, "filename": "tableschema-bigquery-0.6.3.tar.gz", "has_sig": false, "md5_digest": "8591cf8eabea81173f539c5fec144c0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10188, "upload_time": "2017-10-01T09:25:09", "url": "https://files.pythonhosted.org/packages/c8/f6/13971120135b49f53e2c9a92855f097a8f84cdf957617c7c68a0ceab99a9/tableschema-bigquery-0.6.3.tar.gz" } ], "0.6.4": [ { "comment_text": "", "digests": { "md5": "f51c3d5b2c285a35d70255d07d1a191e", "sha256": "ee4c9dd24ec39bf5adb9dae2d45ba12102e2d74732bec0b154e444200ed76a4f" }, "downloads": -1, "filename": "tableschema_bigquery-0.6.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f51c3d5b2c285a35d70255d07d1a191e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8997, "upload_time": "2019-09-21T09:42:52", "url": "https://files.pythonhosted.org/packages/6e/64/d40f754595057e1774d6d4d0928d9ed529c07a05e621b1161d74e75d2604/tableschema_bigquery-0.6.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0f5cd1891734add2b47fdfec962085cd", "sha256": "99afdaa8d44c886f0481e98620a6910c99e7a5808f8adbf7f774e2a005c33630" }, "downloads": -1, "filename": "tableschema-bigquery-0.6.4.tar.gz", "has_sig": false, "md5_digest": "0f5cd1891734add2b47fdfec962085cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9304, "upload_time": "2019-09-21T09:42:54", "url": "https://files.pythonhosted.org/packages/63/e8/0fe2a24d0f839682c9aba4bb875956681efd770ed8c53d90f9c7c0378b41/tableschema-bigquery-0.6.4.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "793d2e374ad5467d50098c472994bb0d", "sha256": "9bf8aec8213e59fb98a6ebe68f43db003b9944b87484b27be2f9b18fc659bcd6" }, "downloads": -1, "filename": "tableschema_bigquery-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "793d2e374ad5467d50098c472994bb0d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9007, "upload_time": "2019-09-21T11:38:51", "url": "https://files.pythonhosted.org/packages/2c/b0/726b8e64e84c2558957bd4422a8e68d0753b52f7a0ba53f2dc50e03da4ab/tableschema_bigquery-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "231edcc722bc4672b7bc13c1219a186f", "sha256": "2e11e6bebf143323f12a788fdf82094c8a5b73b35ca722149e45ec512001ed1f" }, "downloads": -1, "filename": "tableschema-bigquery-1.0.0.tar.gz", "has_sig": false, "md5_digest": "231edcc722bc4672b7bc13c1219a186f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9314, "upload_time": "2019-09-21T11:38:53", "url": "https://files.pythonhosted.org/packages/ce/23/74597ab7377faf38c5cdbe34ab5a27a05b57881375e2e720d7e01383232c/tableschema-bigquery-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "793d2e374ad5467d50098c472994bb0d", "sha256": "9bf8aec8213e59fb98a6ebe68f43db003b9944b87484b27be2f9b18fc659bcd6" }, "downloads": -1, "filename": "tableschema_bigquery-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "793d2e374ad5467d50098c472994bb0d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9007, "upload_time": "2019-09-21T11:38:51", "url": "https://files.pythonhosted.org/packages/2c/b0/726b8e64e84c2558957bd4422a8e68d0753b52f7a0ba53f2dc50e03da4ab/tableschema_bigquery-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "231edcc722bc4672b7bc13c1219a186f", "sha256": "2e11e6bebf143323f12a788fdf82094c8a5b73b35ca722149e45ec512001ed1f" }, "downloads": -1, "filename": "tableschema-bigquery-1.0.0.tar.gz", "has_sig": false, "md5_digest": "231edcc722bc4672b7bc13c1219a186f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9314, "upload_time": "2019-09-21T11:38:53", "url": "https://files.pythonhosted.org/packages/ce/23/74597ab7377faf38c5cdbe34ab5a27a05b57881375e2e720d7e01383232c/tableschema-bigquery-1.0.0.tar.gz" } ] }