Skip to main content

A package designed to scrape data from Yahoo Finance.

Project description

Version Package Size Last Commit Release Date License

yahoostock

A package designed to scrape data from Yahoo Finance.

Installation

The most simple installation method is through PIP.

pip install yahoostock

The PyPI page can be found here.

Usage

Use the following code to see a list of useful methods.

from yahoostock import yahoo
print(dir(yahoo))

Note that each method accepts a stock ticker as a single parameter and returns a float with the specified statistic.

Here's an example:

from yahoostock.yahoo import *

stock_name = "GOOGL"

function_list = [
    get_price,
    get_open,
    get_previous_close,
    get_change,
    get_percent_change
]

for function in function_list:
    # prints price ($), opening price ($), last closing price ($),
    # change in price ($), and relative change (%)
    print(function(stock_name))

For information about a specific method's purpose refer to the respective method's docstrings.

For example:

from yahoostock.yahoo import get_price

help(get_price)

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

yahoostock-1.3.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yahoostock-1.3.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file yahoostock-1.3.1.tar.gz.

File metadata

  • Download URL: yahoostock-1.3.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using 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.1

File hashes

Hashes for yahoostock-1.3.1.tar.gz
Algorithm Hash digest
SHA256 d3079fed5fa8e2fec9c117916ac2ba13d537780b71abb08dc69ce248a3c654c6
MD5 1aafaf6e56129c0d7378811ade4d04fa
BLAKE2b-256 c6953e5b27dd983d5788c2f118dd2494acb7e0e78fbcddd7133a35594f07e31d

See more details on using hashes here.

File details

Details for the file yahoostock-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: yahoostock-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using 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.1

File hashes

Hashes for yahoostock-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 94452d8d1ac741522525bbd238c9e9f1b21f262c48b66eedd22f21657c6a8f1d
MD5 5200edab7446bff2ce13d89e8af6b636
BLAKE2b-256 640f373259c8520c2923ee3c066aba6acc5c9105e6f4cf8ddcd1fa6d2b75d808

See more details on using hashes here.

Supported by

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