Reusable TypeDB 3 Python utilities and interface layer
Project description
typedb_utils
typedb_utils is the reusable, non-ROS TypeDB 3 Python layer extracted from
the ros_typedb repository.
It provides:
TypeDBInterfacefor connecting to TypeDB, loading schema/data, and running define/insert/delete/fetch/get/aggregate queries- helper functions for converting Python values to TypeQL literals and building common query fragments
This package is still kept inside the same monorepo so it can be built with
colcon together with ros_typedb, but it has no ROS runtime dependencies.
Example:
from typedb_utils.typedb_interface import TypeDBInterface
db = TypeDBInterface(
'localhost:1729',
'example_db',
schema_path=['/abs/path/schema.tql'],
data_path=['/abs/path/data.tql'],
force_database=True,
)
rows = db.fetch_database(
"""
match
$p isa person;
fetch { "email": $p.email };
"""
)
Packaging
typedb_utils is both an ament_python workspace package and a standard
Python distribution. You can build it locally with:
cd typedb_utils
python3 -m pip install --upgrade build twine
python3 -m build
python3 -m twine check dist/*
The repository also includes GitHub Actions workflow
publish-typedb-utils.yml,
which builds the package from the typedb_utils/ subdirectory and publishes it
to PyPI via Trusted Publishing on tags matching typedb_utils-v*.
Release flow:
- bump the version in
typedb_utils/setup.pyandtypedb_utils/package.xml - push the commit to
main - create and push a matching tag such as
typedb_utils-v0.1.0 - ensure the PyPI project is configured with this GitHub workflow as a Trusted Publisher
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file typedb_utils-0.1.0.tar.gz.
File metadata
- Download URL: typedb_utils-0.1.0.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83147cee4221df06ad30c801c7e694d4fbb1b551a3fdedbab4d074a0439255a9
|
|
| MD5 |
4fcd00588cd0925778a40a2ba0d37a3a
|
|
| BLAKE2b-256 |
a97cadf0edfe52754a9cd5d4702dd75a32c6479776f50ed0d88fe29054ff37c8
|
Provenance
The following attestation bundles were made for typedb_utils-0.1.0.tar.gz:
Publisher:
publish-typedb-utils.yml on kas-lab/ros_typedb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
typedb_utils-0.1.0.tar.gz -
Subject digest:
83147cee4221df06ad30c801c7e694d4fbb1b551a3fdedbab4d074a0439255a9 - Sigstore transparency entry: 1262791625
- Sigstore integration time:
-
Permalink:
kas-lab/ros_typedb@b20062632b3e061441c23b62b5539e61dfedff5f -
Branch / Tag:
refs/tags/typedb_utils-v0.1.0 - Owner: https://github.com/kas-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-typedb-utils.yml@b20062632b3e061441c23b62b5539e61dfedff5f -
Trigger Event:
push
-
Statement type:
File details
Details for the file typedb_utils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: typedb_utils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0022a7817b7bef6f459bb914758344a8bfd3b7fa1d52eba623950acc20db2e5d
|
|
| MD5 |
7ac3798b57f7786eddd42053b8554f91
|
|
| BLAKE2b-256 |
faee24701212697fa7d8a1258290e78bee55ea46347b327c3ed7a7fe304cb433
|
Provenance
The following attestation bundles were made for typedb_utils-0.1.0-py3-none-any.whl:
Publisher:
publish-typedb-utils.yml on kas-lab/ros_typedb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
typedb_utils-0.1.0-py3-none-any.whl -
Subject digest:
0022a7817b7bef6f459bb914758344a8bfd3b7fa1d52eba623950acc20db2e5d - Sigstore transparency entry: 1262791628
- Sigstore integration time:
-
Permalink:
kas-lab/ros_typedb@b20062632b3e061441c23b62b5539e61dfedff5f -
Branch / Tag:
refs/tags/typedb_utils-v0.1.0 - Owner: https://github.com/kas-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-typedb-utils.yml@b20062632b3e061441c23b62b5539e61dfedff5f -
Trigger Event:
push
-
Statement type: