| commit | ac21909914d06c1f1eedf573df7c43c31de66d10 | [log] [tgz] |
|---|---|---|
| author | Arindaam Roy <alpharoy14@gmail.com> | Tue May 20 18:55:40 2025 -0700 |
| committer | GitHub <noreply@github.com> | Tue May 20 18:55:40 2025 -0700 |
| tree | 18b77ac27a18607f3a8fe9fc703820a594ef2247 | |
| parent | a0d19cee919f3e44946a23f18cc97fab98c76e48 [diff] |
Update docs - update readme - add contributing strategy
High-performance blockchain database SDK for Python applications
Quick Start β’ Documentation β’ Examples β’ Contributing β’ Support
[!NOTE]
Apache ResilientDB is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects.
# Clone the repository git clone https://github.com/apache/incubator-resilientdb-python-sdk.git cd incubator-resilientdb-python-sdk # Set up the environment sh INSTALL.sh python3.10 -m venv venv source venv/bin/activate pip install -r requirements.txt
from resdb_driver import Resdb from resdb_driver.crypto import generate_keypair from typing import Dict, Any # Initialize the client db = Resdb('http://127.0.0.1:18000') # Generate keypairs for the example alice, bob = generate_keypair(), generate_keypair() # Create a digital asset asset = { "data": { "token_for": "example", "description": "Example token", }, } # Prepare transaction prepared_tx = db.transactions.prepare( operation='CREATE', signers=alice.public_key, recipients=[([bob.public_key], 10)], # Transfer 10 tokens to Bob asset=asset, ) # Sign the transaction fulfilled_tx = db.transactions.fulfill( prepared_tx, private_keys=alice.private_key ) # Send the transaction tx_id_str = db.transactions.send_commit(fulfilled_tx) # Retrieve the transaction result = db.transactions.retrieve(fulfilled_tx["id"]) print(f"Retrieved transaction: {result}")
Transaction Management
Block Operations
Asset & Metadata Management
DB Connection
source venv/bin/activate sh service/tools/start_kv_service_sdk.sh
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
resilientdb-python-sdk/ βββ docs/ # Documentation and guides βββ resdb_driver/ # Core SDK implementation βββ service/ # Service implementations β βββ http_server/ # HTTP API service (Crow) β βββ kv_service/ # Key-Value service βββ test/ # Test suite
TODO: add tests
Connection Refused
Solution: Ensure the HTTP service is running on port 18000
Python Version Mismatch
Solution: Use Python 3.9 or higher, preferably in a virtual environment
Bazel Build Failures
Solution: Check Bazel version and ensure all dependencies are installed
We welcome contributions! See our Contributing Guidelines for:
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.