Metadata-Version: 2.3
Name: swapcoffee.tokens
Version: 1.0.4
Summary: A lightweight tokens.swap.coffee API Python wrapper
Project-URL: Repository, https://github.com/py-stollen/swapcoffee-tokens
Project-URL: API Documentation, https://tokens.swap.coffee/docs
Author-email: wakaree <nullmatawasoradesu@gmail.com>
Maintainer-email: wakaree <nullmatawasoradesu@gmail.com>
License: MIT
Keywords: asyncio,client,crypto,swapcoffee,ton,wrapper
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: pydantic<2.10,>=2.4.1
Requires-Dist: stollen<1.0,>=0.5.2
Provides-Extra: dev
Requires-Dist: black~=24.8.0; extra == 'dev'
Requires-Dist: mypy~=1.11.1; extra == 'dev'
Requires-Dist: pre-commit~=3.8.0; extra == 'dev'
Requires-Dist: ruff~=0.6.1; extra == 'dev'
Description-Content-Type: text/x-rst


#################
swapcoffee-tokens
#################

Installation
------------

..  code-block:: bash

    pip install -U swapcoffee-tokens

Simple example
--------------

.. code-block:: python

    import asyncio
    import logging

    from swapcoffee.tokens import SwapCoffee
    from swapcoffee.tokens.types import BlockchainToken


    async def main() -> None:
        logging.basicConfig(level=logging.DEBUG)
        coffee: SwapCoffee = SwapCoffee()
        tokens: list[BlockchainToken] = await coffee.get_tokens_by_symbols(symbols=["NOT", "DMT"])
        for token in tokens:
            logging.info("Token %s ($%s) costs %s USD", token.name, token.symbol, token.price_usd)
        await coffee.session.close()


    if __name__ == "__main__":
        asyncio.run(main())

Donations
---------
TON: `UQAYJ1terNmvoBh26Xi7tLa_P4t_OGMZOXBUfDB2mLMGuVMb`
USDT TRC20: `TGr2J3Pi6WmcexwmGFJDHLqrrhDoe2U6w6`
