Skip to main content

Python client for interacting with the Pactus blockchain via gRPC

Project description

pactus-grpc

Python client for interacting with the Pactus blockchain via gRPC.

Installation

pip install pactus-grpc

Usage

import asyncio
import grpc
from pactus_grpc import blockchain_pb2_grpc, blockchain_pb2, network_pb2_grpc, network_pb2


async def main():
    channel = grpc.aio.insecure_channel("127.0.0.1:50051")
    blockchain_stub = blockchain_pb2_grpc.BlockchainStub(channel)
    blockchain_request = blockchain_pb2.GetBlockchainInfoRequest()
    blockchain_response = await blockchain_stub.GetBlockchainInfo(blockchain_request)
    print(blockchain_response)

    await channel.close()


if __name__ == "__main__":
    asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pactus_grpc-1.11.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pactus_grpc-1.11.0-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

Details for the file pactus_grpc-1.11.0.tar.gz.

File metadata

  • Download URL: pactus_grpc-1.11.0.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pactus_grpc-1.11.0.tar.gz
Algorithm Hash digest
SHA256 727f78aa66d5dde6c604847edfb75c15604900af4a4a721208623aaf5386586a
MD5 7010b5e0933206ebf0504ca6655a1eef
BLAKE2b-256 5e57cfc1c41df6fe43bca7a4b982d65cd99e19ed6c955bdefa5aee55b8d7ff3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pactus_grpc-1.11.0.tar.gz:

Publisher: packager.yml on pactus-project/pactus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pactus_grpc-1.11.0-py3-none-any.whl.

File metadata

  • Download URL: pactus_grpc-1.11.0-py3-none-any.whl
  • Upload date:
  • Size: 32.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pactus_grpc-1.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbd03f6ca9ade1e55d1a8d3f1968a970feefc854fde9291b879a951673dc7d95
MD5 9a21d9783c00f03b4f3aff62db236329
BLAKE2b-256 e9959f480e04e3db7fdb41af5964ce1f9f084b5f1a19bead5f5bce43fe312101

See more details on using hashes here.

Provenance

The following attestation bundles were made for pactus_grpc-1.11.0-py3-none-any.whl:

Publisher: packager.yml on pactus-project/pactus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page