Skip to main content

vision-python-sdk (visionpy)

PyPI version

Vision Python Client Library.

Features

  1. Get Block, Transaction, TransactionInfo, Node;
  2. Build and transfer VS, VRC10, VRC20;
  3. Parse event logs of TransactionInfo;
  4. Decode contract function inputs;
  5. Asyncio support;
  6. Python 3.7.2 and late version required;
  7. Poetry for package management.

How to use

More examples please check example folder.

from visionpy import Vision
from visionpy.keys import PrivateKey


# Private key of VDGXn73Qgf6V1aGbm8eigoHyPJRJpALN9F
priv_key = PrivateKey(bytes.fromhex("eed06aebdef88683ff5678b353d1281bb2b730113c9283f7ea96600a0d2c104f"))
def transfer():
    client = Vision(network='vpioneer')
    txn_ret = (
        client.vs.transfer("VTCYvEK2ZuWvZ5LXqrLpU2GoRkFeJ1NrD2", "VSfD1o6FPChqdqLgwJaztjckyyo2GSM1KP", 1_000)
        .memo("test memo")
        .build()
        .inspect()
        .sign(priv_key)
        .broadcast()
    )
    print(txn_ret)
    print(txn_ret.result())

Async Client

import asyncio

from visionpy import AsyncVision
from visionpy.keys import PrivateKey

# private key of VTCYvEK2ZuWvZ5LXqrLpU2GoRkFeJ1NrD2
priv_key = PrivateKey(bytes.fromhex("eed06aebdef88683ff5678b353d1281bb2b730113c9283f7ea96600a0d2c104f"))

async def transfer():
    async with AsyncVision(network='vpioneer') as client:
        print(client)

        txb = (
            client.trx.transfer("VTCYvEK2ZuWvZ5LXqrLpU2GoRkFeJ1NrD2", "VSfD1o6FPChqdqLgwJaztjckyyo2GSM1KP", 1_000)
            .memo("test memo")
            .fee_limit(100_000_000)
        )
        txn = await txb.build()
        print(txn)
        txn_ret = await txn.sign(priv_key).broadcast()
        print(txn_ret)
        print(await txn_ret.wait())

if __name__ == '__main__':
    asyncio.run(transfer())

Metadata

Release files for visionpy 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for visionpy 0.0.4
File Size Uploaded Provenance Actions
visionpy-0.0.4.tar.gz 28.6 kB Without provenance Details for visionpy-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for visionpy 0.0.4
File Interpreter ABI Platform Actions
visionpy-0.0.4-py3-none-any.whl Python 3 none any Details for visionpy-0.0.4-py3-none-any.whl

Total release size: 59.9 kB

Release files / visionpy-0.0.4.tar.gz

Download URL visionpy-0.0.4.tar.gz
Size 28.6 kB
Tags Source
SHA-256 checksum
How to use checksums
38d758f4f25f4baa525883227e3579aa97aa169b5c4d4b152ffa05f974bda3a9
BLAKE2b-256 checksum
How to use checksums
9f312a27ff4b90d4af6fbe8e8892b950ff3d9b85be02ebc7b928805498fe39fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Linux/5.15.25-1-MANJARO

Release files / visionpy-0.0.4-py3-none-any.whl

Download URL visionpy-0.0.4-py3-none-any.whl
Size 31.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68e41311652eb8d7aaca2e18af6880f0c76ef79f0e73037ca66f8c3d5c4f64fb
BLAKE2b-256 checksum
How to use checksums
2ee791cd953c9ef43b6f720980f03197adb306f9071ce3be73a3fba790f7b915
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Linux/5.15.25-1-MANJARO

Security for visionpy 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page