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.3.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.3-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: divflowpsx-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 add13d8e6c28977e76678c691bf8a3329e8595fff0d209777b61a476328618cf
MD5 63e81e66dee66f227b567039f2a1e7a8
BLAKE2b-256 3e112dd417cb0b3c11d0ac1e11886d2b4a5c224e3477c290ecf3757ee0834c68

See more details on using hashes here.

File details

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

File metadata

  • Download URL: divflowpsx-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 73ca1bb2f244ff795d1f8e4f3afb27e0828dad781f9aeba8595f33d7b2ce564d
MD5 d2afbaf7c9af8c7f931612bffcd31110
BLAKE2b-256 1b20fb7463b19186e5c1cda00f845c30481810b23d996bb443a06e58100b95d0

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