A lightweight tokens.swap.coffee API Python wrapper
Project description
Installation
pip install -U swapcoffee-tokens
Simple example
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
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
File details
Details for the file swapcoffee_tokens-1.0.4.tar.gz
.
File metadata
- Download URL: swapcoffee_tokens-1.0.4.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f83b54f34944535dd87b1d44bea2777db0833c4be41f697f0856fc8fa21a66d2 |
|
MD5 | 7b918ff71def7977a580e7c6c5dd1760 |
|
BLAKE2b-256 | acd5cda3cebee10ea1322f0ca837bfc09f8fd23dca85784f229781872ae987f7 |
Provenance
The following attestation bundles were made for swapcoffee_tokens-1.0.4.tar.gz
:
Publisher:
pypi-release.yml
on py-stollen/swapcoffee-tokens
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
swapcoffee_tokens-1.0.4.tar.gz
- Subject digest:
f83b54f34944535dd87b1d44bea2777db0833c4be41f697f0856fc8fa21a66d2
- Sigstore transparency entry: 149147075
- Sigstore integration time:
- Predicate type:
File details
Details for the file swapcoffee_tokens-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: swapcoffee_tokens-1.0.4-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c62bb20fbded8be5a56ea1ecf41db01147cca0e010a3d7201d9eb49432e90b0 |
|
MD5 | ce01fcc714f024e7ee1aab5b667e0682 |
|
BLAKE2b-256 | 61de2274cedd28bde1a42935685a4670e2edb3bc7c80dbda038b9a66f077a993 |
Provenance
The following attestation bundles were made for swapcoffee_tokens-1.0.4-py3-none-any.whl
:
Publisher:
pypi-release.yml
on py-stollen/swapcoffee-tokens
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
swapcoffee_tokens-1.0.4-py3-none-any.whl
- Subject digest:
5c62bb20fbded8be5a56ea1ecf41db01147cca0e010a3d7201d9eb49432e90b0
- Sigstore transparency entry: 149147077
- Sigstore integration time:
- Predicate type: