Skip to main content

bruneus

Maintainability

BigQuery helper library for Python

How to use

Select from table

import bruneus
bruneus.select("SELECT * FROM `foo.bar.purchases` LIMIT 20").as_dicts()
bruneus.select("SELECT * FROM `foo.bar.purchases` ORDER BY created_at LIMIT 1", client=bigquery.Client(project="foobar")).first_as_dict()
bruneus.select("SELECT * FROM `foo.bar.purchases` LIMIT 20").to_dataframe()

bruneus.select("SELECT word, word_count FROM `bigquery-public-data.samples.shakespeare` LIMIT 5").stringify(names={"word": "Word", "word_count": "Word count"})

Create table from query

bruneus.select("SELECT * FROM `some.source.table`").to_table("foo.bar.new_table")

Create temp table from query

bruneus.select("SELECT * FROM `some.source.table`").to_table("foo.bar.new_table").expires_in(days=7)

Export table to GCS as csv

bruneus.export_table("foo.bar.sample").as_csv(gzip=True).to_gcs("my-bucket", "exported-table.csv.gz")

Generate random table name

bruneus.random_table_name("prefix-here")

Development

Run tests

docker compose run bruneus

Release files for bruneus 0.1.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bruneus 0.1.16
File Size Uploaded
bruneus-0.1.16.tar.gz 6.3 kB Details

Release files / bruneus-0.1.16.tar.gz

Download URL bruneus-0.1.16.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d1f5448d503fbe728c389397ac99aafca60ed76e5eed30ee01fe4db11d10a030
BLAKE2b-256 checksum
How to use checksums
7da5fb64e1046282952e2fb70379ecf4142ef296061535d3f1ce32e2dedf2d17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.1.16 This release

1 release file

0.1.15

1 release file

0.1.14

1 release file

0.1.13

1 release file

0.1.12

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page