Skip to main content

A Python library that provides unified utilities for working with local and

Project description

AltairAnt

A Python library providing unified utilities for working with local and cloud-based data, including DuckDB database wrappers, file system abstractions for Google Cloud Storage (GCS), and JSON to DataFrame loading with multiple schema handlers.

Features

  • DuckDB Integration: Simplified database operations with context-managed connections.
  • GCS File System: Seamless file access and synchronization between local and remote storage.
  • JSON to DataFrame Loader: Automatic conversion of various JSON formats to pandas DataFrames using extensible schema handlers.

Installation

Install from source or via pip:

pip install altairant

Usage

JSON to DataFrame Loader

from altairant.json_df_loader import JsonToDataFrameLoader

loader = JsonToDataFrameLoader()

# Example: List of dicts
data = [
    {"id": 1, "name": "Alice", "value": 3.14},
    {"id": 2, "name": "Bob", "value": 2.71}
]

df = loader.load(data)
print(df)

Supported JSON schemas include:

  • List of dictionaries
  • Columnar format (dict of lists)
  • Column-rows format (with metadata)
  • Nested data under a "data" key

DuckDB Wrapper

from altairant.gcs.duckstore import DuckDBStore

# Example usage (assuming GCS setup)

GCS File System

from altairant.gcs.file_manager import GCSFileManager

# Example usage

Requirements

  • Python >= 3.8
  • pandas
  • duckdb
  • google-cloud-storage
  • gcsfs

License

MIT License

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

altairant-1.1.1.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

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

altairant-1.1.1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file altairant-1.1.1.tar.gz.

File metadata

  • Download URL: altairant-1.1.1.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for altairant-1.1.1.tar.gz
Algorithm Hash digest
SHA256 2127b87c7a556f92fd00a528be09b5dad3a5f4454dec0a44354265d91516cd8d
MD5 6a21f0b80ef336d115d5cc7768eca90e
BLAKE2b-256 d3cda3bed292a2260499a5c81c509ad8b2be89192673b1f223247ba63db88194

See more details on using hashes here.

File details

Details for the file altairant-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: altairant-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for altairant-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d01e7d3ef191d4a13c41fae2cca680504859ee86c9bc03bd78388c29a6e1b1d5
MD5 1c3cfe4cb89818c1b6f14a258e7fae93
BLAKE2b-256 3ecf767819a358b9dd6e49b1565d39a0d8a86d6e8b1e377bad18e1ded9da68d0

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