Skip to main content

cmc-py

Unofficial CoinMarketCap API and Python wrapper. cmc-py uses Selenium and BeautifulSoup to scrape the website and return desired data.

mypy lint pytest codecov PyPI pages-build-deployment Code style: black codecov

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
from cmc import Trending, format_data

top_30_trending = Trending().get_data
print(format_data(top_30_trending))
  • Exchanges
from cmc import Spot, format_data

spot_exchanges = Spot().get_data
print(format_data(spot_exchanges))
  • Non Fungible Tokens (NFTs)
from cmc import UpcomingSale, format_data

upcoming_nft_sales = UpcomingSale(pages=[1, 2]).get_data
print(format_data(upcoming_nft_sales))

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. Redis server should be running in the background in order to cache API calls.

uvicorn api.main:app

Download files

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

Source Distribution

cmc-py-wrapper-0.1.3.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

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

cmc_py_wrapper-0.1.3-py3-none-any.whl (48.3 kB view details)

Uploaded Python 3

File details

Details for the file cmc-py-wrapper-0.1.3.tar.gz.

File metadata

  • Download URL: cmc-py-wrapper-0.1.3.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for cmc-py-wrapper-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8b54a9b370d872040af06fa1585d6289f3cb2ca14078bb8acfa821b3d1120b54
MD5 e230da4b1d503b360a45326aeb77485d
BLAKE2b-256 2d782cbf38457b62365f3e699f7c6dc86c8df20f7429e480a4dc3e6d4d7227e5

See more details on using hashes here.

File details

Details for the file cmc_py_wrapper-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: cmc_py_wrapper-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 48.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for cmc_py_wrapper-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8b9228bb137c61aa94bd7ba2fcd512a2633b996b8c47e00acd442625ff6f79db
MD5 3aef6042170b0cf70e45e89e740a8a04
BLAKE2b-256 803c9b680c45ef1b6ff726d64fd99d115f446fb8354628460212cebb31f80644

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.4

2 files

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page