<div align="center">
<img src="https://raw.github.com/theeldermillenial/iagon-py/master/imgs/iagon-py.png" alt="iagon-py" width="200" height="auto" />
<p>
A Python client for Iagon!
</p>
<!-- Badges -->
<p>
<a href="https://pypi.org/project/iagon-py/">
<img src="https://img.shields.io/pypi/v/iagon-py" alt="version" />
</a>
<a href="https://pypi.org/project/iagon-py/">
<img src="https://img.shields.io/pepy/dt/iagon-py" alt="downloads" />
</a>
<a href="">
<img src="https://img.shields.io/badge/code_format-black-black" alt="open issues" />
</a>
<a href="https://github.com/theeldermillenial/iagon-py/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/theeldermillenial/iagon-py.svg" alt="license" />
</a>
</p>
<h4>
<a href="https://github.com/theeldermillenial/iagon-py">Documentation (Coming Soon!)</a>
<span> · </span>
<a href="https://github.com/theeldermillenial/iagon-py/issues/">Report Bug</a>
<span> · </span>
<a href="https://github.com/theeldermillenial/iagon-py/issues/">Request Feature</a>
</h4>
</div>
`iagon-py` is a Python package for storing/accessing data on Iagon, a privacy focused
decentralized storage protocol on Cardano.
<!-- Table of Contents -->
<details>
<summary>Table of Contents</summary>
<ol>
<li>
<a href="#why-is-this-needed">Why?</a>
</li>
<li>
<a href="#what-is-the-roadmap-for-this-project">Roadmap</a>
</li>
<li>
<a href="#how-do-i-use-it">How To</a>
<ul>
<li><a href="#installation">Installation</a></li>
<li><a href="#creating-folders-and-uploading-data">Download Public Data</a></li>
<li><a href="#creating-folders-and-uploading-data">Creating Folders and Uploading Data</a></li>
</ul>
</li>
<li><a href="#how-can-i-help">Contribute</a></li>
</ol>
</details>
## 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:
```bash
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](https://x.com/ElderM/status/1702643308198060211?s=20).
Next, create a short script to pull in and store the compressed data.
```python
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:
```bash
addr1q9hw8fuex09vr3rqwtn4fzh9qxjlzjzh8aww684ln0rv0cfu3f0de6qkmh7c7yysfz808978wwe6ll30wu8l3cgvgdjqa7egnl
```
Raw data
{
"_id": null,
"home_page": "https://github.com/theeldermillenial/iagon-py",
"name": "iagon-py",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Elder Millenial",
"author_email": "eldermillenial@protonmail.com",
"download_url": "https://files.pythonhosted.org/packages/72/b9/67f4e4d6f33e21ed885bb2ac53af72015f539ccde5bd15bf4d930d297a98/iagon_py-0.1.1.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n <img src=\"https://raw.github.com/theeldermillenial/iagon-py/master/imgs/iagon-py.png\" alt=\"iagon-py\" width=\"200\" height=\"auto\" />\n <p>\n A Python client for Iagon!\n </p>\n\n<!-- Badges -->\n<p>\n <a href=\"https://pypi.org/project/iagon-py/\">\n <img src=\"https://img.shields.io/pypi/v/iagon-py\" alt=\"version\" />\n </a>\n <a href=\"https://pypi.org/project/iagon-py/\">\n <img src=\"https://img.shields.io/pepy/dt/iagon-py\" alt=\"downloads\" />\n </a>\n <a href=\"\">\n <img src=\"https://img.shields.io/badge/code_format-black-black\" alt=\"open issues\" />\n </a>\n <a href=\"https://github.com/theeldermillenial/iagon-py/blob/master/LICENSE\">\n <img src=\"https://img.shields.io/github/license/theeldermillenial/iagon-py.svg\" alt=\"license\" />\n </a>\n</p>\n\n<h4>\n <a href=\"https://github.com/theeldermillenial/iagon-py\">Documentation (Coming Soon!)</a>\n <span> \u00b7 </span>\n <a href=\"https://github.com/theeldermillenial/iagon-py/issues/\">Report Bug</a>\n <span> \u00b7 </span>\n <a href=\"https://github.com/theeldermillenial/iagon-py/issues/\">Request Feature</a>\n </h4>\n</div>\n\n`iagon-py` is a Python package for storing/accessing data on Iagon, a privacy focused\ndecentralized storage protocol on Cardano.\n\n<!-- Table of Contents -->\n<details>\n <summary>Table of Contents</summary>\n <ol>\n <li>\n <a href=\"#why-is-this-needed\">Why?</a>\n </li>\n <li>\n <a href=\"#what-is-the-roadmap-for-this-project\">Roadmap</a>\n </li>\n <li>\n <a href=\"#how-do-i-use-it\">How To</a>\n <ul>\n <li><a href=\"#installation\">Installation</a></li>\n <li><a href=\"#creating-folders-and-uploading-data\">Download Public Data</a></li>\n <li><a href=\"#creating-folders-and-uploading-data\">Creating Folders and Uploading Data</a></li>\n </ul>\n </li>\n <li><a href=\"#how-can-i-help\">Contribute</a></li>\n </ol>\n</details>\n\n## Why is this needed?\n\nPython is where a significant amount of data science is being done. Especially for\nartificial intelligence and machine learning. Storage is a necessary component to data\ndriven decentralized applications, so making the first decentralized storage protocol\neasily accessible to Python opens up a diverse set of integrations.\n\n## What is the roadmap for this project?\n\nThe biggest driver of this tool right now is storing/loading deep neural networks and\nthe data needed to train them. Python has a storage abstraction package (`fsspec`) that\na number of Python tools use, including PyTorch (an AI framework) and a large body of\ndata ingestion and transformation tools. The current state of the package is that enough\nof the direct API calls to Iagon are implemented to be able to create a virtual file\nsystem for storing/loading PyTorch models and the data used to train them.\n\nOnce the virtual file system is created, the rest of the Iagon API will be implemented\nfollowed by a more complete implementation of the virtual file system.\n\n## How do I use it?\n\n### Installation\n\nYou can install with `pip` from PyPI, but there is currently a bug in `pycardano` that\ndoesn't allow `CIP8` message signing with extended payment keys, so this will not work.\nInstead, you will need to clone and install this repo:\n\n```bash\npip install iagon-py\n```\n\n### Download public data\n\nA common use case will be sharing public data directly from Iagon. `iagon-py` makes it\neasy to pull in this data. We will use some clustering data generated for the Minswap\nCatalyst Proposal Selection group for Catalyst Fund 10.\n\nThe Cardano Catalyst Fund 10 voting on Minswap used OpenAI and some custom clustering\nmethods to aggregate proposals into similar groups to summarize and filter them. This\ndata has been stored on Iagon, so this example will download them all. Some information\non how the groups were generated and clustered can be found\n[on Twitter](https://x.com/ElderM/status/1702643308198060211?s=20).\n\nNext, create a short script to pull in and store the compressed data.\n\n```python\nfrom pycardano import HDWallet\n\nfrom iagon import IagonAdapter\n\n# Give the file id of the Minswap Catalyst Grouping data\nfile_id = \"65296cf4eba1933b118b368f\"\n\n# Create a random seed phrase to access Iagon\n# Why is this needed? To access Iagon, we need to get an auth token using CIP8, which\n# requires a wallet signature. Since it's public data, it doesn't matter what wallet we\n# use, so generate a random one.\nseed_phrase = HDWallet.generate_mnemonic()\n\n# Create the Iagon session\nwith IagonAdapter.session(seed_phrase) as session:\n # Open a file to write the binary data to\n with open(\"minswap_catalyst_groups.zip\", \"wb\") as fw:\n fw.write(session.download(file_id=file_id))\n\n```\n\nNow you can unzip the text files and see what the Minswap Catalyst Selection Group used.\nThe text files are randomly assigned a number indicating the cluster group number, with\na special group (`-1`) that acted as a catch all for proposals that didn't seem to fit\ninto any group.\n\n### Creating Folders and Uploading Data\n\nA good example of how to upload data will come, but it is currently possible to upload\ndata, create directories and subdirectories, and browse through data on Iagon.\n\nFor now, take a look at the code used to upload the Minswap Catalyst Selection Group\nzip file: `examples\\minswap_fund10_upload.py`.\n\nNote that the code requires creating an `.env` file with a `SEED` value that corresponds\nto the wallet you want to use to upload the data.\n\n## How can I help?\n\nI can always use volunteers to take on specific chunks of the project. I work on this\nin my free time, along with some other Cardano projects. You can help by reaching out\non Twitter or Discord. Alternatively, sending tips is also helpful to cover the costs\nof production. Tips can be sent to:\n\n```bash\naddr1q9hw8fuex09vr3rqwtn4fzh9qxjlzjzh8aww684ln0rv0cfu3f0de6qkmh7c7yysfz808978wwe6ll30wu8l3cgvgdjqa7egnl\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "A Python client for Iagon's decentralized cloud storage platform.",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/theeldermillenial/iagon-py",
"Repository": "https://github.com/theeldermillenial/iagon-py"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4bd91a661fd3f02172c5e0db4a10728c84c908d218dd6e26f0471645d2856780",
"md5": "aed0e3c774bcfd3608a538e06046c493",
"sha256": "3aa8a38be0526ac565f4867a07d77983654bcba5e9e4559ae57923d98408bb2a"
},
"downloads": -1,
"filename": "iagon_py-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "aed0e3c774bcfd3608a538e06046c493",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 9228,
"upload_time": "2023-11-08T00:57:05",
"upload_time_iso_8601": "2023-11-08T00:57:05.448269Z",
"url": "https://files.pythonhosted.org/packages/4b/d9/1a661fd3f02172c5e0db4a10728c84c908d218dd6e26f0471645d2856780/iagon_py-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "72b967f4e4d6f33e21ed885bb2ac53af72015f539ccde5bd15bf4d930d297a98",
"md5": "3a00a7eb6b91bb7bc63bea0ee7ae4098",
"sha256": "d9265e33c13e9e14160ab025dc861f774e4577dac98e9921429cbfbe4748e80e"
},
"downloads": -1,
"filename": "iagon_py-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "3a00a7eb6b91bb7bc63bea0ee7ae4098",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 8383,
"upload_time": "2023-11-08T00:57:06",
"upload_time_iso_8601": "2023-11-08T00:57:06.796056Z",
"url": "https://files.pythonhosted.org/packages/72/b9/67f4e4d6f33e21ed885bb2ac53af72015f539ccde5bd15bf4d930d297a98/iagon_py-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-08 00:57:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "theeldermillenial",
"github_project": "iagon-py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "iagon-py"
}