Skip to main content

A resilient, event-sourced Azure Table Storage catalog index

Project description

az-table-catalog

A resilient, event-sourced indexing library for Azure Table Storage.

az-table-catalog allows you to create high-performance, multi-indexed lookup tables without the high minimum monthly fees of Cosmos DB. It uses a Write-Ahead Log (WAL) and a checkpoint-driven recovery model to ensure data consistency even during process crashes.

Project Page

http://shaunwagner.com/projects/az-table-catalog

Why TableCatalog?

Azure Table Storage is extremely cost-effective but lacks native secondary indexes. This library stores one row per (index, record) pair, encoding the index dimension directly into the PartitionKey.

  • Multi-Index Queries: Search by any field with O(1) performance.
  • Write-Ahead Log: Prevents "split-brain" states during multi-partition writes.
  • Range Queries: Filter index partitions by ordered fields (like timestamps).
  • Self-Healing: Automatically replays orphaned WAL entries on the next write.

Quick Start

import az_table_catalog

# Configure schema
az_table_catalog.configure(
    index_keys=["phone", "email"],
    row_key="timestamp"
)

# Insert returns the committed record
user = az_table_catalog.insert({
    "phone": "555-634-5789",
    "email": "user@example.com",
    "timestamp": "2026-02-24T12:00:00Z"
})

# Query any index
results = az_table_catalog.query({"phone": "555-634-5789"})

Configuration

The library can be initialized via configure() or these environment variables:

Variable Required Description
AZURE_STORAGE_CONNECTION_STRING Yes Azure Storage connection string
TABLE_CATALOG_NAME Yes Primary catalog table name
TABLE_CATALOG_INDEX_KEYS Yes Comma-separated list of indexed fields
TABLE_CATALOG_ROW_KEY Yes Field used as the sort key (RowKey base)

Technical Implementation

  • PartitionKey: Formatted as {len(field)}_{field}{value} to prevent collisions.
  • RowKey: Derived from the row_key value and an 8-character MD5 fingerprint of all indexed fields for idempotency.

License

MIT

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

az_table_catalog-1.0.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

az_table_catalog-1.0.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file az_table_catalog-1.0.1.tar.gz.

File metadata

  • Download URL: az_table_catalog-1.0.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for az_table_catalog-1.0.1.tar.gz
Algorithm Hash digest
SHA256 cf5fd91fc1ae09e5b174cdd275d3a46248061206d537fbaa794402a379b7c9a4
MD5 6c4e5ad6c018947c06adc37bb46bc8b9
BLAKE2b-256 f44fe217daa0722508e38f150f37f1d4643c1e460c422688167dd4979b20af5f

See more details on using hashes here.

File details

Details for the file az_table_catalog-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for az_table_catalog-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8339a1701bb0353630fab246f2985bbf0f54f540117c119c5218b7e0e796e7dd
MD5 20d13a9555f7bb5914cea96f17b696c8
BLAKE2b-256 40bdd771081b381ba92f808ef4e974650c7e5cd11459a6a77ec6373e9212ab4d

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