fx-py-sdk


Namefx-py-sdk JSON
Version 0.7.3 PyPI version JSON
download
home_pagehttps://github.com/functionx/fx-py-sdk
SummaryPython library for FunctionX
upload_time2023-10-17 08:31:43
maintainer
docs_urlNone
authorzakir
requires_python>=3.7
license
keywords functionx blockchain
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FunctionX Python SDK

[![PyPI version](https://badge.fury.io/py/fx-py-sdk.svg)](https://badge.fury.io/py/fx-py-sdk)

## Install

```shell
pip install fx-py-sdk
```

## Use

```python
from fxsdk.client.grpc import Client
from fxsdk.wallet.builder import TxBuilder
from fxsdk.x.cosmos.base.v1beta1.coin_pb2 import Coin

if __name__ == '__main__':
    grpc_cli = Client(url='127.0.0.1:9090')
    mnemonic = 'test test test test test test test test test test test junk'
    prefix = 'fx'
    
    tx_builder = TxBuilder.from_mnemonic(mnemonic=mnemonic, prefix=prefix)
    to = tx_builder.from_address().to_string()
    amount = [Coin(amount='100', denom='FX')]
    tx_response = grpc_cli.bank_send(tx_builder, to, amount)
    print(tx_response)
```

## Development

### 1. Clone the code to local

```shell
git clone https://github.com/functionx/fx-py-sdk.git

cd fx-py-sdk
```

### 2. Build the Python virtual environment for the current project

* Create the virtual directory venv

```
python -m venv venv
```

* Activating the Virtual Environment

```
source ./venv/bin/activate
```
> Windows: venv\Scripts\activate

### 3. Installation Project Dependence

```
pip install -r requirements.txt
```

### 4. Compile Proto files as Python files

> If does not have execution permission, run 'chmod +x ./gen-proto.sh`

```shell
# Pull external code
git submodule update --init --recursive --remote

./gen-proto.sh
```

### 5. Build Project

```shell
python -m build
```

## License

[Apache License 2.0](LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/functionx/fx-py-sdk",
    "name": "fx-py-sdk",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "FunctionX,blockchain",
    "author": "zakir",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/07/60/5be2dd90a559bf8975b5589fcd59596fe8be887b1615535ae83b99fb62bf/fx-py-sdk-0.7.3.tar.gz",
    "platform": "any",
    "description": "# FunctionX Python SDK\n\n[![PyPI version](https://badge.fury.io/py/fx-py-sdk.svg)](https://badge.fury.io/py/fx-py-sdk)\n\n## Install\n\n```shell\npip install fx-py-sdk\n```\n\n## Use\n\n```python\nfrom fxsdk.client.grpc import Client\nfrom fxsdk.wallet.builder import TxBuilder\nfrom fxsdk.x.cosmos.base.v1beta1.coin_pb2 import Coin\n\nif __name__ == '__main__':\n    grpc_cli = Client(url='127.0.0.1:9090')\n    mnemonic = 'test test test test test test test test test test test junk'\n    prefix = 'fx'\n    \n    tx_builder = TxBuilder.from_mnemonic(mnemonic=mnemonic, prefix=prefix)\n    to = tx_builder.from_address().to_string()\n    amount = [Coin(amount='100', denom='FX')]\n    tx_response = grpc_cli.bank_send(tx_builder, to, amount)\n    print(tx_response)\n```\n\n## Development\n\n### 1. Clone the code to local\n\n```shell\ngit clone https://github.com/functionx/fx-py-sdk.git\n\ncd fx-py-sdk\n```\n\n### 2. Build the Python virtual environment for the current project\n\n* Create the virtual directory venv\n\n```\npython -m venv venv\n```\n\n* Activating the Virtual Environment\n\n```\nsource ./venv/bin/activate\n```\n> Windows: venv\\Scripts\\activate\n\n### 3. Installation Project Dependence\n\n```\npip install -r requirements.txt\n```\n\n### 4. Compile Proto files as Python files\n\n> If does not have execution permission, run 'chmod +x ./gen-proto.sh`\n\n```shell\n# Pull external code\ngit submodule update --init --recursive --remote\n\n./gen-proto.sh\n```\n\n### 5. Build Project\n\n```shell\npython -m build\n```\n\n## License\n\n[Apache License 2.0](LICENSE)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python library for FunctionX",
    "version": "0.7.3",
    "project_urls": {
        "Homepage": "https://github.com/functionx/fx-py-sdk"
    },
    "split_keywords": [
        "functionx",
        "blockchain"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "78f0644145ebf105420ee3fc8f52a03a77a7c8798a716a94f9f6266c339a1ca2",
                "md5": "a61939e2432ad7a857d9e2fe783a6bc7",
                "sha256": "f8742c31380987cd908b3858e9122c82dba7d33432853b74181023607786b6fa"
            },
            "downloads": -1,
            "filename": "fx_py_sdk-0.7.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a61939e2432ad7a857d9e2fe783a6bc7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 500025,
            "upload_time": "2023-10-17T08:31:42",
            "upload_time_iso_8601": "2023-10-17T08:31:42.125523Z",
            "url": "https://files.pythonhosted.org/packages/78/f0/644145ebf105420ee3fc8f52a03a77a7c8798a716a94f9f6266c339a1ca2/fx_py_sdk-0.7.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07605be2dd90a559bf8975b5589fcd59596fe8be887b1615535ae83b99fb62bf",
                "md5": "5f8b3dcc940764103a16764893dfee8c",
                "sha256": "4895453e3eaf7d404155038e0ec07be4e5d4f1e993eb92f28246c7580776a18f"
            },
            "downloads": -1,
            "filename": "fx-py-sdk-0.7.3.tar.gz",
            "has_sig": false,
            "md5_digest": "5f8b3dcc940764103a16764893dfee8c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 263228,
            "upload_time": "2023-10-17T08:31:43",
            "upload_time_iso_8601": "2023-10-17T08:31:43.854705Z",
            "url": "https://files.pythonhosted.org/packages/07/60/5be2dd90a559bf8975b5589fcd59596fe8be887b1615535ae83b99fb62bf/fx-py-sdk-0.7.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-17 08:31:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "functionx",
    "github_project": "fx-py-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "fx-py-sdk"
}
        
Elapsed time: 0.28203s