Irys Network Python SDK
This is a simple package which enables you to interact with the Irys Network through bundlers and gateways.
Usage
Build the client
from irys_sdk.Builder import Builder
client = Builder("ethereum").wallet("...").build()
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()
tx_id = client.fund(10000)
balance = client.balance()
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)
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