cmc-py
Unofficial CoinMarketCap API and Python wrapper. cmc-py uses Selenium and BeautifulSoup to scrape the website and return desired data.
Installation
- Using
setup.py
python setup.py install
- Using
Python Package Index
pip install cmc-py-wrapper
- Using
poetry
poetry install
Wrapper
cmc-py library can be used to fetch data for the following:
CryptoCurrencies
import json
from cmc import Trending
top_30_trending = Trending().get_data
print(json.dumps(top_30_trending, indent=4, default=str))
Exchanges
import json
from cmc import Spot
spot_exchanges = Spot().get_data
print(json.dumps(spot_exchanges, indent=4, default=str))
Non Fungible Tokens (NFTs)
import json
from cmc import UpcomingSale
upcoming_nft_sales = UpcomingSale(pages=[1, 2]).get_data
print(json.dumps(upcoming_nft_sales, indent=4, default=str))
API
An API is also built using the cmc-py modules using FastAPI and Redis. Redis configurations can be set using the config.yml file, and it is used to cache the scraped data fetched through cmc-py.
uvicorn api.main:app
Metadata
Release files for cmc-py-wrapper 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 | |
|---|---|---|---|
| cmc-py-wrapper-0.1.0.tar.gz | 17.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cmc_py_wrapper-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.6 kB
Release files / cmc-py-wrapper-0.1.0.tar.gz
| Download URL | cmc-py-wrapper-0.1.0.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0e01f6be23e9916fceb4f3baa7900b1a06e3a8af9a3d7e5240987b5f444df77
|
|
BLAKE2b-256 checksum How to use checksums |
91e268c1da94ab64f6fb0a92b261952f13dbe87cac5af466b20cc77f827da27a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / cmc_py_wrapper-0.1.0-py3-none-any.whl
| Download URL | cmc_py_wrapper-0.1.0-py3-none-any.whl |
|---|---|
| Size | 40.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed6ec4f2ccc385162b9af2ce46a63b2097d2f7f456a4e7c3a560b082f76b0d02
|
|
BLAKE2b-256 checksum How to use checksums |
040f058a834b1adfa3812c69dd32eac18a75049ce056967bc86186968c52080f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|