Central catalogue of (crypto-)assets, platforms and networks.
Project description
tribulnation-catalogue
Python client for the Tribulnation Catalogue — a typed, open catalogue of crypto assets, trading platforms, and instrument mappings.
Install
pip install tribulnation-catalogue
Usage
from tribulnation.catalogue import Catalogue
catalogue = Catalogue.load()
btc = catalogue.assets["bitcoin"]
binance = catalogue.platforms["binance"]
On first call, load() downloads the catalogue and caches it at ~/.cache/tribulnation/catalogue. Subsequent calls load from cache.
Loading options
# Use cache, download if not present (default)
catalogue = Catalogue.load()
# Force a fresh download
catalogue = Catalogue.load(refresh=True)
# Load from an explicit local folder
catalogue = Catalogue.load("data")
# Custom source URL or cache directory
catalogue = Catalogue.load(
url="https://my-mirror.example.com/data.zip",
cache_dir=".cache/catalogue",
)
# Suppress the download message
catalogue = Catalogue.load(silent=True)
What's available
catalogue.assets # dict[str, Asset]
catalogue.platforms # dict[str, Platform]
catalogue.blockchains # filtered view: kind == 'blockchain'
catalogue.cexs # filtered view: kind == 'cex'
catalogue.dexs # filtered view: kind == 'dex'
catalogue.spot_instruments # dict[platform, dict[id, Spot]]
catalogue.perpetual_instruments # dict[platform, dict[id, Perpetual]]
catalogue.debt_instruments # dict[platform, dict[id, Debt]]
catalogue.pools # dict[platform, dict[id, Pool]]
catalogue.asset_translations # dict[platform, dict[exchange_id, asset_id]]
catalogue.network_translations # dict[platform, dict[exchange_id, network_id]]
catalogue.spam # dict[platform, dict[address, SpamAddress]]
Types
All types are available from the package root:
from tribulnation.catalogue import (
Asset, AssetPeg, ExternalIds,
Platform, Blockchain, CexPlatform, DexPlatform,
Spot, Perpetual, Debt, Pool,
SpamAddress,
)
Links
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tribulnation_catalogue-0.1.11.tar.gz.
File metadata
- Download URL: tribulnation_catalogue-0.1.11.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92c4f7e2961c62a870b95b22f45894df455033ecab91ff5817f573c4e8eee7b8
|
|
| MD5 |
85d51aca3690465753730ccf701f1443
|
|
| BLAKE2b-256 |
1c1c9aea1b02678bddb99818f31fd97f735c330684105af30564595cf2b2a2ec
|
File details
Details for the file tribulnation_catalogue-0.1.11-py3-none-any.whl.
File metadata
- Download URL: tribulnation_catalogue-0.1.11-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9814fc49bd0638a6896cb3df1b87ff5f1b43f5b16b549370f59868fea2e10ab1
|
|
| MD5 |
fe42ca9779aeeb17d9712d850de461e1
|
|
| BLAKE2b-256 |
d570b70e40f0df5bb056a76855f7a6fe6815dcdd334491695594c00d202cd2f0
|