Official python SDK for Irys bundlers
Project description
Irys Network Python SDK
This is a simple package which enables you to interact with the Irys Network through bundlers and gateways.
Usage
For a full basic example, see examples/basic.py
Build the client
from irys_sdk import Builder
client = Builder("ethereum").wallet("...").build()
# wallet is the only required argument, but there are others i.e rpc_url("...") to set a custom RPC URL
Funding the node
Nodes work on a deposit based system, to see how much you'd need to upload some data, use client.get_price(<size_in_bytes>)
balance = client.balance() # 100
tx_id = client.fund(10000) # in wei/atomic units
balance = client.balance() # 10100
Withdrawing funds
Not currently supported in this SDK - use the JS CLI/SDK to withdraw funds
Uploading data
res = client.upload(b"hello, world!", tags=[("tag_name", "tag_value")])
print(res) # { 'id': "...", ...}
Retrieving data
Make a GET request in the client of your choice to
https://gateway.irys.xyz/<transaction_id>
to see transaction metadata (tags, signature, owner), GET:
https://gateway.irys.xyz/tx/<transaction_id>
Contributing
This package is developed with poetry
install poetry: pipx install poetry
active the venv: poetry shell or use poetry run <command>
install dependencies: poetry install
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
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
File details
Details for the file irys_sdk-0.1.9.tar.gz.
File metadata
- Download URL: irys_sdk-0.1.9.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.12.10-76061203-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d95385c6a127fca817c4f1b6bd756631381d16c32dfe67905dcddb6202a7206
|
|
| MD5 |
c842403792e02e06603f3c93fccadf33
|
|
| BLAKE2b-256 |
0c2ff78e5c96593ad16b75e846beb212c5493762fde7fa5e60e778d7368ea81a
|
File details
Details for the file irys_sdk-0.1.9-py3-none-any.whl.
File metadata
- Download URL: irys_sdk-0.1.9-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.12.10-76061203-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf1248b06b47c00d1b41c8e7baedd3ff0838acfdae281921c7019a61bfa5398d
|
|
| MD5 |
86099fdbbab491e03ca25dba76b1d6d0
|
|
| BLAKE2b-256 |
e80769fcdca72b6e287cbbb7954e10c77f961aba762a1168683e69016f1e976b
|