Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

python-gridcoin

A python library for Gridcoin-related stuff. python-gridcoin is a sans-IO library so you'll have to bring your own networking library in order to use the networking related functions.

Installation

pip install .# Alternatively, in edit mode for development:
pip install -e .

Quickstart

importhttpx# or requestsfromgridcoin.rpcimportWalletRPC# Connect to the mainnet client automatically:rpc=WalletRPC(httpx.post)
# Testnet:rpc=WalletRPC(httpx.post, testnet)
# You can also provide your own URL to connect:rpc=WalletRPC(httpx.post, url="http://user:password@localhost:15715")
print(rpc.help())

Async IO is also supported:

importasyncioimportaiohttpfromgridcoin.rpcimportWalletRPCasyncdefmain():
asyncwithaiohttp.ClientSession() asclient_session:
rpc=WalletRPC(client_session.post)
print(awaitrpc.getblockcount())
if__name__=="__main__":
asyncio.run(main())

License

python-gridcoin is under the MIT License.

About

No description or website provided.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Contributors

Languages