it is a lightweight Python library for extracting financial data from structured, publicly accessible stock information pages
Project description
sfinance is a lightweight Python library for automating the extraction of financial tables from publicly accessible, structured HTML pages.
It uses Selenium and BeautifulSoup under the hood to simulate browser behavior and extract data into pandas DataFrames for further analysis.
This tool is intended for personal and educational use only.
Free software: Apache Software License 2.0
Documentation: https://sfinance.readthedocs.io
Usage
Install the package (once published on PyPI):
pip install sfinance
Use it like this:
from sfinance.sfinance import SFinance
sf = SFinance("https://www.screener.in/")
t = sf.ticker("INFY")
print(t.get_overview())
print(t.get_income_statement())
sf.close()
This will return clean, structured pandas DataFrames from dynamically rendered pages. You are expected to supply valid URLs yourself. The package does not suggest or pre-configure any third-party endpoints.
—
Legal Disclaimer
This project is an independent, educational, and non-commercial utility.
It is not affiliated with, endorsed by, or sponsored by Screener.in, Mittal Analytics Private Limited, or any other third-party data provider.
sfinance does not provide, store, host, or distribute any financial data.
It only reads publicly accessible web content on-demand using browser automation. No data is cached, saved, or redistributed.
All access is controlled by the user via input URLs. You are fully responsible for your use of this tool.
This library is intended for personal, educational, and non-commercial purposes only.
Please respect the terms of service of any website you access. Use responsibly.
Features
Uses Selenium to render dynamic content
Parses financial tables with BeautifulSoup
Extracts income statement, balance sheet, cash flow, shareholding, and company overview
Accesses company documents: announcements, annual reports, credit ratings, and concalls
Downloads documents (PDFs, HTML) directly to a local folder with flexible filters
Stock screener with custom financial queries (login required)
Outputs pandas DataFrames for analysis
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Legal Disclaimer
This project is not affiliated with, endorsed by, or sponsored by Screener.in, Mittal Analytics Private Limited, or any other third-party data provider.
This tool does not store, modify, or distribute data. It simply reads publicly viewable HTML pages when accessed by the user, using standard browser automation techniques.
Users are solely responsible for ensuring that their use of this software complies with the terms of service of any website they access.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sfinance-0.2.1.tar.gz.
File metadata
- Download URL: sfinance-0.2.1.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83084755c149cc46d6595e3fdb247aac9ff1e1bc516641c5e9c0b618ee466ab6
|
|
| MD5 |
b97f8781b8426a99a42cb45e121d9368
|
|
| BLAKE2b-256 |
87d3de3038c92ce190685811091115ced5f668757f1aed7e75c93ba989dab09a
|
Provenance
The following attestation bundles were made for sfinance-0.2.1.tar.gz:
Publisher:
python-publish.yml on shivakharbanda/sfinance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sfinance-0.2.1.tar.gz -
Subject digest:
83084755c149cc46d6595e3fdb247aac9ff1e1bc516641c5e9c0b618ee466ab6 - Sigstore transparency entry: 1217587485
- Sigstore integration time:
-
Permalink:
shivakharbanda/sfinance@390ba50c5d95d3d8ba969c7a02975c6df1b2867f -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/shivakharbanda
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@390ba50c5d95d3d8ba969c7a02975c6df1b2867f -
Trigger Event:
release
-
Statement type:
File details
Details for the file sfinance-0.2.1-py3-none-any.whl.
File metadata
- Download URL: sfinance-0.2.1-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e01f7747279efa4d6597edb2784681c6890591ce94d8f4fb559e6c2522472edd
|
|
| MD5 |
ade3614aef5dbf327a022d8c3c3c8236
|
|
| BLAKE2b-256 |
f50af80e837732e0d645d2db79712143cac6d74dab575c2f3e7e2d849947ff03
|
Provenance
The following attestation bundles were made for sfinance-0.2.1-py3-none-any.whl:
Publisher:
python-publish.yml on shivakharbanda/sfinance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sfinance-0.2.1-py3-none-any.whl -
Subject digest:
e01f7747279efa4d6597edb2784681c6890591ce94d8f4fb559e6c2522472edd - Sigstore transparency entry: 1217587489
- Sigstore integration time:
-
Permalink:
shivakharbanda/sfinance@390ba50c5d95d3d8ba969c7a02975c6df1b2867f -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/shivakharbanda
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@390ba50c5d95d3d8ba969c7a02975c6df1b2867f -
Trigger Event:
release
-
Statement type: