Luno Python Library
Sync and Async Python 3 clients for the Luno API
Quickstart
This library includes 2 types of clients, a sync client built using the requests library and an async library built with treq and twisted.
Sync client
from luno.clients.sync import LunoSyncClient
api_key = ''
api_secret = ''
client = LunoSyncClient(api_key=api_key, secret=api_secret)
client.ticker('XBTZAR')
Async client
from typing import Dict
from twisted.internet import reactor
from luno.clients.asynchronous import LunoAsyncClient
api_key = ''
api_secret = ''
client = LunoAsyncClient(api_key=api_key, secret=api_secret)
d = client.ticker('XBTZAR') # returns a twisted deferred
def print_data(data: Dict) -> None:
"""prints the json response from an API call"""
print(data)
d.addCallback(print_data)
reactor.run()
Installation
The library can be installed from PyPi as follows.
pip install luno
The async client is an optional extra and may be installed as follows.
pip install luno[async]
To install the version on this repository follow the steps below.
git clone https://github.com/BradleyKirton/luno
cd luno
python -m venv env # virtualenv env
source env/bin/activate
pip install . #pip install .[async] for the async client
Developement
Clone the repo and install the package with it's development requirements.
git clone https://github.com/BradleyKirton/luno
cd luno
python -m venv env # virtualenv env
source env/bin/activate
pip install -e .[dev]
pytest
TODO
Note this library is still in beta.
- Write documentation
Metadata
Release files for luno 0.3.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| luno-0.3.6.tar.gz | 9.8 kB | Without provenance | Details for luno-0.3.6.tar.gz |
Release files / luno-0.3.6.tar.gz
| Download URL | luno-0.3.6.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b19e14ff1eba644f77350565bd1ed6462f5c537d018c95976d59ee60be141e50
|
|
BLAKE2b-256 checksum How to use checksums |
91b15364c98e2f124255f5911da93133adc201cc3d908f048b67c828c2152e6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2
|
Security for luno 0.3.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.