Query Engine API for Distributed AtomSpace
Project description
Hyperon DAS
Hi! This package is a query engine API for Distributed AtomSpace (DAS). When is possible execute queries using Pattern Matcher
Table of Contents
Installation
Before you start, make sure you have Python >= 3.8.5 and Pip installed on your system.
You can install and run this project using different methods. Choose the one that suits your needs.
Using-pip
Run the following command to install the project using pip::
pip install hyperon-das
Using-Poetry
If you prefer to manage your Python projects with Poetry, follow these steps:
-
Install Poetry (if you haven't already):
pip install poetry
-
Clone the project repository:
git clone git@github.com:singnet/das-query-engine.git cd das-query-engine
-
Install project dependencies using Poetry:
poetry install
-
Activate the virtual environment created by Poetry:
poetry shell
Now you can run the project within the Poetry virtual environment.
Usage
You can instantiate DAS in three different ways. see below:
Local
This is a local instance of DAS with default settings.
from hyperon_das import DistributedAtomSpace
das = DistributedAtomSpace()
Remote
To create a remote DAS, you need to specify the 'query_engine' parameter as 'remote' and pass the machine, 'host' and 'port' parameters. See below how to do this:
from hyperon_das import DistributedAtomSpace
das = DistributedAtomSpace(query_engine='remote', host='0.0.0.0', port=1234)
Server
To create a DAS server, you will need to specify the 'atomdb' parameter as 'redis_mongo' and pass the database parameters. The databases supported in this release are Redis and MongoDB. Therefore, the minimum expected parameters are:
- mongo_hostname
- mongo_port
- mongo_username
- mongo_password
- redis_hostname
- redis_port
but it is possible to pass other configuration parameters:
- mongo_tls_ca_file
- redis_username
- redis_password
- redis_cluster
- redis_ssl
from hyperon_das import DistributedAtomSpace
das = DistributedAtomSpace(
atomdb='redis_mongo',
mongo_hostname='127.0.0.2',
mongo_port=27017,
mongo_username='mongo',
mongo_password='mongo',
redis_hostname='127.0.0.1',
redis_port=6379
)
Tests
You can run the command below to run the unit tests
make test-unit
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
Hashes for hyperon_das-0.3.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a07b6ae5ca96e63d6835629aea8467c64e3624fc4860bca0e6252d8ea1994f63 |
|
MD5 | e24f9085a3764301c2dffd7a3210395a |
|
BLAKE2b-256 | 9963989c5754ead855e6a126c511aec061165fcd4908e7730a8be70c5bc8cd52 |