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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file marblex.py-1.4.0.tar.gz.

File metadata

  • Download URL: marblex.py-1.4.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for marblex.py-1.4.0.tar.gz
Algorithm Hash digest
SHA256 1a265a9ca163035684873980b2519396c0c78c49988f8b89eb91e57ddb5bd607
MD5 515a95bd57002821676e54b8febadc3f
BLAKE2b-256 08feb804966512f849b96dfb21e9ded9489dcaab14fe5b50f458a7d1184fcb3e

See more details on using hashes here.

File details

Details for the file marblex.py-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: marblex.py-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for marblex.py-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4acc09fdcf30efc0fcf0ef08681c5a544adddd265f371c069d1b1ab57f05f0c6
MD5 38551e510eadcf74c7e35d537e581220
BLAKE2b-256 2278b666c92de7dcc392a70ca0ac8b1d5d57e38f591bdfb8dcb1083c5ff2b1f5

See more details on using hashes here.

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