GeckoRS
geckors is a small Python wrapper around CoinGecko's public API for token metadata.
It is designed for:
- resolving a ticker or CoinGecko ID into a token
- caching token metadata locally in SQLite
- keeping dependencies minimal
- exposing a simple object API for common fields such as contract addresses, decimals, and supply
The project is intentionally metadata-focused. It does not try to be a full market-data client.
Features
- CoinGecko-backed token lookup
- local SQLite cache
- normalized contract storage in
token_contracts - alias resolution in
token_aliasesso repeated lookups are deterministic - high-level
Tokenobject with useful properties - bulk population helpers
- rate-limit-safe bulk fetch behavior
Installation
Using uv:
uv sync
Or install the package in editable mode:
uv pip install -e .
Quick Start
from geckors import Token
token = Token("ETH")
print(token.id)
print(token.name)
print(token.contract_addresses)
print(token.decimals)
print(token.max_supply)
Useful properties on Token include:
idsymbolnamemarket_cap_rankasset_platform_idcontract_addressesplatform_detailsdecimalscirculating_supplytotal_supplymax_supplycategorieslinkshomepagedescriptiondeveloper_datacommunity_datapublic_interest_statsraw
Example:
from geckors import Token
token = Token("DAI")
print(token.get_address("ethereum"))
print(token.contract_addresses)
Bulk Population
Populate from symbols:
from geckors import populate_tokens
result = populate_tokens(["BTC", "ETH", "DAI", "WETH"])
print(result)
Populate from explicit CoinGecko IDs:
from geckors import populate_token_ids
result = populate_token_ids(["bitcoin", "ethereum", "dai"])
print(result)
populate_tokens() returns structured results for:
- resolved queries
- inserted IDs
- skipped rows already in cache
- unresolved queries
- ambiguous symbols
- failed requests
- rate-limit state
Storage
By default the SQLite database is stored in the platform data directory:
- Linux/BSD:
~/.local/share/geckors/gecko_rs.dbor$XDG_DATA_HOME/geckors/gecko_rs.db - macOS:
~/Library/Application Support/geckors/gecko_rs.db - Windows:
%LOCALAPPDATA%/geckors/gecko_rs.db
Override order:
GECKO_RS_DBconfig.jsonin the config directory- platform data directory default
Current tables:
tokens: canonical token metadata keyed by CoinGecko IDtoken_contracts: normalized chain/address/decimals rowstoken_aliases: query-to-token resolution cache
CoinGecko Notes
- CoinGecko ID is the stable internal identity in this project. Symbols are only lookup hints.
- Native assets like
ETHmay not have token contract addresses. CoinGecko often returns an empty placeholder for those;geckorsfilters that out. - Contract coverage is limited to what CoinGecko currently lists for that specific asset ID.
- A successful response is not partially truncated by rate limiting. If CoinGecko rate-limits a request, the request fails.
Rate Limits
This project uses CoinGecko public endpoints. Public usage is rate-limited.
Bulk helpers are defensive:
- they stop cleanly on HTTP 429 by default
- they return a structured summary instead of crashing the whole run
You can also provide:
COINGECKO_DEMO_API_KEYCOINGECKO_PRO_API_KEY
if you have one.
Development
Run tests:
uv run python -m unittest discover -s tests -v
Run the example entrypoint:
uv run python main.py
Metadata
Release files for geckors 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| geckors-0.1.0.tar.gz | 15.2 kB | Without provenance | Details for geckors-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| geckors-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for geckors-0.1.0-py3-none-any.whl |
Total release size: 28.3 kB
Release files / geckors-0.1.0.tar.gz
| Download URL | geckors-0.1.0.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf2cc416eb87b88fbb1c19545a44e85e852abe066c892bebc4877e7ae8cc95b1
|
|
BLAKE2b-256 checksum How to use checksums |
40a261c994a297b55a07d55ddf4a5cff8d7046daf2f48c95c440af9e52c2e582
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / geckors-0.1.0-py3-none-any.whl
| Download URL | geckors-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26b18d6ad58d829da8e420ce1f90372672f082ec2e02fe6cd7c77dc0f73d8c96
|
|
BLAKE2b-256 checksum How to use checksums |
aeac594c84b0542a2952f6399b178f313f5ed658bb87f1c3efdc8dc0c624ac88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for geckors 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.