Skip to main content

Delayed Pakistan Stock Exchange (PSX) market data for Python — DividendFlow

Project description

divflowpsx

Delayed Pakistan Stock Exchange (PSX) market data for Python, from DividendFlow.

Not for live trading. Quotes are intentionally delayed by at least 10 seconds. For research and education only — not buy/sell advice.

Install

pip install -U divflowpsx

Google Colab

!pip install -U divflowpsx
# Runtime → Restart session, then:

import divflowpsx
print(divflowpsx.__version__)  # 0.1.3+

board = divflowpsx.get_board()  # shows progress bars
print(board.head())

q = divflowpsx.get_quote("HBL")  # use a PSX ticker, e.g. HBL / OGDC / ENGRO
print(q)

Progress bars show: browser prep → opening PSX → scraping pages → mandatory ≥10s delay.

Quick start

import divflowpsx

# Full board (DataFrame) — delayed ≥ 10s
board = divflowpsx.get_board()
print(board.head())

# Single symbol
q = divflowpsx.get_quote("HBL")
print(q)

# Session changes
movers = divflowpsx.get_changes()

# Dividend / payout announcements
payouts = divflowpsx.get_payouts()

Custom delay / client

from divflowpsx import Client

client = Client(delay_seconds=10)
df = client.get_board()

Notes

  • Data is scraped from the public PSX DPS portal (dps.psx.com.pk).
  • Dependencies (pandas, playwright) install with pip; Chromium is auto-installed on first use.
  • Requires network access on first scrape.

License

MIT © DividendFlow PK

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

divflowpsx-0.1.4.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

divflowpsx-0.1.4-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file divflowpsx-0.1.4.tar.gz.

File metadata

  • Download URL: divflowpsx-0.1.4.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for divflowpsx-0.1.4.tar.gz
Algorithm Hash digest
SHA256 745730c3eda46e4e13e0b22196efc54f01236543e76a10941f4cf7d9d637b083
MD5 629d503f0d7eb14cdda2605cc91bcf41
BLAKE2b-256 3de94528c37e3f6fb86b9e7b069cc860ba70b9c699daa0b7dded441770bfe3c1

See more details on using hashes here.

File details

Details for the file divflowpsx-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: divflowpsx-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for divflowpsx-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 93bfb9bb724314b742869b5f3aff5537855e99aca16aba5715e9a0932172f1f4
MD5 a3bac66ef33a706a811bc22799c591fb
BLAKE2b-256 9e81659b4a47c6406745b55cd557ca2b62d1bd24de7534657f5008895b85d16a

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