No SQL in-memory Tango database for testing.
It provides
- An human readable data structure based on Yaml to describe the content of a tango database;
- Helpers to launch such database in python for testing.
The code was previously at:
- https://github.com/tango-controls/pytango/blob/a8f6a3bfbf547f5b1bb22772280f0eb6e655486f/tango/databaseds/db_access/beacon.py
- https://gitlab.esrf.fr/bliss/bliss/-/commit/c17bcc328d337de856449e3826023dc9f7dac858
Connectors
Two connectors are provided using the same data structure:
beaconusing a Redis/Beacon infrastructure to store the database;yamlusing direct yaml files with in-memory only storage.
Command line
The database can be launched the following ways.
Using the actual Redis database:
NosqlTangoDB --port 10000 --db_access=beacon 2
Using a specific directory containing Yaml files:
NosqlTangoDB --port 10000 --db_access=yaml:tests/data/test1/ 2
Using a specific hostname
NosqlTangoDB --port 10000 --host localhost --db_access=yaml:tests/data/test1/ 2
Python
The following code can be used in Python projects.
It spawns the database process with a context manager.
The port is yield when the database is ready to be used.
It finally terminates the database process.
from nosqltangodb import helper
with helper.running_db(
name="2",
db_access="yaml",
yaml_root=yaml_root,
port="auto",
debug_protocol=True,
update_tango_host=True,
timeout=10,
) as db:
print("Tango DB port:", db.port)
Project release
Here is the template for pypi credencial.
# ~/.pypirc
[nosql-tango-db]
repository = https://upload.pypi.org/legacy/
username = __token__
password = pypi-...
The project uses setuptools-scm configured such way the distribution is tagged according to the actual commit tag.
Tag your release:
git tag x.y.z
Build the package:
pixi run dist
# The wheel is created inside ./dist
ls ./dist
Upload the result to pypi:
pixi run upload
# Same as: twine upload dist/nosqltangodb-*.whl -r nosqltangodb
Finally:
git push --tag
Metadata
Release files for nosqltangodb 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nosqltangodb-1.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Release files / nosqltangodb-1.0.8-py3-none-any.whl
| Download URL | nosqltangodb-1.0.8-py3-none-any.whl |
|---|---|
| Size | 46.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3bcb9e08681c577a0990abd13c569a47b1a85dac04dd039363a5fcda8382c0d3
|
|
BLAKE2b-256 checksum How to use checksums |
872f78b136d30b2c7eab5a816623f248986cab613ff91926f106b9cddcd001dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for nosqltangodb 1.0.8
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.