Skip to main content

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

Repositories documentation

Project details


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.11.tar.gz (13.9 kB view hashes)

Uploaded Source

Built Distribution

hyperon_das_atomdb-0.2.11-py3-none-any.whl (18.3 kB view hashes)

Uploaded Python 3

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