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
playwright install chromium
Google Colab
!pip install -U divflowpsx
!playwright install chromium
import divflowpsx
board = divflowpsx.get_board() # works in Colab (v0.1.1+)
print(board.head())
First
get_board()can take 1–2 minutes (scrapes the PSX portal) 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). - First call downloads the board via headless Chromium (Playwright); subsequent calls respect the delay / cache.
- Requires network access and
playwright install chromiumonce per machine.
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
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 divflowpsx-0.1.1.tar.gz.
File metadata
- Download URL: divflowpsx-0.1.1.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b478481234f2b20d78d9f4312347c37c9442ae160c5eaa54c86c24388cf1223a
|
|
| MD5 |
5b61d93f0fc87bad8e6b3a136d544313
|
|
| BLAKE2b-256 |
b08f141d5119d808b4ecd0e3a7024a3dfb1d0777f828e1916b65881f95d1b71c
|
File details
Details for the file divflowpsx-0.1.1-py3-none-any.whl.
File metadata
- Download URL: divflowpsx-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e39148b43300c2708c97dde892126c3ca38bec978485c88f8c45a0bef937941
|
|
| MD5 |
510a005c3ed9e9d2b0ec19f56e6288d0
|
|
| BLAKE2b-256 |
b1692eab852c0ea9e93abaffe2d3a4d7a58d6174c2a84bde4ff23d3b37725078
|