# Yahoo Requests - Python Library for Company Data Retrieval
Welcome to Yahoo Requests, a Python library designed to facilitate the retrieval of company information such as prices and full names using Yahoo's data sources.
[![Github Page](https://img.shields.io/badge/Github-000?logo=github)](https://github.com/TheodorGajhede/YahooRequests/tree/main)
![Python Versions](https://img.shields.io/badge/Python-3.7--3.12-259?logo=python) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/TheodorGajhede/YahooRequests) ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/TheodorGajhede/YahooRequests/main?label=Last%20commit) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/TheodorGajhede/YahooRequests/build.yml?style=flat&logo=github&label=Build)![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/TheodorGajhede/YahooRequests/unit_test.yml?style=flat&logo=github&label=Unit%20test) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/TheodorGajhede/YahooRequests/test_publish.yml?style=flat&logo=github&label=Test%20publish)![GitHub](https://img.shields.io/github/license/TheodorGajhede/YahooRequests?label=License)
## Features
Retrieve live prices, full names, and converted prices of companies (supports currency codes)
Get the most popular news article about a company (early access feature)
Calculate the average price of a stock in a time period
Return a simple table with different information about the company
Easy to use and install
## Installation
To use Yahoo Requests, you can easily install it using pip:
```sh
pip install YahooRequests
```
## Usage
Here's how you can use Yahoo Requests to retrieve company data in Python:
```python
from YahooRequests import YahooRequests as yr
# Get the live price of Google in USD
price = yr.price("googl")
# Get the full company name of Google
name = yr.name("googl")
# Get the converted price of Google (supports currency codes)
converted_price = yr.price("googl", "eur")
# Full company name of Google with no suffix (like inc or corp)
# If no argument is given, this will be included
no_suffix_name = yr.name("googl", suffix=False)
# Return a simple table with different information about the company
table_company = yr.basic_info("googl")
# Return the most popular news article about a company (Early access feature)
news = yr.news("googl", timespan=5, warning=True)
# Return the average price of a stock in a time period
average_price = yr.average_price("aapl", "2021-1-1", "2022-1-1")
```
## Footnotes
Currency codes can be found [Here](https://www.iban.com/currency-codes).
Average analyst rating explanation:
- *If the average rating is close to 5, that means most analysts rate the stock as a sell.
Conversely, if the average rating is close to 1, most analysts have a "buy" or "strong buy" rating.
In summary, analyst ratings are often aggregated into a single score on a scale of 1–5.*
## Author
Theodor Gajhede from the northern part of Denmark.
## Support
If you encounter issues with the library, try using the "--user" flag when installing with pip or send a support ticket to RedDied at reddied@gmail.com.
### Credits
Special thanks to u/Diapolo10 for their contribution to version 1.0.
Raw data
{
"_id": null,
"home_page": "https://github.com/TheodorGajhede/YahooRequests",
"name": "YahooRequests",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "Stocks,Yahoo,Finance",
"author": "Theodor Gajhede",
"author_email": "theodorgajhede@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/40/35/b6a41133fa9bea66020d210dfdea0818f228204d1430bda3d72d9314dbb9/yahoorequests-1.11.tar.gz",
"platform": null,
"description": "# Yahoo Requests - Python Library for Company Data Retrieval\n\nWelcome to Yahoo Requests, a Python library designed to facilitate the retrieval of company information such as prices and full names using Yahoo's data sources.\n\n[![Github Page](https://img.shields.io/badge/Github-000?logo=github)](https://github.com/TheodorGajhede/YahooRequests/tree/main) \n![Python Versions](https://img.shields.io/badge/Python-3.7--3.12-259?logo=python) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/TheodorGajhede/YahooRequests) ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/TheodorGajhede/YahooRequests/main?label=Last%20commit) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/TheodorGajhede/YahooRequests/build.yml?style=flat&logo=github&label=Build)![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/TheodorGajhede/YahooRequests/unit_test.yml?style=flat&logo=github&label=Unit%20test) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/TheodorGajhede/YahooRequests/test_publish.yml?style=flat&logo=github&label=Test%20publish)![GitHub](https://img.shields.io/github/license/TheodorGajhede/YahooRequests?label=License)\n\n## Features\n\nRetrieve live prices, full names, and converted prices of companies (supports currency codes)\nGet the most popular news article about a company (early access feature)\nCalculate the average price of a stock in a time period\nReturn a simple table with different information about the company\nEasy to use and install\n\n## Installation\n\nTo use Yahoo Requests, you can easily install it using pip:\n\n```sh\npip install YahooRequests \n```\n## Usage\nHere's how you can use Yahoo Requests to retrieve company data in Python:\n```python\nfrom YahooRequests import YahooRequests as yr\n\n# Get the live price of Google in USD\nprice = yr.price(\"googl\")\n\n# Get the full company name of Google\nname = yr.name(\"googl\")\n\n# Get the converted price of Google (supports currency codes)\nconverted_price = yr.price(\"googl\", \"eur\")\n\n# Full company name of Google with no suffix (like inc or corp)\n# If no argument is given, this will be included\nno_suffix_name = yr.name(\"googl\", suffix=False)\n\n# Return a simple table with different information about the company\ntable_company = yr.basic_info(\"googl\")\n\n# Return the most popular news article about a company (Early access feature)\nnews = yr.news(\"googl\", timespan=5, warning=True)\n\n# Return the average price of a stock in a time period\naverage_price = yr.average_price(\"aapl\", \"2021-1-1\", \"2022-1-1\")\n```\n\n## Footnotes\nCurrency codes can be found [Here](https://www.iban.com/currency-codes).\n\nAverage analyst rating explanation:\n\n- *If the average rating is close to 5, that means most analysts rate the stock as a sell.\n Conversely, if the average rating is close to 1, most analysts have a \"buy\" or \"strong buy\" rating.\nIn summary, analyst ratings are often aggregated into a single score on a scale of 1\u20135.*\n\n## Author\nTheodor Gajhede from the northern part of Denmark.\n\n## Support\n If you encounter issues with the library, try using the \"--user\" flag when installing with pip or send a support ticket to RedDied at reddied@gmail.com.\n\n### Credits\n Special thanks to u/Diapolo10 for their contribution to version 1.0.",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple Python library for getting stock prices and company names from Yahoo Finance.",
"version": "1.11",
"project_urls": {
"Homepage": "https://github.com/TheodorGajhede/YahooRequests",
"Repository": "https://github.com/TheodorGajhede/YahooRequests.git"
},
"split_keywords": [
"stocks",
"yahoo",
"finance"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ec256de67b43052801b6fea72d51ed3070c22d93bacb1e46412c1c81d3b14883",
"md5": "40b6de79e8dcd31eab97203ed771d7d6",
"sha256": "2d14bbfabf2ccf72dfa4e7c62f10ec4b7f9fb56e2b7317ac05c0579490e98ede"
},
"downloads": -1,
"filename": "yahoorequests-1.11-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "40b6de79e8dcd31eab97203ed771d7d6",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 10577,
"upload_time": "2023-11-27T17:33:19",
"upload_time_iso_8601": "2023-11-27T17:33:19.190780Z",
"url": "https://files.pythonhosted.org/packages/ec/25/6de67b43052801b6fea72d51ed3070c22d93bacb1e46412c1c81d3b14883/yahoorequests-1.11-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4035b6a41133fa9bea66020d210dfdea0818f228204d1430bda3d72d9314dbb9",
"md5": "bed15b7bd5187863ace72653414abde7",
"sha256": "51da23dda99c2910b27aa647fd65512998c9a4d898b80a7379763addebda9388"
},
"downloads": -1,
"filename": "yahoorequests-1.11.tar.gz",
"has_sig": false,
"md5_digest": "bed15b7bd5187863ace72653414abde7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8547,
"upload_time": "2023-11-27T17:33:20",
"upload_time_iso_8601": "2023-11-27T17:33:20.933523Z",
"url": "https://files.pythonhosted.org/packages/40/35/b6a41133fa9bea66020d210dfdea0818f228204d1430bda3d72d9314dbb9/yahoorequests-1.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-27 17:33:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "TheodorGajhede",
"github_project": "YahooRequests",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "yahoorequests"
}