pramiti-export-copilot
Push your semantic data model to dbt, Snowflake, Databricks, Looker, Tableau, GitHub, GitLab, or any HTTP ingestion endpoint 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. When authorization is set it must start with Bearer ; connect-time DNS is re-resolved and a rebound internal IP is refused. |
GitHubTarget |
Commit via GitHub Contents API. Supports GHE via custom endpoint_url. |
GitLabTarget |
Commit via GitLab Repository Files API. Supports self-hosted instances. |
DbtCloudTarget |
Experimental. Generic authenticated POST to a caller-supplied full endpoint URL, using dbt-Cloud-style Authorization: Token ... auth. dbt Cloud's Administrative API has no export-ingest route, so this target cannot push into dbt Cloud directly -- point it at your own ingestion service (endpoint_url is required and used verbatim; account_id, if given, is echoed in the JSON payload). |
For GitHubTarget and GitLabTarget, the pre-flight existence check treats only HTTP 404 as "file absent" (create); any other pre-flight failure (auth, network, 5xx) is reported as a delivery error rather than silently creating a new file.
All targets return bytes_delivered as the size of the export content, not the transport envelope (JSON wrapper / base64 expansion).
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
Metadata
Release files for pramiti-export-copilot 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pramiti_export_copilot-0.2.0.tar.gz | 19.3 kB | With provenance | Details for pramiti_export_copilot-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pramiti_export_copilot-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pramiti_export_copilot-0.2.0-py3-none-any.whl |
Total release size: 33.7 kB
Release files / pramiti_export_copilot-0.2.0.tar.gz
| Download URL | pramiti_export_copilot-0.2.0.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d09fedb9f8e0baf294340850bac11c44305927e1429675cf84bacc14479f2180
|
|
BLAKE2b-256 checksum How to use checksums |
945c984ab2176f2f8f7eb40546bac8aaf16ab91d984ffd2b5d9c9ae8ff5cd241
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / pramiti_export_copilot-0.2.0-py3-none-any.whl
| Download URL | pramiti_export_copilot-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3da36ece5c961e2563efacf97368774521f77b19d68b11c0cc5ccd2585d9aa4
|
|
BLAKE2b-256 checksum How to use checksums |
3b0585fda176d4cb52fcdd20d22abe1cd53653ee9620228e9dc0ceafefa338b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logSecurity for pramiti-export-copilot 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pramiti_export_copilot-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.