Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

irys_sdk-0.1.9.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

irys_sdk-0.1.9-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

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

Hashes for irys_sdk-0.1.9.tar.gz
Algorithm Hash digest
SHA256 3d95385c6a127fca817c4f1b6bd756631381d16c32dfe67905dcddb6202a7206
MD5 c842403792e02e06603f3c93fccadf33
BLAKE2b-256 0c2ff78e5c96593ad16b75e846beb212c5493762fde7fa5e60e778d7368ea81a

See more details on using hashes here.

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

Hashes for irys_sdk-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 cf1248b06b47c00d1b41c8e7baedd3ff0838acfdae281921c7019a61bfa5398d
MD5 86099fdbbab491e03ca25dba76b1d6d0
BLAKE2b-256 e80769fcdca72b6e287cbbb7954e10c77f961aba762a1168683e69016f1e976b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page