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

That is enough. Playwright and Chromium are pulled in automatically (playwright is a package dependency; Chromium downloads on first get_board() / get_payouts() if missing).

Google Colab

!pip install -U divflowpsx

import divflowpsx
print(divflowpsx.__version__)  # 0.1.2+

board = divflowpsx.get_board()  # may download Chromium once, then scrape
print(board.head())

First call can take a few minutes (browser download + PSX scrape) and is delayed ≥ 10 seconds.

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.2.tar.gz (10.8 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.2-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: divflowpsx-0.1.2.tar.gz
  • Upload date:
  • Size: 10.8 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.2.tar.gz
Algorithm Hash digest
SHA256 2f97685a2abbc1157776683e1bfa638a6f57c333d1209a37d59a11e92ad9bb2f
MD5 328e3f9dc5601c4f2fc9943f9dcb768a
BLAKE2b-256 a4bbbabe6f2f5cc4e883a34fcc6e064e88a2b5e555bc4c1a2c55625c80c741a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: divflowpsx-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 671defed50b99f57918896e4fe5f946bfd08d70846126fe5364eea35a0da7170
MD5 a044f188d1f25660159160bec9073d78
BLAKE2b-256 4ecf67e7ff56564835e099c080a2844b52dbb3627b30b989096e0347010204ad

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