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. An instance of the API is hosted on Heroku.
- Running the API locally
uvicorn api.main:app
- Building the API using
Dockerfile
docker build -t cmc .
docker compose up -d
- Running the API using
Docker Image
docker pull devansh3712/cmc-api
docker run devansh3712/cmc-api
Metadata
Release files for cmc-py-wrapper 0.1.4
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 |
|---|---|---|---|---|
| cmc-py-wrapper-0.1.4.tar.gz | 22.7 kB | Without provenance | Details for cmc-py-wrapper-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cmc_py_wrapper-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for cmc_py_wrapper-0.1.4-py3-none-any.whl |
Total release size: 76.1 kB
Release files / cmc-py-wrapper-0.1.4.tar.gz
| Download URL | cmc-py-wrapper-0.1.4.tar.gz |
|---|---|
| Size | 22.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9257dcf65731a0af837fda8126b65ead2cedea69e087641581617e3c826ca98
|
|
BLAKE2b-256 checksum How to use checksums |
1568149a16bb5d65699dca00e9119fa6856e13427bd4b0dd53c8fb1c993a65d1
|
| 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.4-py3-none-any.whl
| Download URL | cmc_py_wrapper-0.1.4-py3-none-any.whl |
|---|---|
| Size | 53.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
281e618f4c7480a4c4b8831d3325495931e96904f0765a4bdcb48ca5548abb38
|
|
BLAKE2b-256 checksum How to use checksums |
ba9f69584adb23884be99b50e9347b15a3f11fa163cdf858775f285e0a570fb8
|
| 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
|
Security for cmc-py-wrapper 0.1.4
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.