Skip to main content

A python client for the Nimiq JSON-RPC API

Project description

Nimiq Client Python

build PyPI version Maintainability

Python implementation of the Nimiq RPC client specs.

Usage

Send requests to a Nimiq node with NimiqClient object.

client = NimiqClient(
    scheme = "http",
    host = "127.0.0.1",
    port = 8648,
    user = "luna",
    password = "moon"
)

Once the client have been set up, we can call the methodes with the appropiate arguments to make requests to the Nimiq node.

When no configuration is passed in the initialization it will use defaults for the Nimiq node.

client = NimiqClient()

# make rpc call to get the block number
blockNumber = client.blockNumber()

print(blockNumber) # displays the block number, for example 748883

API

The complete API documentation is available in the /docs folder.

Check out the Nimiq RPC specs for behind the scene RPC calls.

Installation

The recommended way to install Nimiq Python Client is via a Python package manager like pip.

Contributions

This implementation was originally contributed by rraallvv.

Please send your contributions as pull requests.

Refer to the issue tracker for ideas.

Develop

After cloning the repository intall the package.

$ git clone https://github.com/rraallvv/NimiqClientPython
$ cd NimiqClientPython
$ python setup.py install

All done, happy coding!

Testing

Tests are stored in the /tests folder and can be run with the script test.py.

$ python -m unittest discover -v

Documentation

The documentation is generated automatically by running Doxygen from the repository root directory.

doxygen doxygenfile

License

MIT

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

nimiqclient-0.0.6.tar.gz (14.0 kB view hashes)

Uploaded Source

Supported by

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