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.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

Repositories documentation

Release Notes

DAS AtomDB Releases

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.8.8.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

hyperon_das_atomdb-0.8.8-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file hyperon_das_atomdb-0.8.8.tar.gz.

File metadata

  • Download URL: hyperon_das_atomdb-0.8.8.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

File hashes

Hashes for hyperon_das_atomdb-0.8.8.tar.gz
Algorithm Hash digest
SHA256 051f4ca80b4d8a13feb42e5f0b97c524295a5baeb1965c9207abb2f24cf69e45
MD5 06a51ce047ddfaa5c560ad8189578690
BLAKE2b-256 4258107c2808aaea47bd2745a7c66a4d862ff1da1b7c8b218aaf50faf8a088b5

See more details on using hashes here.

File details

Details for the file hyperon_das_atomdb-0.8.8-py3-none-any.whl.

File metadata

  • Download URL: hyperon_das_atomdb-0.8.8-py3-none-any.whl
  • Upload date:
  • Size: 33.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

File hashes

Hashes for hyperon_das_atomdb-0.8.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2ffd97ef3fc68bfc1bd113baf5d02ad26f2671a73a6c2ef5e80967aafc3a09c2
MD5 ebae7b4109269b07ab7069bd1f5e4fbe
BLAKE2b-256 078ebc18044a8fa269377c73af62c491ab9c9a8c5b19a99fdbc0d006df4ae135

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