| commit | 493ebc0a963512317e70d873f47551ede7b966c2 | [log] [tgz] |
|---|---|---|
| author | Arindaam Roy <alpharoy14@gmail.com> | Tue May 20 22:02:04 2025 -0400 |
| committer | GitHub <noreply@github.com> | Tue May 20 22:02:04 2025 -0400 |
| tree | b3dabd991b0de6813ee237a3762473ad3cde194d | |
| parent | ac21909914d06c1f1eedf573df7c43c31de66d10 [diff] |
Update README.md
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.