Skip to main content

DASL Client Library

The DASL (Databricks Antimatter Security Lakehouse) Client Library is a Python SDK for interacting with DASL services. This library provides an interface for interacting with DASL services, allowing you to manage datasources, rules, workspace configurations, and more from Databricks notebooks.

Features

  • Simple Authentication: Automatic workspace detection in Databricks notebooks
  • Datasource Management: Create, update, list, and delete datasources
  • Rule Management: Define and manage security detection rules to identify threats
  • Workspace Configuration: Update and retrieve DASL's workspace-level settings

Installation

Install from PyPI:

pip install dasl-client

Quick Start

Databricks Notebook Environment (Recommended)

The DASL client works best in Databricks notebooks with automatic authentication:

from dasl_client import Client

# Automatically detects Databricks context and authenticates
client = Client.for_workspace()
print("Connected to DASL!")

# List existing datasources
print("Existing datasources:")
for datasource in client.list_datasources():
    print(f"  - {datasource.metadata.name}")

# List detection rules
print("Existing detection rules:")
for rule in client.list_rules():
    print(f"  - {rule.metadata.name}")

Creating a Datasource

from dasl_client import DataSource, Schedule, BronzeSpec, SilverSpec

# Create a new datasource
datasource = Datasource(
    source="aws",
    source_type="cloudtrail",
    autoloader=Autoloader(
        enabled=True,
        schedule=Schedule(
            at_least_every="1h",
            enabled=True
        )
    ),
    bronze=BronzeSpec(
        bronze_table="security_logs_bronze",
        skip_bronze_loading=False
    ),
    silver=SilverSpec(
        # Configure silver layer here, see the API reference for more details
    ),
    gold=GoldSpec(
        # Configure gold layer here, see the API reference for more details
    )
)

# Create the datasource
created_datasource = client.create_datasource(datasource)
print(f"Created datasource: {created.metadata.name}")

Creating a Detection Rule

from dasl_client.types import Rule, Schedule

# Create a new detection rule to detect failed logins
rule = Rule(
    schedule=Schedule(
        at_least_every="2h",
        enabled=True,
    ),
    input=Rule.Input(
        stream=Rule.Input.Stream(
            tables=[
                Rule.Input.Stream.Table(name="http_activity"),
            ],
            filter="disposition = 'Blocked'",
            starting_timestamp=datetime(2025, 7, 8, 16, 47, 30),
        ),
    ),
    output=Rule.Output(
        summary="record was blocked",
    ),
)

try:
    created_rule = client.create_rule("Detect Blocked HTTP Activity", rule)
    print(f"Successfully created rule: {created_rule.metadata.name}")
except Exception as e:
    print(f"Error creating rule: {e}")

Requirements

  • Python 3.8+
  • Access to a Databricks workspace with DASL enabled
  • databricks-sdk>=0.41.0
  • pydantic>=2

Documentation

For complete DASL Client documentation, examples, and API reference:

Support

Metadata

Release files for dasl-client 1.0.34

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dasl-client 1.0.34
File Size Uploaded Provenance
dasl_client-1.0.34.tar.gz 59.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dasl-client 1.0.34
File Interpreter ABI Platform
dasl_client-1.0.34-py3-none-any.whl Python 3 none any Details

Total release size: 126.6 kB

Release files / dasl_client-1.0.34.tar.gz

Download URL dasl_client-1.0.34.tar.gz
Size 59.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a79a09166bbaea4126a31cb4ceb4a461788f10ec3bb836b4f049a4befaa480ef
BLAKE2b-256 checksum
How to use checksums
95c8039c8edeee5f53d973136148192d042758548bf5259781127e277ff3bb6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / dasl_client-1.0.34-py3-none-any.whl

Download URL dasl_client-1.0.34-py3-none-any.whl
Size 67.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71bd9500f7c435fa9a6221f680672fc2c2fe6d747dfd2090da76690bc14c4b4e
BLAKE2b-256 checksum
How to use checksums
fdc18ae199f784a04538be17d22d68b656e01f098aac0a3dd4813cda249aaf80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for dasl-client 1.0.34

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

1.0.34 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page