Skip to main content

it is a lightweight Python library for extracting financial data from structured, publicly accessible stock information pages

Project description

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.

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

sfinance-0.2.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

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

sfinance-0.2.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file sfinance-0.2.0.tar.gz.

File metadata

  • Download URL: sfinance-0.2.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sfinance-0.2.0.tar.gz
Algorithm Hash digest
SHA256 83a8720e6ab7f57629ce1cd5a4bdf3e76519becf6ed684c7e5c2f646dff7fabc
MD5 8d20692332c5dafeb9d5bd9b54848021
BLAKE2b-256 64e755902ff456dee6b26a79e2ba3dae2a39c93dc192e6b0760b78f1f4732dc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for sfinance-0.2.0.tar.gz:

Publisher: python-publish.yml on shivakharbanda/sfinance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sfinance-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sfinance-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sfinance-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43ba26221f13defec59eef878a1cb5248a35fba3749910001824d898f68a0e6e
MD5 4c5258eef09dda19ca9cc42126a7b0dd
BLAKE2b-256 df02547eddbe1ad6610f79079b0cd8bd506e31dcfd20bf9a22c35535ea35b534

See more details on using hashes here.

Provenance

The following attestation bundles were made for sfinance-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on shivakharbanda/sfinance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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