Skip to main content

A simple Python library for getting stock prices and company names from Yahoo Finance.

Project description

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 Python Versions GitHub code size in bytes GitHub last commit (branch) GitHub Workflow Status (with event)GitHub Workflow Status (with event) GitHub Workflow Status (with event)GitHub

Installation

To use Yahoo Requests, you can easily install it using pip:

pip install YahooRequests 

Usage

Here's how you can use Yahoo Requests to retrieve company data in 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)

Footnotes

^1 Currency codes can be found Here.

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.

Credits

Special thanks to u/Diapolo10 for their contribution to version 1.0.

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

yahoorequests-1.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

yahoorequests-1.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file yahoorequests-1.1.tar.gz.

File metadata

  • Download URL: yahoorequests-1.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/5.15.0-1041-azure

File hashes

Hashes for yahoorequests-1.1.tar.gz
Algorithm Hash digest
SHA256 4c8133591136e798172db0ee1fd137f5e93244256b85f2fbf276a2f89706f5e8
MD5 56237fdffb58f995672dc478e0147df5
BLAKE2b-256 9b7e971608ef08a16215139cfe96217eb0d15a229fb72f4648229822edae5c18

See more details on using hashes here.

File details

Details for the file yahoorequests-1.1-py3-none-any.whl.

File metadata

  • Download URL: yahoorequests-1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/5.15.0-1041-azure

File hashes

Hashes for yahoorequests-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f49abcccc8b4700039c68c2deca30f93135ec13ca08115c1c95338e3327adb26
MD5 f1509971513391cc554fb127734b2b4c
BLAKE2b-256 0aad4d4bc97b86286a4bfbd808ace4d1d1e523adb74d4e2f833ec11774c1b45c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page