<h1 align="center">Welcome to Superfluid Python SDK(Unofficial) 👋
</h1>
<div align="center">
<img width="300" padding="0 0 10px" alt="Superfluid logo" src="https://github.com/superfluid-finance/protocol-monorepo/raw/dev/sf-logo.png" />
<p>
<a href="#" target="_blank">
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
</a>
<a href="https://twitter.com/Superfluid_HQ/" target="blank">
<img alt="Twitter: Superfluid_HQ" src="https://img.shields.io/twitter/follow/Superfluid_HQ.svg?style=social" />
</a>
</p>
</div>
### 🏠 [Homepage](https://superfluid.finance)
### ✨ [Superfluid App](https://app.superfluid.finance/)
### 📖 [Docs](https://docs.superfluid.finance)
</br>
# Introduction
superfluid.py is an application framework for interacting with the Superfluid Protocol using the Python Programming Language.
This is a friendly fork that adds support for the Base blockchain. It may be deprecated once [merged upstream](https://github.com/Godspower-Eze/superfluid.py/pull/1).
# Features
* Minimal Framework initialization (`rpc` and `chain id`)
* New Operation syntax for transactions
* Read/Create/Update/Delete Agreement Operations (Constant Flow Agreement and Instant Distribution Agreement(In development))
# Notable Used Technologies
* Python
* Web3.py
# Installation
```bash
pip install superfluid
```
# Usage
```python
from superfluid import CFA_V1
from superfluid import Web3FlowInfo
rpc: str = "YOUR PREFERRED RPC"
chain_id: int = "CHAIN ID"
######################################################
###### CONSTANT FLOW AGREEMENT OPERATIONS ###########
######################################################
cfaV1Instance = CFA_V1(rpc, chain_id)
super_token: str = "SUPER TOKEN ADDRESS"
sender: str = "SENDER ADDRESS"
receiver: str = "RECEIVER ADDRESS"
flow_rate: int = "FLOW RATE"
PRIVATE_KEY: str = "YOUR PRIVATE KEY"
flow_data: Web3FlowInfo = cfaV1Instance.get_flow(super_token, sender, receiver)
create_flow_operation = cfaV1Instance.create_flow(
sender, receiver, super_token, flow_rate)
transaction_hash = create_flow_operation.exec(PRIVATE_KEY)
update_flow_operation = cfaV1Instance.update_flow(
sender, receiver, super_token, flow_rate)
transaction_hash = update_flow_operation.exec(PRIVATE_KEY)
delete_flow_operation = cfaV1Instance.delete_flow(
sender, receiver, super_token)
transaction_hash = delete_flow_operation.exec(PRIVATE_KEY)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/aleph-im/superfluid.py",
"name": "aleph-superfluid",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": null,
"keywords": null,
"author": "Godspower-Eze",
"author_email": "Godspowereze260@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e4/8b/018ee0a1689c4f84db71064917a4f0f1c8219d2d818e68e896cbdd294338/aleph_superfluid-0.2.1.tar.gz",
"platform": null,
"description": "<h1 align=\"center\">Welcome to Superfluid Python SDK(Unofficial) \ud83d\udc4b\n</h1>\n<div align=\"center\">\n<img width=\"300\" padding=\"0 0 10px\" alt=\"Superfluid logo\" src=\"https://github.com/superfluid-finance/protocol-monorepo/raw/dev/sf-logo.png\" />\n<p>\n <a href=\"#\" target=\"_blank\">\n <img alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" />\n </a>\n <a href=\"https://twitter.com/Superfluid_HQ/\" target=\"blank\">\n <img alt=\"Twitter: Superfluid_HQ\" src=\"https://img.shields.io/twitter/follow/Superfluid_HQ.svg?style=social\" />\n </a>\n</p>\n</div>\n\n### \ud83c\udfe0 [Homepage](https://superfluid.finance)\n\n### \u2728 [Superfluid App](https://app.superfluid.finance/)\n\n### \ud83d\udcd6 [Docs](https://docs.superfluid.finance)\n\n</br>\n\n# Introduction\n\nsuperfluid.py is an application framework for interacting with the Superfluid Protocol using the Python Programming Language.\n\nThis is a friendly fork that adds support for the Base blockchain. It may be deprecated once [merged upstream](https://github.com/Godspower-Eze/superfluid.py/pull/1).\n\n# Features\n\n* Minimal Framework initialization (`rpc` and `chain id`)\n* New Operation syntax for transactions\n* Read/Create/Update/Delete Agreement Operations (Constant Flow Agreement and Instant Distribution Agreement(In development))\n\n# Notable Used Technologies\n\n* Python\n* Web3.py\n\n# Installation\n\n```bash\npip install superfluid\n```\n\n# Usage\n\n```python\nfrom superfluid import CFA_V1\nfrom superfluid import Web3FlowInfo\n\nrpc: str = \"YOUR PREFERRED RPC\"\nchain_id: int = \"CHAIN ID\"\n\n######################################################\n###### CONSTANT FLOW AGREEMENT OPERATIONS ###########\n######################################################\n\ncfaV1Instance = CFA_V1(rpc, chain_id)\n\nsuper_token: str = \"SUPER TOKEN ADDRESS\"\nsender: str = \"SENDER ADDRESS\"\nreceiver: str = \"RECEIVER ADDRESS\"\nflow_rate: int = \"FLOW RATE\"\n\nPRIVATE_KEY: str = \"YOUR PRIVATE KEY\"\n\nflow_data: Web3FlowInfo = cfaV1Instance.get_flow(super_token, sender, receiver)\n\ncreate_flow_operation = cfaV1Instance.create_flow(\n sender, receiver, super_token, flow_rate)\ntransaction_hash = create_flow_operation.exec(PRIVATE_KEY)\n\nupdate_flow_operation = cfaV1Instance.update_flow(\n sender, receiver, super_token, flow_rate)\ntransaction_hash = update_flow_operation.exec(PRIVATE_KEY)\n\ndelete_flow_operation = cfaV1Instance.delete_flow(\n sender, receiver, super_token)\ntransaction_hash = delete_flow_operation.exec(PRIVATE_KEY)\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Fork of the Python SDK for the Superfluid Protocol",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://github.com/aleph-im/superfluid.py"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e48b018ee0a1689c4f84db71064917a4f0f1c8219d2d818e68e896cbdd294338",
"md5": "23074a8f120f8e5358c7ab05f8071b9e",
"sha256": "ead887e6636721d018095e3413bd161ffbf7092944d1523859a1e1900fec674c"
},
"downloads": -1,
"filename": "aleph_superfluid-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "23074a8f120f8e5358c7ab05f8071b9e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 20540,
"upload_time": "2024-08-28T15:45:18",
"upload_time_iso_8601": "2024-08-28T15:45:18.683256Z",
"url": "https://files.pythonhosted.org/packages/e4/8b/018ee0a1689c4f84db71064917a4f0f1c8219d2d818e68e896cbdd294338/aleph_superfluid-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-28 15:45:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aleph-im",
"github_project": "superfluid.py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "aleph-superfluid"
}