Persistence layer for Distributed AtomSpace
Project description
Hyperon DAS AtomDB
Persistence layer for Distributed AtomSpace
Installation
This package requires: python >= 3.10 to run.
This package is deployed on Pypi. If you want, you can install using the pip command
pip install hyperon-das-atomdb
If you want to run it without installing it by pip, you can follow the following approach
We use the Poetry package to manage project dependencies and other things. So, if you have Poetry on your machine, you can run the commands below to prepare your environment
1. poetry install
2. poetry shell (activate virtual environment)
Environment Variables
You must have the following variables set in your environment with their respective values:
DAS_MONGODB_HOSTNAME=172.17.0.2
DAS_MONGODB_PORT=27017
DAS_MONGODB_USERNAME=mongo
DAS_MONGODB_PASSWORD=mongo
DAS_MONGODB_TLS_CA_FILE=global-bundle.pem [optional]
DAS_REDIS_HOSTNAME=127.0.0.1
DAS_REDIS_PORT=6379
DAS_REDIS_USERNAME=admin [optional]
DAS_REDIS_PASSWORD=admin [optional]
DAS_USE_REDIS_CLUSTER=false [default: true]
DAS_USE_REDIS_SSL=false [default: true]
Usage
1 - Redis and MongoDB
- You must have Redis and MongoDB running in your environment
- To initialize the databases you must pass the parameters with the necessary values. Otherwise, default values will be used. See below which parameters it is possible to pass and their respective default values:
from hyperon_das_atomdb.adapters import RedisMongoDB
redis_mongo_db = RedisMongoDB(
mongo_hostname='localhost',
mongo_port=27017,
mongo_username='mongo',
mongo_password='mongo',
mongo_tls_ca_file=None,
redis_hostname='localhost',
redis_port=6379,
redis_username=None,
redis_password=None,
redis_cluster=True,
redis_ssl=True,
)
2 - In Memory DB
from hyperon_das_atomdb.adapters import InMemoryDB
in_memory_db = InMemoryDB()
Pre-Commit Setup
Before pushing your changes, it's recommended to set up pre-commit to run automated tests locally. Run the following command (needs to be done once):
pre-commit install
Tests
You can ran the command below to execute the unit tests
make unit-tests
Documentation References
Release Notes
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
File details
Details for the file hyperon_das_atomdb-0.8.9.tar.gz
.
File metadata
- Download URL: hyperon_das_atomdb-0.8.9.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c0288b7b455fe60183ddebd7c7fb8041fe1f7365bd62254e6b0a69933081fd7 |
|
MD5 | 931ecc548b2a614ecfc946687d2eafd8 |
|
BLAKE2b-256 | 3730d8988767d433d2abef14861144bd10832a5646bb28e1f724e8e616be86fe |
File details
Details for the file hyperon_das_atomdb-0.8.9-py3-none-any.whl
.
File metadata
- Download URL: hyperon_das_atomdb-0.8.9-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 667773dea13d81237c8630f150efbde417cca1cff2d489f8dc5e99cda11cdbcc |
|
MD5 | 93177df598411d0a3c3ff2714b4a9e83 |
|
BLAKE2b-256 | a44ff578561b83bd31b89dce27892af0eba13121a1fcd4610eed41b0ff662a1e |