Skip to content

fix: add missing exports and return types in Python __init__.py#576

Merged
realfishsam merged 1 commit into
mainfrom
fix/565-471-python-init
May 24, 2026
Merged

fix: add missing exports and return types in Python __init__.py#576
realfishsam merged 1 commit into
mainfrom
fix/565-471-python-init

Conversation

@realfishsam

Copy link
Copy Markdown
Contributor

Fixes #565
Fixes #471

@realfishsam

Copy link
Copy Markdown
Contributor Author

PR Review: PASS (NOT VERIFIED)

What This Does

Adds missing exports to the Python SDK's __init__.py: five type aliases (SortOption, SearchIn, OrderSide, OrderType, CandleInterval) in the import block, four TypedDict types (MarketFilterCriteria, EventFilterCriteria, MarketFetchParams, EventFetchParams) in __all__, and return type annotations on the deprecated stop_server/restart_server functions.

Blast Radius

  • Python SDK: sdks/python/pmxt/__init__.py only
  • No core, TypeScript SDK, or OpenAPI changes

Findings

  1. All new imports verified: SortOption, SearchIn, OrderSide, OrderType, and CandleInterval are all defined in models.py (confirmed at lines 15-19). The five new type aliases are imported from .models and the import succeeds.
  2. __all__ additions verified: MarketFilterCriteria, EventFilterCriteria, MarketFetchParams, and EventFetchParams were already imported from .models (lines 57-59 of the current file) but were missing from __all__. The new entries in __all__ match existing imports, so this is purely a visibility fix for from pmxt import * consumers.
  3. Return type annotations: Adding -> None to stop_server() and restart_server() is a correct and low-risk type improvement.
  4. No TypeScript SDK counterpart needed: These are Python-only type aliases and TypedDicts. The TypeScript SDK has its own type system.

PMXT Pipeline Check

  • Field propagation: N/A (no new fields, just missing re-exports)
  • OpenAPI sync: N/A
  • Type safety: OK -- all types verified to exist in models.py

Semver Impact

patch -- fixes missing public exports, no behavioral change

Risk

Minimal. The only risk is that consumers using from pmxt import SortOption (etc.) were previously getting an ImportError and will now succeed. This is strictly additive and non-breaking.

@realfishsam realfishsam merged commit 48279f2 into main May 24, 2026
10 of 11 checks passed
@realfishsam realfishsam deleted the fix/565-471-python-init branch May 24, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant