Skip to main content

daml-dit-api

API definitions for DIT packages to be hosted in Daml Hub. This mainly contains the type definitions for the format of the dabl-meta.yaml file at the root of each DIT file.

DIT files are also used to contain integrations loaded and run by Daml Hub. This repository also contains documentation (in this README) describing the runtime environment that Daml Hub provides to integrations.

Package Metadata

At their core, DIT files are ZIP archives that follow a specific set of conventions regarding their content. The most important of these conventions is the presence of a YAML metadata file at the root of the archive and named dabl-meta.yaml. This metadata file contains catalog information describing the contents of the DIT, as well as any packaging details needed to successfully deploy a DIT file into Daml Hub. An example of a deployment instruction is a subdeployment. A subdeployment instructs Daml Hub to deploy a specific subfile within the DIT file. A DIT file that contains an embedded DAR file could use a subdeployment to ensure that the embedded DAR file is deployed to the ledger when the DIT is deployed. In this way, a DIT file composed of multiple artifacts (DARs, Bots, UI's, etc.) can be constructed to deploy a set of artifacts to a single ledger in a single action.

Integrations

Integrations are a special case of DIT file that are augmented with the ability to run as an executable within a Daml Hub cluster. This is done by packaging Python DAZL bot code into an executable ZIP using PEX and augmenting tha resulting file with the metadata and other resources needed to make it a correctly formed DIT file.

Logically speaking, Daml Hub integrations are DAZL bots packaged with information needed to fit them into the Daml Hub runtime and user interface. The major functional contrast between a Daml Hub integration and a Python Bot is that the integration has the external network access needed to connect to an outside system and the Python Bot does not. Due to the security implications of running within Daml Hub with external network access, integrations can only be deployed with the approval of DA staff.

Developing Integrations

The easiest way to develop an integration for Daml Hub is to use the framework library and ddit build tool. The integration framework presents a Python API closely related to the DAZL bot api and ensures that integrations follow the conventions required to integrate into Daml Hub.

Unless you know exactly what you are doing and why you are doing it, use the framework.

The Integration Runtime Environment

By convention, integrations accept a number of environment variables that specify key paramaters. Integrations built with the framework use defaults for these variables that connect to a default locally configured sandbox instance.

Variables provided by Daml Hub include the following:

Variable Default Purpose
DAML_LEDGER_URL http://localhost:6865 Address of local ledger gRPC API
DABL_HEALTH_PORT 8089 Port for HTTP endpoint. (Used for both liveness/readiness and webhooks)
DABL_JWKS_URL HTTP URL for JWKS Repository
DABL_INTEGRATION_METADATA_PATH 'int_args.yaml' Path to local metadata file
DABL_INTEGRATION_TYPE_ID Type ID for the specific integration within the DIT to run
DABL_LEDGER_PARTY Party identifier for network connection
DABL_LOG_LEVEL 0 Log verbosity level - 0 up to 50, inclusive.

(Note that for legacy reasons, the ledger URL is also available under the DABL_LEDGER_URL environment variable.)

Logging

DABL integrations use the default Python logging package, and the framework provides specific support for controlling log level at runtime. To integrate properly with this logic, it is important that integrations use the integration logger. This logger is switched from INFO level to DEBUG level at a DABL_LOG_LEVEL setting of 10 or above.

The preferred way of creating an integration logger is via the getIntegrationLogger function in the API package.

Metadata

Release files for daml-dit-api 0.5.0

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

Source distribution (sdist)

Source distribution for daml-dit-api 0.5.0
File Size Uploaded
daml_dit_api-0.5.0.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for daml-dit-api 0.5.0
File Interpreter ABI Platform
daml_dit_api-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.6 kB

Release files / daml_dit_api-0.5.0.tar.gz

Download URL daml_dit_api-0.5.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0b8069d273a6d783db4c0fff530c40eb06e9f9f44667e2fa5330cd1961b4f2ed
BLAKE2b-256 checksum
How to use checksums
01047e605222637f49549f59142387a19a7c222fc01655885bbe1cfd7fe063f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.6 Darwin/23.2.0

Release files / daml_dit_api-0.5.0-py3-none-any.whl

Download URL daml_dit_api-0.5.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1e70d292b73c6452a0fd8edfdbc747f25515e8e519cf6ae773bca96176efee9
BLAKE2b-256 checksum
How to use checksums
606c672cef98ff58c85d281ae3c58c2283614186bb29ef70abf8cc15fe8e17fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.6 Darwin/23.2.0

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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