Skip to main content

datablob

Client for Updating a Simple Data Warehouse on Blob Storage

design philosophy

  • optimize for simplicity and user friendliness
  • storage is cheap (compared to compute)
  • pre-compute as much as possible
  • should work out of the box
  • advanced configuration should be opt-in
  • explicit is better than implicit
  • straightforwardness over magic

install

pip install datablob

To include Google Cloud Storage (GCS) support:

pip install datablob[gcs]

supported formats

basic usage

from datablob import DataBlobClient

# AWS S3 (default)
client = DataBlobClient(
    bucket_name="example-test-bucket-123", bucket_path="prefix/to/dataportal"
)

# Google Cloud Storage (GCS)
client = DataBlobClient(
    bucket_name="example-gcs-bucket-123", bucket_path="prefix/to/dataportal", provider="gcs"
)

rows = [
    {
        "name": "Random Building",
        "@lat": 35.XXXXXX,
        "@lon": -85.XXXXXX,
        "@geom": { "type": "Polygon", "coordinates": [...] } // geojson geometry
    }
]

client.update_dataset(
    name="parking_lots", # name of the dataset, shouldn't include spaces or special characters
    version="2", # version of the dataset. It's a string, so you can version as you like.
    data=rows, # list of dictionaries.  Each row is a dictionary.
    latitude_key="@lat", # name of the latitude column 
    longitude_key="@lon", # name of the longitude column
    polygon_key="@geom", # name of the column with a polygon geometry in it (if applicable)
    xlsx=True # set to True to include an Excel file in output
)
# automatically creates the following files
# s3://example-test-bucket-123/prefix/to/dataportal/buildings/v2/meta.json
# s3://example-test-bucket-123/prefix/to/dataportal/buildings/v2/data.csv
# s3://example-test-bucket-123/prefix/to/dataportal/buildings/v2/data.points.geojson
# s3://example-test-bucket-123/prefix/to/dataportal/buildings/v2/data.polygons.geojson
# s3://example-test-bucket-123/prefix/to/dataportal/buildings/v2/data.json
# s3://example-test-bucket-123/prefix/to/dataportal/buildings/v2/data.jsonl
# s3://example-test-bucket-123/prefix/to/dataportal/buildings/v2/data.parquet
# s3://example-test-bucket-123/prefix/to/dataportal/buildings/v2/data.points.shp.zip
# s3://example-test-bucket-123/prefix/to/dataportal/buildings/v2/data.polygons.shp.zip
# s3://example-test-bucket-123/prefix/to/dataportal/buildings/v2/data.tsv
# s3://example-test-bucket-123/prefix/to/dataportal/buildings/v2/data.xlsx

advanced usage

client.update_dataset(
    name="fleet",
    version="1",
    data=rows,
    column_names=["ID", "Make", "Model", "Year"] # specify column names and their order
    description="List of Vehicles in Fleet",
    xlsx=True,
    xlsx_data_types=["Number", "Text", "Text", "Number"] # specify format of cell values in columns
)

examples

Metadata

Release files for datablob 0.11.0

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

Source distribution (sdist)

Source distribution for datablob 0.11.0
File Size Uploaded Provenance Actions
datablob-0.11.0.tar.gz 13.3 kB Without provenance Details for datablob-0.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datablob 0.11.0
File Interpreter ABI Platform Actions
datablob-0.11.0-py3-none-any.whl Python 3 none any Details for datablob-0.11.0-py3-none-any.whl

Total release size: 24.3 kB

Release files / datablob-0.11.0.tar.gz

Download URL datablob-0.11.0.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
27ea9fc8db29bec71840f690c99a1059cec6dcf8887e5e3875fbebc9d42a9a00
BLAKE2b-256 checksum
How to use checksums
b62e2d8e01115fb65237e870e9b63b038f83bf8251031cd1b7d371d84fc4125f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / datablob-0.11.0-py3-none-any.whl

Download URL datablob-0.11.0-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3732bea0497e353b207ff9861d6653491f0d698063ebcd2314bcd2c4c540afdf
BLAKE2b-256 checksum
How to use checksums
7bbdfef7e4c60c75721c33ac98d78b20f5fdc1de9f30757452deab780a29bbd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for datablob 0.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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