📂 dbetto
A tiny text-based database.
dbetto is a lightweight Python library that enables seamless access and management of text-based databases (JSON/YAML) scattered across your filesystem. Whether you're handling nested data structures or querying data by validity periods, dbetto simplifies it all with an intuitive interface.
The project was originally developed to efficiently manage metadata for the LEGEND experiment.
Key Features
- Access JSON/YAML files like a Python dictionary
- Attribute-style access with tab-completion for rapid query
- Time-sensitive data querying with validity rules
- Data remapping and grouping functionalities
Showcase
Install from PyPI:
pip install dbetto
Access data arbitrarily structured as JSON or YAML files:
>>> from dbetto import TextDB
>>> db = TextDB("/path/to/data/folder")
>>> db["dir1"]["file1.json"]["value"]
1
>>> db.dir1.file1.value
1
Query data valid on a given time period:
>>> from datetime import datetime
>>> db.on(datetime(2023, 1, 10, 9, 53, 0)).value
3
Map data according to alternative keys:
>>> chmap = db["detectors.yaml"]
>>> chmap.V05266A
{'name': 'V05266A',
'location': {'string': 1, 'position': 4},
'daq': {'crate': 0,
'rawid': 1104003,
...
>>> chmap.map("daq.rawid")[1104003]
{'name': 'V05266A',
'location': {'string': 1, 'position': 4},
'daq': {'crate': 0,
'rawid': 1104003}}
>>> grouped = chmap.group("electronics.cc4.id")["C3"]
>>> grouped.map("name").keys()
dict_keys(['V02160A', 'V02160B', 'V05261B', 'V05266A', 'V05266B', 'V05268B', 'V05612A'])
Have a look at the docs for more!
Claude Code skill
This repo ships a Claude Code skill,
inspect-textdb, that teaches the agent to load, query, and verify dbetto text
databases (JSON/YAML files and time-validity files). Install it from the remote
repo without cloning:
/plugin marketplace add gipert/dbetto
/plugin install inspect-textdb@dbetto-tools
Metadata
Release files for dbetto 1.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dbetto-1.4.1.tar.gz | 37.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dbetto-1.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.5 kB
Release files / dbetto-1.4.1.tar.gz
| Download URL | dbetto-1.4.1.tar.gz |
|---|---|
| Size | 37.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be4266c3b240f3871451e75c7220f15e90f626acf77f8d4555f39f614ee83f83
|
|
BLAKE2b-256 checksum How to use checksums |
3a1f34bfd7d0dc7c0a0ac0ac133fe6e16550d5725e34b5a5613764f826894cbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / dbetto-1.4.1-py3-none-any.whl
| Download URL | dbetto-1.4.1-py3-none-any.whl |
|---|---|
| Size | 19.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ad368e16efc7a7fd326d2935fd4a5325fd766385d0cc9fe033051a23056f786
|
|
BLAKE2b-256 checksum How to use checksums |
325b193b331a741167ef0697e9adfd0ded2719cea1124fb21d26fb322a27ba72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency log