Persistence layer for Distributed AtomSpace
Project description
Hyperon DAS AtomDB
Persistence layer for Distributed AtomSpace
Installation
This package requires: python >= 3.8.5 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_USE_CACHED_NODES=false [default: true]
DAS_USE_CACHED_LINK_TYPES=false [default: true]
DAS_USE_CACHED_NODE_TYPES=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()
Tests
You can ran the command below to execute the unittests
make test-unit
Documentation References
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
hyperon_das_atomdb-0.2.12.tar.gz
(13.9 kB
view hashes)
Built Distribution
Close
Hashes for hyperon_das_atomdb-0.2.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44200bfba5de48b9a9acc51e6bf323d6d3a62bd4f1122b4a4995fbde8e203254 |
|
MD5 | ab913b333c6ebc254e2bfd82f8fdb4bc |
|
BLAKE2b-256 | 5d09eb0931e1742d845a0dae8cfa6fffdcf0d01b12b21c5611ddae69185d38a2 |
Close
Hashes for hyperon_das_atomdb-0.2.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca9b0797e5d75b0b185139850f76621b0965eff5c919a6b57892dc2b0301296f |
|
MD5 | 7d486428351e933f041e8aa10c85952b |
|
BLAKE2b-256 | 6063e8aca735a28c9d564a8d3bc674c4ec1da3654db24cba6a8beb86a977a55c |