Skip to main content

An Asynchronous Marblex API Wrapper for Python

Project description

marblex.py

An Asynchronous Marblex API Wrapper for Python

Installation

Windows:

$ pip install -U marblex.py

Linux/MacOS:

$ python3 -m pip install -U marblex.py

Asynchronous Example:

import asyncio
from marblex import Marblex

mbx = Marblex()

async def main():

    async with mbx:
        nkt = await mbx.get_territe_token()
        nka = await mbx.get_asterite_token()

        print(f"NKT : {nkt.USD}$, Percent: {nkt.percent}")
        print(f"NKA : {nka.USD}$, Percent: {nka.percent}")

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Synchronous Example:

from marblex import MarblexSync

mbx = MarblexSync()

nkt = mbx.get_territe_token()
nka = mbx.get_asterite_token()
itu = mbx.get_inetrium_token()

print(f"NKT : {nkt.USD}$, Percent: {nkt.percent}")
print(f"NKA : {nka.USD}$, Percent: {nka.percent}")
print(f"ITU : {itu.USD}$, Percent: {itu.percent}")

>>> NKT : 1.47$, Percent: -4.22 %
>>> NKA : 3.56$, Percent: +1.61 %
>>> ITU : 0.13$, Percent: -0.59 %

License

MIT

inspired by

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

marblex.py-1.4.0.tar.gz (8.3 kB view hashes)

Uploaded Source

Built Distribution

marblex.py-1.4.0-py3-none-any.whl (8.2 kB view hashes)

Uploaded Python 3

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