pyDuinoCoin is a simple python integration for the DuinoCoin REST API, that allows developers to communicate with DuinoCoin Master Server.
Project description
PyDuinoCoin
PyDuinoCoin is a simple python integration for the DuinoCoin REST API, that allows developers to communicate with DuinoCoin Main Server.
Install
PyDuinoCoin is available on the Python Package Index (PyPI): https://pypi.python.org/pypi/pyduinocoin
You can install PyDuinoCoin using pip.
$ pip install pyduinocoin
Making queries
You can use the DuinoClient object instance to perform queries.
Most methods of the DuinoClient class have the same name as the REST API endpoints.
Check out the REST API Documentation: https://github.com/revoxhere/duco-rest-api
All responses will return a DictObj object or a list object. All dict objects in the response will be transformed into DictObj. You can access to the data of a DictObj object as you would with a dict object, or do it through the attributes. An example to illustrate this:
client = DuinoClient()
response = client.user('example')
# It is the same::
for response['balance']['username']
for response.balance['username']
for response['balance'].username
for response.balance.username # I love this one
# DictObj is iterable:
for key, value in response.items():
print(key)
print(value)
Examples
Usage examples can be found in the /examples folder of the project
Tests
You can run the tests via the command line.
Place your terminal at the root of the project and run the following command.
$ python -m unittest discover tests "*_test.py"
Greetings
@revoxhere by duco-rest-api for the REST API documented. @dansinclair25 by duco-rest-api for the original REST API.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyduinocoin-1.0.2.tar.gz.
File metadata
- Download URL: pyduinocoin-1.0.2.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9be81afc5682246e2967eeedc732d775f6da9497683faa7b9ffe3b7ba5e648d1
|
|
| MD5 |
3474a3f4cbc7816932c0feedee3ca102
|
|
| BLAKE2b-256 |
0dc74a5734dd84da2b37df195017bc8af5c04b010a7e1ee7583e8937cc3e487b
|
File details
Details for the file pyduinocoin-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pyduinocoin-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53f8414779e38c2e6707643ecc53edc17cd2d19e1135401f2a9ae66a5ce16de8
|
|
| MD5 |
a27571795a6f4ac5a7bc68537a8aee40
|
|
| BLAKE2b-256 |
e7463609fc8cba08b90255788ca80a9898ba1094bc6dba47de05c73ee35be13d
|