Metadata-Version: 2.1
Name: viz-python-lib
Version: 1.0.2
Summary: Python library for VIZ blockchain
Home-page: https://github.com/VIZ-Blockchain/viz-python-lib
License: MIT
Keywords: viz,python,library,blockchain
Author: Vladimir Kamarzin
Author-email: vvk@vvk.pp.ru
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: aiohttp (>=3.9.0b0) ; python_version >= "3.12"
Requires-Dist: docker (>=6.1.3,<7.0.0)
Requires-Dist: funcy (>=2.0,<3.0)
Requires-Dist: graphenelib (>=1.6.0,<2.0.0)
Requires-Dist: toolz (>=0.12.0,<0.13.0)
Project-URL: Repository, https://github.com/VIZ-Blockchain/viz-python-lib
Description-Content-Type: text/markdown

# Python Library for [VIZ](https://github.com/VIZ-Blockchain)

![tests](https://github.com/VIZ-Blockchain/viz-python-lib/workflows/tests/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/viz-python-lib/badge/?version=latest)](https://viz-python-lib.readthedocs.io/en/latest/?badge=latest)

**This library is in alpha state, API unstable**

Built on top of [python-graphenelib](https://github.com/xeroc/python-graphenelib/)

## Dependencies

#### Linux dependencies

```sh
sudo apt-get install libffi-dev libssl-dev python-dev
```

#### Windows dependencies

Install regular version of [OpenSSL](https://slproweb.com/products/Win32OpenSSL.html) (not Light) suitable for your core processor.

#### MacOS dependencies

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries. This means that you will need to install and export some OpenSSL settings yourself, before you can install viz-python-lib:

```sh
brew install openssl
```

and then use the following commands
```sh
export CFLAGS="-I$(brew --prefix openssl)/include"
export LDFLAGS="-L$(brew --prefix openssl)/lib"
```

## Installation

Current published version could be installed via

```sh
pip install viz-python-lib
```

Manual installation:

Install [poetry](https://python-poetry.org/docs/)

```sh
cd viz-python-lib/
poetry install
```

## Usage

Basic read query example:
```python
from viz import Client
from pprint import pprint

node = 'wss://node.viz.cx/ws'

viz = Client(node=node)
pprint(viz.info())
```

Direct RPC calls:
```python
viz.rpc.some_rpc_method()
```

