{"id":18262363,"url":"https://github.com/devansh3712/cmc-py","last_synced_at":"2025-04-04T20:30:40.954Z","repository":{"id":43214153,"uuid":"459047238","full_name":"Devansh3712/cmc-py","owner":"Devansh3712","description":"Unofficial CoinMarketCap API and Python wrapper","archived":false,"fork":false,"pushed_at":"2022-03-15T12:18:06.000Z","size":848,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-20T18:07:07.602Z","etag":null,"topics":["fastapi","python","redis","selenium"],"latest_commit_sha":null,"homepage":"https://devansh3712.github.io/cmc-py/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Devansh3712.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-14T06:48:31.000Z","updated_at":"2024-12-26T11:03:55.000Z","dependencies_parsed_at":"2022-09-23T12:54:17.491Z","dependency_job_id":null,"html_url":"https://github.com/Devansh3712/cmc-py","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devansh3712%2Fcmc-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devansh3712%2Fcmc-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devansh3712%2Fcmc-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devansh3712%2Fcmc-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devansh3712","download_url":"https://codeload.github.com/Devansh3712/cmc-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247246061,"owners_count":20907734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","python","redis","selenium"],"created_at":"2024-11-05T11:07:29.397Z","updated_at":"2025-04-04T20:30:39.222Z","avatar_url":"https://github.com/Devansh3712.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cmc-py\nUnofficial [CoinMarketCap](https://coinmarketcap.com/) API and Python wrapper. `cmc-py` uses `Selenium` and `BeautifulSoup` to scrape the website and return desired data.\n\n[![pytest](https://github.com/Devansh3712/cmc-py/actions/workflows/test.yml/badge.svg)](https://github.com/Devansh3712/cmc-py/actions/workflows/test.yml) [![codecov](https://github.com/Devansh3712/cmc-py/actions/workflows/codecov-coverage.yml/badge.svg)](https://github.com/Devansh3712/cmc-py/actions/workflows/codecov-coverage.yml) [![PyPI](https://github.com/Devansh3712/cmc-py/actions/workflows/python-publish.yml/badge.svg)](https://github.com/Devansh3712/cmc-py/actions/workflows/python-publish.yml) [![Docker Image CI](https://github.com/Devansh3712/cmc-py/actions/workflows/docker-image.yml/badge.svg)](https://github.com/Devansh3712/cmc-py/actions/workflows/docker-image.yml) [![Docker Build and Push Image](https://github.com/Devansh3712/cmc-py/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/Devansh3712/cmc-py/actions/workflows/docker-publish.yml) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![codecov](https://codecov.io/gh/Devansh3712/cmc-py/branch/main/graph/badge.svg?token=HDZL3E43TR)](https://codecov.io/gh/Devansh3712/cmc-py)\n\n### Installation\n\n- Using `setup.py`\n```shell\npython setup.py install\n```\n\n- Using `Python Package Index`\n```shell\npip install cmc-py-wrapper\n```\n\n- Using `poetry`\n```\npoetry install\n```\n\n### Wrapper\n`cmc-py` library can be used to fetch data for the following:\n- `CryptoCurrencies`\n```python\nfrom cmc import Trending, format_data\n\ntop_30_trending = Trending().get_data\nprint(format_data(top_30_trending))\n```\n\n- `Exchanges`\n```python\nfrom cmc import Spot, format_data\n\nspot_exchanges = Spot().get_data\nprint(format_data(spot_exchanges))\n```\n\n- `Non Fungible Tokens (NFTs)`\n```python\nfrom cmc import UpcomingSale, format_data\n\nupcoming_nft_sales = UpcomingSale(pages=[1, 2]).get_data\nprint(format_data(upcoming_nft_sales))\n```\n\n### API\nAn 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](https://cmc-api.herokuapp.com/docs#/).\n\n- Running the API locally\n```shell\nuvicorn api.main:app\n```\n\n- Building the API using `Dockerfile`\n```shell\ndocker build -t cmc .\ndocker compose up -d\n```\n\n- Running the API using [`Docker Image`](https://hub.docker.com/r/devansh3712/cmc-api)\n```shell\ndocker pull devansh3712/cmc-api\ndocker run devansh3712/cmc-api\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevansh3712%2Fcmc-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevansh3712%2Fcmc-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevansh3712%2Fcmc-py/lists"}