Skip to main content

Open-source embedded analytics platform

Project description

Prismiq

Open-source embedded analytics engine for Python.

Installation

pip install prismiq

Quick Start

from prismiq import PrismiqEngine

# Connect to your database
engine = await PrismiqEngine.create(
    database_url="postgresql://user:pass@localhost/mydb",
    exposed_tables=["customers", "orders", "products"]
)

# Get schema
schema = await engine.get_schema()

# Execute a query
result = await engine.execute({
    "tables": [{"id": "t1", "name": "orders"}],
    "columns": [
        {"table_id": "t1", "name": "status"},
        {"table_id": "t1", "name": "total", "aggregation": "sum"}
    ],
    "group_by": [{"table_id": "t1", "column": "status"}]
})

Features

  • Schema introspection - Discover tables, columns, and relationships
  • Visual query building - Build SQL from JSON query definitions
  • Async execution - Non-blocking database operations with asyncpg
  • Type safe - Full type hints with Pydantic models
  • Multi-tenant support - Schema-based isolation with Alembic integration

Multi-Tenant Integration

For applications with schema-based multi-tenancy, Prismiq provides SQLAlchemy declarative models and sync table creation:

from sqlalchemy import create_engine
from prismiq import ensure_tables_sync, PrismiqBase

engine = create_engine("postgresql://user:pass@localhost/db")

# Create tables in a tenant-specific schema
with engine.connect() as conn:
    ensure_tables_sync(conn, schema_name="tenant_123")
    conn.commit()

# For Alembic integration, access the metadata:
# PrismiqBase.metadata.tables contains all Prismiq table definitions

See Multi-Tenant Integration Guide for complete documentation.

Documentation

See the main repository for full documentation.

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

prismiq-0.1.0.tar.gz (171.8 kB view details)

Uploaded Source

Built Distribution

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

prismiq-0.1.0-py3-none-any.whl (129.7 kB view details)

Uploaded Python 3

File details

Details for the file prismiq-0.1.0.tar.gz.

File metadata

  • Download URL: prismiq-0.1.0.tar.gz
  • Upload date:
  • Size: 171.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for prismiq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fc9cb84c612fcb06494b006f2ad5eebd6a672427a97fbec80dc5f92e97c13bf8
MD5 6e3256249e787dec4462b49e1309b560
BLAKE2b-256 9f015cd5e6f1e679d57f5894e4f3de76d54e9470cc26a1aa268b1f4361cd24fe

See more details on using hashes here.

File details

Details for the file prismiq-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: prismiq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 129.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for prismiq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bfbef6a2e16930e17b511c8291791606f251a2a9ceec43eae6d00354ddb97795
MD5 d5d67e40baa82dd303b0992453cce018
BLAKE2b-256 242106aa18eeb91071912cb7aa531c6fb41734a4478b30df9da38b17a4165152

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