Skip to main content

yekta-sdk

Python SDK for the Yekta data catalog — credential vending, catalog browsing, access control.

Install

pip install yekta-sdk            # Core
pip install yekta-sdk[duckdb]    # + DuckDB integration
pip install yekta-sdk[polars]    # + Polars/Delta integration
pip install yekta-sdk[all]       # Everything

Quick Start

Browse the catalog

from yekta import YektaClient

client = YektaClient.from_env()  # reads YEKTA_URL, YEKTA_TOKEN

# List resources
for r in client.ls("/dev/bronze"):
    print(f"{r.path} ({r.format})")

# Preview data
df = client.preview_df("/dev/bronze/memotech/patents", rows=100)
df.head()

# Schema
schema = client.schema("/dev/bronze/memotech/patents")
for col in schema.columns:
    print(f"  {col.name}: {col.data_type}")

Get temporary credentials (the core feature)

from yekta import CredentialVendor

vendor = CredentialVendor.from_env()  # reads SEPAR_URL, SEPAR_API_KEY

# Vend a short-lived, scoped SAS token
cred = vendor.vend(
    connection_id="019c479e-...",
    resource_path="dev/bronze/memotech/fabric/memotech_imt_patent",
)

print(cred.expires_at)  # 1 hour from now
print(cred.is_expired)  # False

Use with DuckDB

import duckdb

conn = duckdb.connect()
conn.execute(cred.duckdb_secret())

df = conn.sql("""
    SELECT country, COUNT(*) as cnt
    FROM delta_scan('az://dagster-data-pipelines/dev/bronze/.../memotech_imt_patent')
    GROUP BY country ORDER BY cnt DESC
""").df()

Use with Polars

import polars as pl

df = pl.read_delta(
    cred.abfss_uri(),
    storage_options=cred.storage_options(),
)

Use with Spark

for key, value in cred.spark_config().items():
    spark.conf.set(key, value)

df = spark.read.format("delta").load(cred.abfss_uri())

Access control

# List grants
for g in client.grants():
    print(f"{g.path_prefix}{g.principal_id}: {g.permission}")

# Grant read access
client.grant("/dev/bronze", principal_id="user-uuid", permission="read")

# Revoke
client.revoke(grant_id="...")

Environment Variables

Variable Default Description
YEKTA_URL http://localhost:8081 Yekta API URL
YEKTA_TOKEN JWT token for authentication
SEPAR_URL http://localhost:8080 Separ auth URL
SEPAR_API_KEY API key for service-to-service auth

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yekta_sdk-0.1.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

yekta_sdk-0.1.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yekta_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for yekta_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 958055ecef64b04eb728a3274fb37e1df8f3ed1bac4a634b29993c4b2ead816b
MD5 7023e2fe76be9a64d57878305140b944
BLAKE2b-256 1c620ea5ef74a05e6f9b2468a40991a17ea4312a09cfa774541a06d68d461c74

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yekta_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for yekta_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62079685fdc125304eb95d878e8db9f9c38e0c3c6e1c9260d965cec5d7e06080
MD5 696fd3c5d7f77aa92b24f83cd7b95ec4
BLAKE2b-256 0ad1c6ce6baf1b37c4472df6f458d384e74a17ff85ca58e7136fbebf558d67fc

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page