# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['karpet']

package_data = \
{'': ['*']}

install_requires = \
['BeautifulSoup4>=4.8.2,<5.0.0',
 'aiohttp>=3.6.2,<4.0.0',
 'lxml>=4.5.2,<5.0.0',
 'numpy>=1.18.1,<2.0.0',
 'pandas>=1.1.0,<2.0.0',
 'requests>=2.22.0,<3.0.0']

setup_kwargs = {
    'name': 'karpet',
    'version': '0.3.1',
    'description': 'Library for fetching coin/token historical data, trends, tweets and more.',
    'long_description': '.. image:: https://raw.githubusercontent.com/im-n1/karpet/master/assets/logo.png\n   :align: center\n\n.. image:: https://img.shields.io/pypi/v/karpet.svg?color=0c7dbe\n   :alt: PyPI\n\n.. image:: https://img.shields.io/pypi/l/karpet.svg?color=0c7dbe\n   :alt: PyPI - License\n\n.. image:: https://img.shields.io/pypi/dm/karpet.svg?color=0c7dbe\n   :alt: PyPI - Downloads\n\n.. contents::\n\nKarpet\n======\nKarpet is a tiny library with just a few dependencies\nfor fetching coins/tokens metrics data from the internet.\n\nIt can provide following data:\n\n* coin/token historical price data (no limits)\n* google trends for the given list of keywords (longer period than official API)\n* twitter scraping for the given keywords (no limits)\n* much more info about crypto coins/tokens (no rate limits)\n\nWhat is upcoming?\n\n* Reddit metrics\n* Have a request? Open an issue ;)\n\nDependencies\n------------\nLibrary uses a few nifty dependencies and is Python 3.6+ only. There is no\nneed to install dependencies you don\'t need. Therefore this library utilizes\nextras which install optional dependencies:\n\n* for Google trends - google\n* for Twitter scraping - twitter\n\nUsage\n-----\n1. Install the library via pip.\n\n.. code-block:: bash\n\n   pip install karpet  # Basics only\n   pip install karpet[twitter]  # For Twitter scraping\n   pip install karpet[google]  # For Google trends\n   pip install karpet[twitter,google]  # All features\n\n2. Import the library class first.\n\n.. code-block:: python\n\n    from karpet import Karpet\n\n``fetch_crypto_historical_data()``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nRetrieves historical data.\n\n.. code-block:: python\n\n    k = Karpet(date(2019, 1, 1), date(2019, 5, 1))\n    df = k.fetch_crypto_historical_data(symbol="BTC")  # Dataframe with historical data.\n    df.head()\n\n                  close conversionSymbol conversionType     high      low     open  volumefrom      volumeto\n    date\n    2019-01-01  3880.15                          direct  3938.75  3696.94  3747.39    45104.29  1.705983e+08\n    2019-01-02  3961.01                          direct  3989.59  3826.29  3880.15    54034.73  2.108546e+08\n    2019-01-03  3835.86                          direct  3965.52  3778.76  3961.01    45585.19  1.764881e+08\n    2019-01-04  3874.06                          direct  3901.65  3783.88  3835.86    44398.90  1.705076e+08\n    2019-01-05  3855.39                          direct  3926.92  3841.13  3874.06    35766.65  1.394385e+08\n\n\n``fetch_exchanges()``\n~~~~~~~~~~~~~~~~~~~~~\nRetrieves exchange list.\n\n.. code-block:: python\n\n    k = Karpet()\n    k.fetch_exchanges("nrg")\n    [\'DigiFinex\', \'KuCoin\', \'CryptoBridge\', \'Bitbns\', \'CoinExchange\']\n\n``fetch_tweets()``\n~~~~~~~~~~~~~~~~~~\nRetrieves twitter tweets.\n\n.. code-block:: python\n\n    k = Karpet(date(2019, 1, 1), date(2019, 5, 1))\n    df = k.fetch_tweets(kw_list=["bitcoin"], lang="en")  # Dataframe with tweets.\n    df.head()\n\n.. image:: https://raw.githubusercontent.com/im-n1/karpet/master/assets/tweets.png\n\n``fetch_google_trends()``\n~~~~~~~~~~~~~~~~~~~~~~~~~\nRetrieves Google Trends - in percents for the given date range.\n\n.. code-block:: python\n\n    k = Karpet(date(2019, 1, 1), date(2019, 5, 1))\n    df = k.fetch_google_trends(kw_list=["bitcoin"])  # Dataframe with trends.\n    df.head()\n\n.. image:: https://raw.githubusercontent.com/im-n1/karpet/master/assets/google_trends.png\n\nAnd with a few lines of code you can get a chart\n\n.. code-block:: python\n\n   df = df.set_index("date")\n   df.plot()\n\n.. image:: https://raw.githubusercontent.com/im-n1/karpet/master/assets/trends_chart.png\n\n``fetch_news()``\n~~~~~~~~~~~~~~~~\nRetrieves crypto news.\n\n.. code-block:: python\n\n   k = Karpet()\n   news = k.fetch_news("btc")  # Gets 10 news.\n   print(news[0])\n   {\n      \'url\': \'https://cointelegraph.com/ ....\',  # Truncated.\n      \'title\': \'Shell Invests in Blockchain-Based Energy Startup\',\n      \'description\': \'The world’s fifth top oil and gas firm, Shell, has...\',  # Truncated.\n      \'date\': datetime.datetime(2019, 7, 28, 9, 24, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600)))\n      \'image\': \'https://images.cointelegraph.com/....jpg\'  # Truncated.\n   }\n   news = k.fetch_news("btc", limit=30)  # Gets 30 news.\n\n``fetch_top_news()``\n~~~~~~~~~~~~~~~~~~~~\nRetrieves top crypto news in 2 categories:\n\n* Editor\'s choices - articles picked by editors\n* Hot stories - articles with most views\n\n.. code-block:: python\n\n   k = Karpet()\n   editors_choices, top_stories = k.fetch_top_news()\n   print(len(editors_choices))\n   5\n   print(len(top_stories))\n   5\n   print(editors_choices[0])\n   {\n      \'url\': \'https://cointelegraph.com/...\',  # Truncated.\n      \'title\': \'Bank of China’s New Infographic Shows Why Bitcoin Price Is Going Up\',\n      \'date\': datetime.datetime(2019, 7, 27, 10, 7, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600))),\n      \'image\': \'https://images.cointelegraph.com/images/740_aHR...\', # Truncated.\n      \'description\': \'The Chinese central bank released on its website an ...\'  # Truncated.\n   }\n   print(top_stories[0])\n   {\n      \'url\': \'https://cointelegraph.com/...\',  # Truncated.\n      \'title\': \'Bitcoin Price Shuns Volatility as Analysts Warn of Potential Drop to $7,000\',\n      \'date\': datetime.datetime(2019, 7, 27, 10, 7, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600))),\n      \'image\': \'https://images.cointelegraph.com/images/740_aHR0c...\'  # Truncated.\n      \'description\': \'Stability around $10,600 for Bitcoin price is ...\'  # Truncated.\n   }\n\n\nChangelog\n---------\n\n0.3.1\n~~~~~\n* Migrated to coingecko.com API (no API key needed anymore).  \n\n0.3\n~~~\n* Migrated to cryptocompare.com API (you need an API key now).\n* Requirements are now managed by Poetry.\n\n0.2.5\n~~~~~\n* Added ``fetch_top_news()`` method for top crypto news separated in 2 categories.\n\n0.2.4\n~~~~~\n* ``fetch_news()`` adds new "description" item and renames "image_url" to "image".\n* All ``fetch_news()`` item properties are now presented even if they are ``None``.\n\n0.2.3\n~~~~~\n* Simplified import from ``from karpet.karpet import Karpet`` to ``from karpet import Karpet``.\n\n0.2.2\n~~~~~\n* Added ``fetch_news()`` method for retrieving crypto news.\n\n0.2.1\n~~~~~\n* Added ``fetch_exchanges()`` method for retrieving symbol exchange list.\n* Removed obsolete library dependency.\n\n0.2\n~~~\n* Twitter scraping added.\n\n0.1\n~~~\n* Initial release.\n\nCredits\n-------\nThis is my personal library I use in my long-term project. I can pretty much guarantee it will\nlive for a long time then. I will add new features over time and I more than welcome any\nhelp or bug reports. Feel free to open an issue or merge request.\n\nThe code is is licensed under MIT license.\n',
    'author': 'n1',
    'author_email': 'hrdina.pavel@gmail.com',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/im-n1/karpet',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'python_requires': '>=3.6.1,<4.0.0',
}


setup(**setup_kwargs)
