Commit Graph

103 Commits

Author SHA1 Message Date
Alessandro Colace 5d10c0c48e Make curl_cffi optional with graceful fallback to requests
Some platforms (e.g. older macOS, exotic Linux distros) cannot build the
curl-impersonate binary that backs curl_cffi, leaving yfinance unusable.
This change keeps curl_cffi as the preferred and default backend but no
longer hard-requires it at runtime.

- New `yfinance/_http.py` abstracts the HTTP backend. If `curl_cffi` is
  importable it is used as before; otherwise yfinance falls back to plain
  `requests` with a realistic Chrome User-Agent and logs a warning so the
  downgrade is explicit.
- `data.py`, `base.py`, `multi.py`, `scrapers/history.py` build sessions
  via `_http.new_session()`.
- Scrapers and screener catch `_http.HTTPError` instead of importing
  `curl_cffi.requests.exceptions.HTTPError` directly.
- `is_supported_session()` accepts either backend; `cookie_jar()` papers
  over the small API difference between curl_cffi (`cookies.jar`) and
  requests (`cookies` is itself the jar).
- New Advanced > Installation page documents the curl_cffi-free install
  recipe; README links to it just under the install instruction.

Empirically verified that plain `requests` with a Chrome UA does not hit
the 401-after-~10-requests issue that the earlier `curl_adapter` approach
ran into; 15/15 quoteSummary calls succeed without rate limiting.

`setup.py` is unchanged -- `curl_cffi>=0.15` remains the default install
requirement (CVE-pinned). The fallback only activates when the import
fails at runtime; moving curl_cffi to extras_require can be a follow-up
decision for the maintainer.
2026-05-20 14:17:02 +02:00
ValueRaider b0e855e7ec Merge pull request #2661 from peter199711/fix-pypi-link
Fix broken contributing link in PyPI documentation
2026-01-10 12:20:11 +00:00
Ilyas Timour 03ec05d286 Fix broken LICENSE.txt link in PyPI documentation
The relative link works on GitHub but is broken on PyPI.
Replaced it with an absolute GitHub URL.
2026-01-07 14:42:03 +01:00
Peter 5c7b41d510 Fix broken contributing link in PyPI documentation 2026-01-05 11:01:15 +08:00
Ran Aroussi 4ff80a57d4 Update PyPi downloads badge refresh rate 2025-09-10 18:33:37 +01:00
ValueRaider 890026c862 Change docs trigger to main ; Improve contribute docs 2025-05-11 12:14:24 +01:00
ValueRaider 615db18a96 Merge branch 'dev' into main 2025-05-03 11:18:20 +01:00
R5dan 7db2572799 Update docs url 2025-05-02 19:30:43 +01:00
R5dan 0e5fb9614f Contributing 2025-05-02 10:10:54 +01:00
Dhruvan Gnanadhandayuthapani fc5d29558b Add WebSocket support 2025-04-27 20:39:20 +02:00
ValueRaider 13b26a99d0 README: fix docs url 2025-04-23 22:31:56 +01:00
Ran Aroussi 4ecd6a67cf Updated link 2025-03-22 13:21:44 +00:00
ValueRaider f3f6739153 README: fix docs link 2025-03-22 11:09:55 +00:00
Ran Aroussi 41426f6678 added star history :) 2025-02-23 21:33:26 +00:00
Ran Aroussi 70c84a3482 Set docs domain to yfinance-python.org 2025-02-22 22:10:50 +00:00
Ran Aroussi c388ca73e8 Minor design changes to readme file 2025-02-22 19:25:06 +00:00
sshcli 0b8ae726cb Update README.md 2025-02-17 01:16:52 +00:00
R5dan 966473f7c7 Add Market summary & status 2024-12-29 17:33:51 +00:00
Dhruvan Gnanadhandayuthapani 873ab0f574 Added new search feature
Refactor Search

Added unittest for Search

Documentation for Search

Fix unused import
2024-12-05 23:53:33 +01:00
ValueRaider fffe89e691 README: simplify a little 2024-11-17 11:49:05 +00:00
Eric Pien deafc88520 Add Sphinx Documentation
- Initial draft of Sphinx documentation using rst
    - update docstrings
    - add deploy_doc.yml for automated deployment through GitHub Actions
2024-11-04 13:59:35 -08:00
Ikko Eltociear Ashimine b32e57fcfe docs: update README.md
minor fix
2024-10-22 17:19:56 +09:00
ValueRaider 1de113eccd Merge pull request #2091 from ranaroussi/dev
sync dev -> main
2024-10-20 22:56:26 +01:00
Eric Pien 4a70b59db9 Simplify README for Screener
- Reduce the information provided in README with the expectation of migrating to separate documentation.
2024-10-19 09:27:32 -07:00
Ran Aroussi 12e815d977 Update README.md 2024-10-17 21:51:59 +01:00
Eric Pien 048378ea20 Implement Screener
- Add a new class Screener, Query, and EquityQuery
- Refactor YfData.get() to enable YfData.post() to all of get's implementations
- Add test for the Screener
- Add new set and map to const

Screener can be used to filter yahoo finance. This can be used to get the top gainers of the day, and more customized queries that a user may want to automate.
2024-09-30 18:01:11 -07:00
Eric Pien 3a0b6c2315 Implement Sector and Industry
Sector and Industry class to query the data available on: https://finance.yahoo.com/sectors/:
- sector / industry overview
- sector / industry top companies
- sector / industry research reports
- sector top ETFs
- sector top Mutual Funds
- industries within sector
- industry's sector
- industry's top performing companies
- industry's top growth companies
2024-09-22 08:35:12 -07:00
ValueRaider 6b7a511765 Merge pull request #2041 from ericpien/funds
implement support for funds data
2024-09-08 12:53:20 +01:00
Eric Pien f584b0c7d0 implementing support for funds data
- adding to scraper a new class FundsData.
- Ticker can now reference the data via ticker.funds_data when appropriate.
- Add unit tests in test_ticker.py for the funds data
2024-09-07 13:49:54 -07:00
Jon Cokisler 72684b1784 fix typo in README 2024-08-26 13:51:45 -04:00
ValueRaider 4941c619f4 Merge pull request #2023 from Fidasek009/feature/analysis
Implement Analysis (no scraping)
2024-08-16 19:25:48 +01:00
Filip Krása 0c447d56d1 Update README.md with analysis attributes 2024-08-16 18:37:31 +02:00
ValueRaider 614906cc50 Implement fetch sec-filings 2024-08-03 15:16:45 +01:00
ValueRaider 30abd89474 README: add new 'sustainability' attribute 2024-07-19 16:00:52 +01:00
ValueRaider cb691df586 Merge pull request #1941 from ranaroussi/main
sync main -> dev
2024-05-19 15:07:18 +01:00
Marcao 7628bec2a6 Adjust and fix according to feedback 2024-05-11 19:20:19 +02:00
Elijah Lopez 5a683b916d Add raise missing ticker tests, replace deprecated datetime methods
- renamed test files conform with standards
- replaced utcfromtimestamp
2024-05-10 17:23:14 +02:00
ValueRaider efe15e1907 Add table-of-contents to README 2024-04-27 12:50:15 +01:00
ValueRaider 48e9075a2d Deprecate 'pandas_datareader', remove a deprecated argument.
Drop official support for 'pandas_datareader', tag pdr_override() as deprecated.
Also removed deprecated argument 'download(show_errors)'.
2024-04-06 12:42:04 +01:00
molpcs 47bc46c804 Update README.md
Wrap yfinance[optional] code snippet with quotes to avoid conflict with zsh globbing. Remains compatible with bash.
2024-01-12 11:57:58 -08:00
Value Raider 61c4696c65 Add new data to README, remove deprecated stuff, fix tests, v0.2.35
Ticker.recommendations*:
- add to README
- organise their unit tests
- remove redundant recommendations_history

Remove deprecated arguments from Ticker.history

Fix 'bad symbol' behaviour & tests
Fix some prices tests

Bump version 0.2.35
2024-01-07 00:33:59 +00:00
ValueRaider 49d8dfd544 Merge pull request #1815 from ranaroussi/dev
sync dev -> main
2024-01-06 16:18:20 +00:00
ValueRaider 8975689bd1 README: add cache folder location 2023-12-16 13:36:40 +00:00
ValueRaider a914647fa4 Merge pull request #1772 from JuliaLWang8/feat/holders-insiders
Feat/Holders insider data
2023-12-13 22:13:24 +00:00
Julia L. Wang dc957eeb0e Implementation of holders data 2023-12-13 16:57:13 -05:00
Value Raider 469037be80 Tweaks to formatting and links. 2023-12-13 19:26:05 +00:00
Julia L. Wang 9648e69b7e Updated scipy and readme 2023-12-12 18:26:04 -05:00
Julia L. Wang 1863b211cd Added extra dependencies 2023-12-10 10:36:02 -05:00
Value Raider 7d6d8562e8 Replace sqlite3 with peewee for 100% thread-safety 2023-09-03 16:47:36 +01:00
Ricardo Prins 274f309052 Bump requests to 2.31 and removes cryptography. 2023-07-20 17:17:44 -06:00