Skip to main content

DABL Integrations API Package

Project description

daml-dit-api

API definitions for integrations and other sorts of packages to be hosted by DABL. This contains the following:

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 DABL. An example of a deployment instruction is a subdeployment. A subdeployment instructs DABL 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 DABL 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, DABL integrations are DAZL bots packaged with information needed to fit them into the DABL runtime and user interface. The major functional contrast between a DABL 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 DABL 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 DABL 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 DABL. The framework parses ledger connection arguments, translates configuration metadata into a domain object specific to the integration, and exposes the appropriate health check endpoints required to populate the DABL integration user interface.

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.

Available variables include the following:

Variable Default Purpose
DABL_HEALTH_PORT 8089 Port for Health/Status HTTP endpoint
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_ID 'cloudbox' Ledger ID for local ledger
DABL_LEDGER_URL http://localhost:6865 Address of local ledger gRPC API

Project details


Download files

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

Source Distribution

daml-dit-api-0.2.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

daml_dit_api-0.2.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file daml-dit-api-0.2.0.tar.gz.

File metadata

  • Download URL: daml-dit-api-0.2.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.8.3 Darwin/19.6.0

File hashes

Hashes for daml-dit-api-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e05a2602d55c6956709170043c38659945cbe575dfeac8c1b3cadb7cbfe1c83f
MD5 805e070ed9defa16cfeceff9a96e31a6
BLAKE2b-256 0c5c73d8d098795c200821816ff39c4b3123d09292578cb746bb65fae7af1a63

See more details on using hashes here.

File details

Details for the file daml_dit_api-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: daml_dit_api-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.8.3 Darwin/19.6.0

File hashes

Hashes for daml_dit_api-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c453a98df300116a31f7754b79a3af3e28b6ef9d25c97dcecd6a9088436a84a8
MD5 69d94ea0c264e7bafc16e0aa09127594
BLAKE2b-256 111cac1e94ef5ad8e093cae8ae010aa8d00951d266641d56e017fa4140e8bb06

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