Skip to main content

tribulnation-catalogue

PyPI Python License: MIT

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tribulnation_catalogue-0.1.18.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tribulnation_catalogue-0.1.18-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file tribulnation_catalogue-0.1.18.tar.gz.

File metadata

  • Download URL: tribulnation_catalogue-0.1.18.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for tribulnation_catalogue-0.1.18.tar.gz
Algorithm Hash digest
SHA256 dcda17f88aa471e61259f98e79286744cadde6123f4ff7e1bc0bcf17f53808a7
MD5 baef49149113162f0f8e80485278e9cb
BLAKE2b-256 43abc6292f5bc456aa745b4a8841291bfb2ece7c1f376d847da01cf8a9a53f19

See more details on using hashes here.

File details

Details for the file tribulnation_catalogue-0.1.18-py3-none-any.whl.

File metadata

File hashes

Hashes for tribulnation_catalogue-0.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 40ab3145b64a56fd634b8e7c272814e4ca5b811f7884e21ec72bdbef92c1da71
MD5 f37942563397742b217c194ac1cc574e
BLAKE2b-256 82888f2f075ce01dc3836f6d8f21f271ff6d2a97416913032f5da151418ddea6

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.27

2 files

0.1.26

2 files

0.1.25

2 files

0.1.23

2 files

0.1.22

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

2 files

This release

0.1.18 This release

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page