Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

The Basic Asset Library (BAL) example manager

The BasicAssetLibrary provides a basic "librarian" asset management system.

It serves to provide a minimum level of functionality to allow simple, repeatable demonstrations and end-to-end tests to be realized with as little supporting infrastructure as possible.

It is not intended to be any kind of comprehensive example of the breadth of functionality exposed through the OpenAssetIO API. For a more detailed reference implementation, see OpenAssetIO-MediaCreation or consult the official documentation.

Note: This code is a sketch to facilitate testing and sample workflows. It should never be considered in any way a "good example of how to write an asset management system". Consequently, it omits a plethora of "good engineering practice".

Features

  • Resolves references with the bal:/// prefix to data from a pre-configured library of assets stored in a .json file.

  • Environment variables are expanded in string-type trait property values (using the $var or ${var} syntax, escape $ using $$). A library can also define arbitrary variables of its own under the top-level variables key. In addition, BAL provides the built-in $bal_library_path, $bal_library_dir and $bal_library_dir_url variables, which can be used to anchor to the current library location.

    Any string undergoing expansion will also be normalized, removing relative paths, if that string presents as a file URL.

  • The library file to be used is controlled by the library_path setting, and this should point to a library file with valid content.

  • If no library_path has been specified, the BAL_LIBRARY_PATH env var will be checked to see if it points to a valid library file.

  • Persists newly registered data in-memory (the original library JSON is not updated).

  • Simulate network delay with the simulated_query_latency_ms setting.

    Note

    Pythons time.sleep is the mechanism by which the delay is triggered. Simulated query latency defaults to 10ms.

  • The entity reference URL scheme consumed by BAL can be adjusted from the default of bal using the entity_reference_url_scheme setting. This must be set to a simple alphanumeric string.

  • Specific versions of BAL entities are accessed using the v=X query parameter, where X is an integer version number starting at 1 or the string latest. BAL also supports OpenAssetIO-MediaCreation *EntityVersionsRelationship relationship queries, including filtering by stableTag.

Installation

To use the plugin in an OpenAssetIO host, install via pip, or set (or append) the OPENASSETIO_PLUGIN_PATH env var to include the plugin directory in a checkout of the source repository.

The plugin provides a manager with the identifier org.openassetio.examples.manager.bal.

python -m pip install openassetio-manager-bal

Library file format

A JSON Schema is provided here that validates a BAL library file.

Testing

The test fixtures take care of providing a suitable host environment and configuring the OpenAssetIO plugin search paths for you. Assuming your working directory is set to a checkout of the source repository:

python -m venv .venv
. .venv/bin/activate
python -m pip install -r tests/requirements.txt
python -m pip install .
python -m pytest ./tests

Metadata

Release files for openassetio-manager-bal 1.0.0b1.post1

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

Built distribution (wheel)

Table of built distributions (wheels) for openassetio-manager-bal 1.0.0b1.post1
File Interpreter ABI Platform
openassetio_manager_bal-1.0.0b1.post1-py3-none-any.whl Python 3 none any Details

Release files / openassetio_manager_bal-1.0.0b1.post1-py3-none-any.whl

Download URL openassetio_manager_bal-1.0.0b1.post1-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75514060786b136b19d80a2a5e36f4d4237f4be0bed3d512e7d4ba7d1f1f40ad
BLAKE2b-256 checksum
How to use checksums
a4af007574a0e60b159335d0780244e95aea1c7bf4045c9b3a9be522ad6dada2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12
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