Skip to main content

NoSQL in-memory Tango DB for project testing

Project description

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:

Connectors

Two connectors are provided using the same data structure:

  • beacon using a Redis/Beacon infrastructure to store the database;
  • yaml using 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 specifuc directory containing Yaml files:

NosqlTangoDB --port 10000 --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

# ~/.pypirc
[nosql-tango-db]
repository = https://upload.pypi.org/legacy/
username = __token__
password = pypi-...
pip wheel . --wheel-dir=dist
twine upload dist/nosqltangodb-*.whl -r nosqltangodb

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

nosqltangodb-1.0.3-py3-none-any.whl (45.8 kB view details)

Uploaded Python 3

File details

Details for the file nosqltangodb-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nosqltangodb-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5d6d25c93481f954ad0907855dbc458b81653e874c6419e629abe529c9ad8a04
MD5 a350b0e0e247735572e1f3f7f2c2d750
BLAKE2b-256 809e26a55879f63001af1ad76d273d236b086e8491612b6feaafd2061a61f40c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page