Metadata-Version: 2.1
Name: fx-py-sdk
Version: 0.6.8
Summary: Python library for FunctionX
Home-page: https://github.com/functionx/fx-py-sdk
Author: zakir
Keywords: FunctionX,blockchain
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: grpcio>=1.59.0
Requires-Dist: google-api-python-client>=2.102.0
Requires-Dist: bech32>=1.2.0
Requires-Dist: ecdsa>=0.18.0
Requires-Dist: hdwallets>=0.1.2
Requires-Dist: mnemonic>=0.20
Requires-Dist: eth_hash>=0.5.2
Requires-Dist: coincurve>=18.0.0

# 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_client import Client

if __name__ == '__main__':
    chain_id = Client(url='localhost:9090').query_chain_id()
    print('chain id:', chain_id)
```

## 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)
