Djib Python API
Project description
Djib Python SDK
It's the base Python library for interacting with Djib network. You can use it interact with the Djib network.
Quickstart
Installation
pip install djib
General RPC Usage
from djib.rpc import DjibRpc
WALLET_PRIVATE_KEY = '<Base58 encoded string>'
try:
rpc = DjibRpc(WALLET_PRIVATE_KEY, is_devnet=True)
# status of drive
response = rpc.status()
if response.error:
print(f"Error: {response.error['message']}, Code: {response.error['code']}, Data: {response.error['data']}")
else:
print(response.data)
except Exception as e:
print(f"Error: {str(e)}")
KMS Usage
from djib.rpc import KmsClient
WALLET_PRIVATE_KEY = '<Base58 encoded string>'
try:
kms = KmsClient(WALLET_PRIVATE_KEY, is_devnet=True)
a = 'Hello, World!'
a_enc = kms.encrypt(a)
a_dec = kms.decrypt(a_enc)
assert a_dec == a
except Exception as e:
print(f"Error: {str(e)}")
Development
Setup
- Install poetry
- Install dev dependencies:
poetry install
- Activate the poetry shell.
poetry shell
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
djib-0.1.1.tar.gz
(20.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
djib-0.1.1-py3-none-any.whl
(20.4 kB
view details)
File details
Details for the file djib-0.1.1.tar.gz.
File metadata
- Download URL: djib-0.1.1.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.10.6 Linux/5.15.62-1-MANJARO
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c2f290230d60b7f41ea5fe470adbc8ed30953df8f231861d17c4afa880b3d5d
|
|
| MD5 |
8bf4cb2af0ea57b1930a4a6923ad7397
|
|
| BLAKE2b-256 |
debfbec0ea61970e9de0c8ad83a37e410c65a9206161ac952778bb389cf8d975
|
File details
Details for the file djib-0.1.1-py3-none-any.whl.
File metadata
- Download URL: djib-0.1.1-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.10.6 Linux/5.15.62-1-MANJARO
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc3d23ce637fb4ff3c70f42219996b629fb8d4ba5415eee7ce90c63e9a7d0704
|
|
| MD5 |
550113084be151b7fbace70f52e404b9
|
|
| BLAKE2b-256 |
e3b72443d1ee61e2b0739ddca82a13921479e2532c7ea48631e3e04195aee792
|