Skip to main content

high-level Ledger API client for Daml ledgers

Project description

Daml Python bindings (formerly known as dazl)

License

Copyright (c) 2017-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Rich Python bindings for accessing Canton 2.x Ledger API-based applications. It is not intended for use with Canton 3.x.

Documentation

The user documentation is available online here.

Installation

If you just want to use the library, you can install it locally with pip:

pip install --user dazl

Requirements

  • Python 3.10+
  • Go 1.23
  • Daml SDK
    • Daml 2: 2.10 or later

Examples

All of the examples below assume you imported dazl, and are running a ledger with the default scenario generated with daml new.

Connect to the ledger and submit a single command:

import asyncio
import dazl

async def main():
    async with dazl.connect(url='http://localhost:6865', act_as='Alice') as client:
        contract = { 'issuer' : 'Alice', 'owner' : 'Alice', 'name' : 'hello world!' }
        await client.create('Main:Asset', contract)

asyncio.run(main())

Connect to the ledger as a single party, print all contracts, and close:

import asyncio
import dazl
from dazl.ledgerutil import ACS

async def main():
    async with dazl.connect(url='http://localhost:6865', read_as='Alice') as conn:
        async with ACS(conn, {"*": {}}) as acs:
            snapshot = await acs.read()

    print(snapshot)

asyncio.run(main())

Building locally

You will need additional dependencies to build locally:

Once you have these prerequisites in place:

make build

Tests

Tests in the Daml Python bindings are written using pytest. You can run them by doing:

make test

Support

The Daml Python bindings library are supported under the Daml Enterprise license. If you do not have a Daml Enterprise license and are in need of support, have questions or just want to engage in friendly conversation anything Daml, contact us on our Daml Community Forum.

Project details


Release history Release notifications | RSS feed

This version

8.9.0

Download files

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

Source Distribution

dazl-8.9.0.tar.gz (743.8 kB view details)

Uploaded Source

Built Distribution

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

dazl-8.9.0-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file dazl-8.9.0.tar.gz.

File metadata

  • Download URL: dazl-8.9.0.tar.gz
  • Upload date:
  • Size: 743.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.11 Darwin/25.2.0

File hashes

Hashes for dazl-8.9.0.tar.gz
Algorithm Hash digest
SHA256 723ecdc80fdc74dac27109e95a6db79a6fe6a82883b95eef7160da65b05b28a7
MD5 f4477491489078c16c839af20ce4b871
BLAKE2b-256 8379af8df1b2f544aed3dc2dbe274c57a184e1b90b2f615bc25933dc61f62876

See more details on using hashes here.

File details

Details for the file dazl-8.9.0-py3-none-any.whl.

File metadata

  • Download URL: dazl-8.9.0-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.11 Darwin/25.2.0

File hashes

Hashes for dazl-8.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6695f06d0b5eddc829ced0fea195fe39419378479e8d9d41d50a2f745313367f
MD5 7bbc29c0351ae9ad0dea75ecda2c5da7
BLAKE2b-256 e278102436c7fcb078be23cc0e7ae7543301b33b2d6e31b73c06f607c7d0b0e0

See more details on using hashes here.

Supported by

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