openassetio-manager-bal


Nameopenassetio-manager-bal JSON
Version 1.0.0a15 PyPI version JSON
download
home_pageNone
SummaryA contrived "asset management system" for OpenAssetIO integration test cases.
upload_time2024-04-16 13:51:29
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords openassetio manager
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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 though the OpenAssetIO API.
See the SampleAssetManager for a more concrete example of canonical
manager behavior.

> 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](https://docs.python.org/3/library/time.html#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](https://github.com/OpenAssetIO/OpenAssetIO-MediaCreation/blob/3da0b7cf055b5d93f01b031bdd239520e413a750/traits.yml#L277)
  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](https://github.com/OpenAssetIO/OpenAssetIO-Manager-BAL).

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

```bash
python -m pip install openassetio-manager-bal
```

## Library file format

A [JSON Schema](https://json-schema.org) is provided
[here](https://raw.githubusercontent.com/OpenAssetIO/OpenAssetIO-Manager-BAL/main/schema.json)
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](https://github.com/OpenAssetIO/OpenAssetIO-Manager-BAL):

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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "openassetio-manager-bal",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "openassetio, manager",
    "author": null,
    "author_email": "Contributors to the OpenAssetIO project <openassetio-discussion@lists.aswf.io>",
    "download_url": null,
    "platform": null,
    "description": "# The Basic Asset Library (BAL) example manager\n\nThe BasicAssetLibrary provides a basic \"librarian\" asset management\nsystem.\n\nIt serves to provide a minimum level of functionality to allow simple,\nrepeatable demonstrations and end-to-end tests to be realized with as\nlittle supporting infrastructure as possible.\n\nIt is not intended to be any kind of comprehensive example of the\nbreadth of functionality exposed though the OpenAssetIO API.\nSee the SampleAssetManager for a more concrete example of canonical\nmanager behavior.\n\n> Note: This code is a sketch to facilitate testing and sample\n> workflows. It should never be considered in any way a \"good example\n> of how to write an asset management system\". Consequently, it omits\n> a plethora of \"good engineering practice\".\n\n## Features\n\n- Resolves references with the `bal:///` prefix to data from a\n  pre-configured library of assets stored in a `.json` file.\n\n- Environment variables are expanded in string-type trait property\n  values (using the `$var` or `${var}` syntax, escape `$` using `$$`). A\n  library can also define arbitrary variables of its own under the\n  top-level `variables` key. In addition, BAL provides the built-in\n  `$bal_library_path`, `$bal_library_dir` and `$bal_library_dir_url`\n  variables, which can be used to anchor to the current library\n  location.\n\n  Any string undergoing expansion will also be normalized, removing\n  relative paths, if that string presents as a file URL.\n\n- The library file to be used is controlled by the `library_path`\n  setting, and this should point to a library file with valid content.\n\n- If no `library_path` has been specified, the `BAL_LIBRARY_PATH` env\n  var will be checked to see if it points to a valid library file.\n\n- Persists newly registered data in-memory (the original library JSON is\n  not updated).\n\n- Simulate network delay with the `simulated_query_latency_ms` setting.\n  > **Note**\n  >\n  > Pythons [time.sleep](https://docs.python.org/3/library/time.html#time.sleep)\n  > is the mechanism by which the delay is triggered.\n  > Simulated query latency defaults to 10ms.\n\n- The entity reference URL scheme consumed by BAL can be adjusted from the\n  default of `bal` using the `entity_reference_url_scheme` setting.\n  This must be set to a simple alphanumeric string.\n\n- Specific versions of BAL entities are accessed using the `v=X` query\n  parameter, where `X` is an integer version number starting at `1` or\n  the string `latest`. BAL also supports OpenAssetIO-MediaCreation\n  `*EntityVersionsRelationship` [relationship](https://github.com/OpenAssetIO/OpenAssetIO-MediaCreation/blob/3da0b7cf055b5d93f01b031bdd239520e413a750/traits.yml#L277)\n  queries, including filtering by `stableTag`.\n\n## Installation\n\nTo use the plugin in an OpenAssetIO host, install via `pip`, or set (or append) the\n`OPENASSETIO_PLUGIN_PATH` env var to include the `plugin` directory in\na checkout of the [source repository](https://github.com/OpenAssetIO/OpenAssetIO-Manager-BAL).\n\nThe plugin provides a manager with the identifier\n`org.openassetio.examples.manager.bal`.\n\n```bash\npython -m pip install openassetio-manager-bal\n```\n\n## Library file format\n\nA [JSON Schema](https://json-schema.org) is provided\n[here](https://raw.githubusercontent.com/OpenAssetIO/OpenAssetIO-Manager-BAL/main/schema.json)\nthat validates a BAL library file.\n\n## Testing\n\nThe test fixtures take care of providing a suitable host environment and\nconfiguring the OpenAssetIO plugin search paths for you. Assuming your\nworking directory is set to a checkout of the\n[source repository](https://github.com/OpenAssetIO/OpenAssetIO-Manager-BAL):\n\n```bash\npython -m venv .venv\n. .venv/bin/activate\npython -m pip install -r tests/requirements.txt\npython -m pip install .\npython -m pytest ./tests\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A contrived \"asset management system\" for OpenAssetIO integration test cases.",
    "version": "1.0.0a15",
    "project_urls": {
        "Issues": "https://github.com/OpenAssetIO/OpenAssetIO-Manager-BAL/issues",
        "OpenAssetIO": "https://github.com/OpenAssetIO/OpenAssetIO",
        "Source": "https://github.com/OpenAssetIO/OpenAssetIO-Manager-BAL"
    },
    "split_keywords": [
        "openassetio",
        " manager"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ac5ec413c9f59184a6b24ce832aceda4f07cc8cf5177ca57a5219bb6c8534cc",
                "md5": "2bd608abcb64284d7b8ee4de38e5e542",
                "sha256": "4e58cb2d08fba79e45d0897b6d10b23815d0acbc90313a2ed97fff9fe3498d1d"
            },
            "downloads": -1,
            "filename": "openassetio_manager_bal-1.0.0a15-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2bd608abcb64284d7b8ee4de38e5e542",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 20497,
            "upload_time": "2024-04-16T13:51:29",
            "upload_time_iso_8601": "2024-04-16T13:51:29.221641Z",
            "url": "https://files.pythonhosted.org/packages/7a/c5/ec413c9f59184a6b24ce832aceda4f07cc8cf5177ca57a5219bb6c8534cc/openassetio_manager_bal-1.0.0a15-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-16 13:51:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OpenAssetIO",
    "github_project": "OpenAssetIO-Manager-BAL",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "openassetio-manager-bal"
}
        
Elapsed time: 0.23469s