Skip to main content

Python client for Geo-Calcite data service

Project description

Geo-Calcite Python Client

PyPI version License

A lightweight Python client for interacting with the Geo-Calcite API.
Provides helpers for connecting to, refreshing, querying, and disconnecting from Geo-Calcite data sources over HTTP, and returns results as native Python objects or pandas DataFrames.


Features

  • Connect to one or more Geo-Calcite data sources by DID (data identifier)
  • Refresh existing connections
  • Disconnect from data sources
  • List Tables from the latest connect/refresh cache via list_tables()
  • Query connected sources via SQL and return results as a pandas DataFrame

Table of Contents


Installation

Install via pip:

pip install geo_calcite

Quickstart

# Import and create a GeoCalcite client, ignore if already created.
from geo_calcite import GeoCalciteClient

# verbose=False by default. Set verbose=True to print runtime logs.
client = GeoCalciteClient(verbose=True)

# Connect to datasource, like "pbdb" with its DID "1"
dids = [1]
client.connect(dids)

# Print and return currently cached tables from latest connect/refresh.
tables = client.list_tables()
print(tables)

# SQL query for data entity, remove "LIMIT 5" to get full data. 
sql = "SELECT * FROM pbdb.gx_8260001_pbdb LIMIT 5"
df = client.query(sql)
print(df)

# Disconnect from datasource after use.
client.disconnect(dids)

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/foo
  3. Commit your changes: git commit -am 'Add foo feature'
  4. Push to the branch: git push origin feature/foo
  5. Open a Pull Request

License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geo_calcite-0.2.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geo_calcite-0.2.2-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file geo_calcite-0.2.2.tar.gz.

File metadata

  • Download URL: geo_calcite-0.2.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for geo_calcite-0.2.2.tar.gz
Algorithm Hash digest
SHA256 2f798ccc2d067030f4e3f6f10935b154294e6a31f84aea1cdbef66004a89cf79
MD5 2d8ef27daf990b2075c60f836772f123
BLAKE2b-256 282685540257632f578141bd0b38c518919cd32f28f9487b8c12cda9419c34ee

See more details on using hashes here.

File details

Details for the file geo_calcite-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: geo_calcite-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for geo_calcite-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c2a6f9dcefef7757aea3e0ab642854e060bad291f4cdde3da4fc535a9abf30c6
MD5 3d88ce03dbeb9791cace3b17e9d277e0
BLAKE2b-256 7261eef675faed89378755cb6831f75b8af3247e055d320c3f77f5831766226c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page