superfluid


Namesuperfluid JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/Godspower-Eze/superfluid.py
SummaryPython SDK for the Superfluid Protocol
upload_time2023-05-30 15:36:48
maintainer
docs_urlNone
authorGodspower-Eze
requires_python>=3
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <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.

# 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/Godspower-Eze/superfluid.py",
    "name": "superfluid",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "",
    "keywords": "",
    "author": "Godspower-Eze",
    "author_email": "Godspowereze260@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/57/56/7831bfea3e8cb807d42426f0b3f5bfbd8ef477e48d857158ad9203939514/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\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": "Python SDK for the Superfluid Protocol",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/Godspower-Eze/superfluid.py"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02ca0f166ff03b339e13450115eb94b3e8611d8ac7297459381912aa99b5e88b",
                "md5": "cb8df112fb10ff755cc0747be5fefbed",
                "sha256": "b6f2aae83b38f7fef9f944e50de618a8970515ec1579b168b2951c0c917a3554"
            },
            "downloads": -1,
            "filename": "superfluid-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cb8df112fb10ff755cc0747be5fefbed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 21391,
            "upload_time": "2023-05-30T15:36:45",
            "upload_time_iso_8601": "2023-05-30T15:36:45.075466Z",
            "url": "https://files.pythonhosted.org/packages/02/ca/0f166ff03b339e13450115eb94b3e8611d8ac7297459381912aa99b5e88b/superfluid-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "57567831bfea3e8cb807d42426f0b3f5bfbd8ef477e48d857158ad9203939514",
                "md5": "4b9966eaa0d63eb0d165cf92c42a13c4",
                "sha256": "b66c354fb6405e48f1452cc428caeaba90f79ed07a72ea497c32c1d1ab9faebe"
            },
            "downloads": -1,
            "filename": "superfluid-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4b9966eaa0d63eb0d165cf92c42a13c4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 20379,
            "upload_time": "2023-05-30T15:36:48",
            "upload_time_iso_8601": "2023-05-30T15:36:48.089222Z",
            "url": "https://files.pythonhosted.org/packages/57/56/7831bfea3e8cb807d42426f0b3f5bfbd8ef477e48d857158ad9203939514/superfluid-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-30 15:36:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Godspower-Eze",
    "github_project": "superfluid.py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "superfluid"
}
        
Elapsed time: 0.10086s