https://github.com/apache/incubator-resilientdb-python-sdk
Python SDK for ResilientDB
https://github.com/apache/incubator-resilientdb-python-sdk
blockchain-service crypto-sdk python-sdk utxo
Last synced: 4 months ago
JSON representation
Python SDK for ResilientDB
- Host: GitHub
- URL: https://github.com/apache/incubator-resilientdb-python-sdk
- Owner: apache
- License: apache-2.0
- Created: 2022-09-25T22:02:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-03T04:48:31.000Z (8 months ago)
- Last Synced: 2025-01-30T10:11:15.167Z (4 months ago)
- Topics: blockchain-service, crypto-sdk, python-sdk, utxo
- Language: Python
- Homepage: https://resilientdb.com/
- Size: 1.63 MB
- Stars: 6
- Watchers: 11
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# ResilientDB SDK
## Check Python is up-to-date (3.9+)
`$ python3 --version`If your Python version number is too low you may encounter type hinting issues when attempting to run the code. You can use a Python virtual environment, as shown below.
## First-time set up
`$ sh INSTALL.sh`
`$ python3.10 -m venv venv`
`$ source venv/bin/activate`
`$ pip install -r requirements.txt`
The correct Python configuration is needed for transaction validation.
## Running KV service
If your virtual environment is not already active:
`$ source venv/bin/activate`
Run the script to start 4 local nodes
`$ sh service/tools/start_kv_service_sdk.sh`
## Running Crow service (HTTP endpoints)
`$ bazel build service/http_server/crow_service_main`
`$ bazel-bin/service/http_server/crow_service_main service/tools/config/interface/client.config service/http_server/server_config.config`
For a list of endpoints visit [here](./service/http_server/README.md)
## Testing
`$ bazel-bin/service/kv_service/kv_service_tools service/tools/config/interface/service.config set test 1234`
## Running the driver
Examples of using the driver can be seen in [test_driver](/test_driver.py)
Replace the db_root_url with the address of the ResilientDB HTTP endpoints e.g. `127.0.0.1:18000`
## TODO
- Setting up linting (using [black](https://github.com/psf/black)) through github hooks
- convert the sdk into a package (for pip install)
- Potentially have a docker setup which fetched the Resdb image and runs it locally