sfinance

https://img.shields.io/pypi/v/sfinance.svg Documentation Status

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.

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.

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.