Unofficial CoinMarketCap API and Python wrapper
Project description
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
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
Project details
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 hashes)
Built Distribution
Close
Hashes for cmc_py_wrapper-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b9228bb137c61aa94bd7ba2fcd512a2633b996b8c47e00acd442625ff6f79db |
|
MD5 | 3aef6042170b0cf70e45e89e740a8a04 |
|
BLAKE2b-256 | 803c9b680c45ef1b6ff726d64fd99d115f446fb8354628460212cebb31f80644 |