Standalone semantic model export and delivery — push your data model to dbt, Snowflake, Looker, Tableau, GitHub, GitLab, or dbt Cloud whenever it changes.
Project description
pramiti-export-copilot
Push your semantic data model to dbt, Snowflake, Databricks, Looker, Tableau, GitHub, GitLab, or dbt Cloud whenever it changes. Zero dependencies -- inject any data backend and delivery target via Protocol-based interfaces.
Install
pip install pramiti-export-copilot
Quick Start
from pramiti_export_copilot import ExportCopilot, DeliveryConfig
from pramiti_export_copilot.backends import InMemoryBackend
from pramiti_export_copilot.delivery_targets import WebhookTarget
backend = InMemoryBackend(b"dbt schema content")
target = WebhookTarget("https://hooks.mycompany.com/epistom")
copilot = ExportCopilot(backend)
result = copilot.deliver("workspace-1", DeliveryConfig(format="dbt", target=target))
if result.success:
print(f"Delivered {result.bytes_delivered} bytes, hash={result.export_hash[:8]}...")
elif result.error:
print(f"Failed: {result.error}")
Supported Formats
| Format | Backend method |
|---|---|
| dbt | get_dbt_yaml(workspace_id) |
| Snowflake | get_snowflake_sql(workspace_id) |
| Databricks | get_databricks_json(workspace_id) |
| Looker | get_lookml(workspace_id) |
| Tableau | get_tableau_tds(workspace_id, connection_info) |
Delivery Targets
All targets use urllib.request (stdlib) -- no external HTTP dependencies. All support self-hosted/enterprise instances via endpoint_url.
| Target | Description |
|---|---|
WebhookTarget |
POST to any HTTP endpoint with optional Bearer auth. |
GitHubTarget |
Commit via GitHub Contents API. Supports GHE via custom endpoint_url. |
GitLabTarget |
Commit via GitLab Repository Files API. Supports self-hosted instances. |
DbtCloudTarget |
Push via dbt Cloud API. Supports enterprise instances. |
Hash-Based Skip
Pass last_hash to skip delivery when content hasn't changed:
result = copilot.deliver("ws-1", config, last_hash="abc123...")
if result.skipped:
print(f"Skipped: {result.reason}") # "no_change"
API
| Export | Description |
|---|---|
ExportCopilot |
Core delivery engine. Inject any IModelDataBackend. |
DeliveryConfig |
Configuration dataclass: format, target, optional connection_info (for Tableau). |
DeliveryResult |
Result dataclass: success, skipped, reason, export_hash, bytes_delivered, error. |
IModelDataBackend |
Protocol for model data retrieval backends. |
InMemoryBackend |
In-memory backend for testing (returns fixed bytes for all formats). |
IDeliveryTarget |
Protocol for delivery targets. Implement deliver(content, metadata) -> int. |
CopilotError |
Base exception for all export copilot errors. |
DeliveryError |
Raised when a delivery target rejects the payload. |
BackendError |
Raised when the backend cannot produce export bytes. |
Custom Backend
Implement IModelDataBackend (structural subtyping -- no inheritance required):
class MyBackend:
def get_dbt_yaml(self, workspace_id: str) -> bytes: ...
def get_snowflake_sql(self, workspace_id: str) -> bytes: ...
def get_databricks_json(self, workspace_id: str) -> bytes: ...
def get_lookml(self, workspace_id: str) -> bytes: ...
def get_tableau_tds(self, workspace_id: str, connection_info: dict) -> bytes: ...
License
MIT -- Pramiti Labs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pramiti_export_copilot-0.1.0.tar.gz.
File metadata
- Download URL: pramiti_export_copilot-0.1.0.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ecf9b9dd59268bfa436c7284eecd69f1350e8af889d6720fa7f7a68811c286e
|
|
| MD5 |
a39893cd2ad38f9e505823a629865823
|
|
| BLAKE2b-256 |
d5df298238ccca8f05bf3d8b197280680aa37be8a3efb77c615cc46eb0a745ee
|
File details
Details for the file pramiti_export_copilot-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pramiti_export_copilot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d294a608604f74d66cb59a621d1648d344aa126751229f0c8ee333e0c3b23c17
|
|
| MD5 |
a6f8c47ec446b6f90a0ef6c0b9f1938f
|
|
| BLAKE2b-256 |
54a786f5c1522b0532b08325f00e3ccb10a46fc5a3f81555c3f582e32d7eebcb
|