Metadata-Version: 2.1
Name: irys_sdk
Version: 0.1.2
Summary: Official python SDK for Irys bundlers
Home-page: https://github.com/Irys-xyz/python-sdk
License: MIT
Author: Jesse Wright
Author-email: jesse@irys.xyz
Requires-Python: >=3.12,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: avro (>=1.12.0,<2.0.0)
Requires-Dist: base58 (>=2.1.1,<3.0.0)
Requires-Dist: eth-account (>=0.13.4,<0.14.0)
Requires-Dist: eth-keys (>=0.6.0,<0.7.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Requires-Dist: web3 (>=7.4.0,<8.0.0)
Project-URL: Repository, https://github.com/Irys-xyz/python-sdk
Description-Content-Type: text/markdown

# 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
```py
from irys_sdk.Builder 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>)`
```py
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
```py
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](https://python-poetry.org/docs/)

install poetry: `pipx install poetry` \
active the venv: `poetry shell` or use `poetry run <command>` \
install dependencies: `poetry install`


