Skip to main content

iagon-py is a Python package for storing/accessing data on Iagon, a privacy focused decentralized storage protocol on Cardano.

Table of Contents
  1. Why?
  2. Roadmap
  3. How To
  4. Contribute

Why is this needed?

Python is where a significant amount of data science is being done. Especially for artificial intelligence and machine learning. Storage is a necessary component to data driven decentralized applications, so making the first decentralized storage protocol easily accessible to Python opens up a diverse set of integrations.

What is the roadmap for this project?

The biggest driver of this tool right now is storing/loading deep neural networks and the data needed to train them. Python has a storage abstraction package (fsspec) that a number of Python tools use, including PyTorch (an AI framework) and a large body of data ingestion and transformation tools. The current state of the package is that enough of the direct API calls to Iagon are implemented to be able to create a virtual file system for storing/loading PyTorch models and the data used to train them.

Once the virtual file system is created, the rest of the Iagon API will be implemented followed by a more complete implementation of the virtual file system.

How do I use it?

Installation

You can install with pip from PyPI, but there is currently a bug in pycardano that doesn't allow CIP8 message signing with extended payment keys, so this will not work. Instead, you will need to clone and install this repo:

pip install iagon-py

Download public data

A common use case will be sharing public data directly from Iagon. iagon-py makes it easy to pull in this data. We will use some clustering data generated for the Minswap Catalyst Proposal Selection group for Catalyst Fund 10.

The Cardano Catalyst Fund 10 voting on Minswap used OpenAI and some custom clustering methods to aggregate proposals into similar groups to summarize and filter them. This data has been stored on Iagon, so this example will download them all. Some information on how the groups were generated and clustered can be found on Twitter.

Next, create a short script to pull in and store the compressed data.

from pycardano import HDWallet

from iagon import IagonAdapter

# Give the file id of the Minswap Catalyst Grouping data
file_id = "65296cf4eba1933b118b368f"

# Create a random seed phrase to access Iagon
# Why is this needed? To access Iagon, we need to get an auth token using CIP8, which
# requires a wallet signature. Since it's public data, it doesn't matter what wallet we
# use, so generate a random one.
seed_phrase = HDWallet.generate_mnemonic()

# Create the Iagon session
with IagonAdapter.session(seed_phrase) as session:
    # Open a file to write the binary data to
    with open("minswap_catalyst_groups.zip", "wb") as fw:
        fw.write(session.download(file_id=file_id))

Now you can unzip the text files and see what the Minswap Catalyst Selection Group used. The text files are randomly assigned a number indicating the cluster group number, with a special group (-1) that acted as a catch all for proposals that didn't seem to fit into any group.

Creating Folders and Uploading Data

A good example of how to upload data will come, but it is currently possible to upload data, create directories and subdirectories, and browse through data on Iagon.

For now, take a look at the code used to upload the Minswap Catalyst Selection Group zip file: examples\minswap_fund10_upload.py.

Note that the code requires creating an .env file with a SEED value that corresponds to the wallet you want to use to upload the data.

How can I help?

I can always use volunteers to take on specific chunks of the project. I work on this in my free time, along with some other Cardano projects. You can help by reaching out on Twitter or Discord. Alternatively, sending tips is also helpful to cover the costs of production. Tips can be sent to:

addr1q9hw8fuex09vr3rqwtn4fzh9qxjlzjzh8aww684ln0rv0cfu3f0de6qkmh7c7yysfz808978wwe6ll30wu8l3cgvgdjqa7egnl

Metadata

Release files for iagon-py 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iagon-py 0.1.1
File Size Uploaded Provenance Actions
iagon_py-0.1.1.tar.gz 8.4 kB Without provenance Details for iagon_py-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for iagon-py 0.1.1
File Interpreter ABI Platform Actions
iagon_py-0.1.1-py3-none-any.whl Python 3 none any Details for iagon_py-0.1.1-py3-none-any.whl

Total release size: 17.6 kB

Release files / iagon_py-0.1.1.tar.gz

Download URL iagon_py-0.1.1.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d9265e33c13e9e14160ab025dc861f774e4577dac98e9921429cbfbe4748e80e
BLAKE2b-256 checksum
How to use checksums
72b967f4e4d6f33e21ed885bb2ac53af72015f539ccde5bd15bf4d930d297a98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.11 Windows/10

Release files / iagon_py-0.1.1-py3-none-any.whl

Download URL iagon_py-0.1.1-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3aa8a38be0526ac565f4867a07d77983654bcba5e9e4559ae57923d98408bb2a
BLAKE2b-256 checksum
How to use checksums
4bd91a661fd3f02172c5e0db4a10728c84c908d218dd6e26f0471645d2856780
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.11 Windows/10

Security for iagon-py 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page