Python client for Masterly — extract governed data products and ingest records from your lakehouse
Project description
masterly — Python client
Extract governed data products and ingest records from Python — notebooks on Databricks, Microsoft Fabric, or anywhere else your pipelines run.
from masterly import Client
client = Client(
base_url="https://app.example.com", # your Masterly install
token="<session or service-account token>",
environment="env_prod_eu",
)
# Extract: page through a data product (cursor-managed for you)
for row in client.products.read("Customer 360"):
...
# Or straight into a DataFrame
df = client.products.read("Customer 360").to_pandas()
# Follow the change feed with a resumable cursor
feed = client.products.changes("Customer 360", cursor=saved_cursor)
for change in feed:
...
save(feed.cursor) # persist for the next run
# Ingest: deliver records to a source (chunked automatically)
report = client.sources.ingest("crm", records)
print(report.records, "records in", report.batches, "batches")
Tokens: two personas
- Consumer (extract in a Databricks/Fabric job): use a service-account token
(minted under Users → Service accounts). It pins its Environment and consumes published
products — reference them by product id (
dp_…), since listing products needs a session. Access policies (row rules, masks) apply per consumer automatically. - Integrator (ingest + golden reads): use a session token. Sources and products can be referenced by name.
The client is a thin, typed wrapper over the stable /v1 REST contract — the same API
every other channel uses. Errors raise masterly.ApiError carrying the server's error
code and message. Re-delivery is idempotent: records upsert by their source key, so
running the same notebook twice never duplicates data.
pandas is an optional dependency: pip install masterly[pandas].
License
Apache-2.0 — see LICENSE.
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 masterly-0.1.1.tar.gz.
File metadata
- Download URL: masterly-0.1.1.tar.gz
- Upload date:
- Size: 66.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13fc8a428e412d7289541a007d447c1274f7e01d0df65b55c99e525fda83a09e
|
|
| MD5 |
95553869277882498ccc9241801d039d
|
|
| BLAKE2b-256 |
f8fd8af1efb1e64831073bef8caf72c15071fdb231e885961f9d9bcfdbfdd827
|
Provenance
The following attestation bundles were made for masterly-0.1.1.tar.gz:
Publisher:
release.yml on masterly-data/masterly-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
masterly-0.1.1.tar.gz -
Subject digest:
13fc8a428e412d7289541a007d447c1274f7e01d0df65b55c99e525fda83a09e - Sigstore transparency entry: 2164584739
- Sigstore integration time:
-
Permalink:
masterly-data/masterly-python-sdk@99baa7f02648e5057b64120d04151db061ea160a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/masterly-data
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@99baa7f02648e5057b64120d04151db061ea160a -
Trigger Event:
push
-
Statement type:
File details
Details for the file masterly-0.1.1-py3-none-any.whl.
File metadata
- Download URL: masterly-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19a8a5b4ed063ede919865a5e8d56cf786fb1aaee3f6dd537669f16f6d462234
|
|
| MD5 |
f35f0848517c8d7caa8c88ff21fd47ee
|
|
| BLAKE2b-256 |
d0a7199ff8d8b472e3b3c4767c9a4466254c39e6bdd19cd5a915fa06324538cb
|
Provenance
The following attestation bundles were made for masterly-0.1.1-py3-none-any.whl:
Publisher:
release.yml on masterly-data/masterly-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
masterly-0.1.1-py3-none-any.whl -
Subject digest:
19a8a5b4ed063ede919865a5e8d56cf786fb1aaee3f6dd537669f16f6d462234 - Sigstore transparency entry: 2164584762
- Sigstore integration time:
-
Permalink:
masterly-data/masterly-python-sdk@99baa7f02648e5057b64120d04151db061ea160a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/masterly-data
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@99baa7f02648e5057b64120d04151db061ea160a -
Trigger Event:
push
-
Statement type: