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.15.6.tar.gz (28.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.15.6-py3-none-any.whl (34.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pactus_grpc-1.15.6.tar.gz
Algorithm Hash digest
SHA256 7b575300145e66550b7108332a1c34d1daa3ca82b6fcf9d0f8b15c758f79be55
MD5 cb8e70c503c9c2fb05ead259fcaab2d0
BLAKE2b-256 874309437fec89b03fdb538e5dad4ea9410a003a5fdc94304ae828196a4e3406

See more details on using hashes here.

Provenance

The following attestation bundles were made for pactus_grpc-1.15.6.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.15.6-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pactus_grpc-1.15.6-py3-none-any.whl
Algorithm Hash digest
SHA256 bff61add81a3dc28e7b23c6e56f0c70f88a369e48277eefed442d50dfe6b3b7d
MD5 24c52e9775506a85fa1fda54b6c58ac6
BLAKE2b-256 3b84efb89e62bfc8d8136db296bfaef9ad6a22d3b36c3722211afa3a6511cb21

See more details on using hashes here.

Provenance

The following attestation bundles were made for pactus_grpc-1.15.6-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