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.3.0.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.3.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geo_calcite-0.3.0.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.3.0.tar.gz
Algorithm Hash digest
SHA256 20a6979f8df3dc94308112191a16ecc46b1366cf1a6b4f1160f1e29b6e4150bf
MD5 10ff41dd2eb1e59978111469c5912b2d
BLAKE2b-256 47dc3d07fa562bf1b284f50ae89445c2fea6cb44a3088328b8f562f8a6ad6ce7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: geo_calcite-0.3.0-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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44e235cda2530a21b328d27f283199e0c12dab93f1347e78c540af15e90127a3
MD5 795e4a4c5a84445b5af17ab44eea2533
BLAKE2b-256 f597abfc4fb3a5f707789a6a35ff7cec90e0673884d4194debbc0aa7763f2ae0

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