Skip to content

SDK drift: Python __all__ missing MarketFilterCriteria, EventFilterCriteria, MarketFetchParams, EventFetchParams, and several enum/literal types #471

@realfishsam

Description

@realfishsam

Drift

Python's __init__.py imports several types but omits them from __all__, making them invisible to from pmxt import * users and to documentation generators. Additionally, several enum/literal types defined in models.py are never imported or re-exported from __init__.py at all. TypeScript exports all of these via export type * from "./pmxt/models.js".

TypeScript SDK

sdks/typescript/index.ts, line ~85:

export type * from "./pmxt/models.js";

This unconditionally re-exports every type from models.ts, including:

  • MarketFilterCriteria / MarketFetchParams
  • EventFilterCriteria / EventFetchParams
  • SortOption, SearchIn, OrderSide, OrderType, CandleInterval

Python SDK

sdks/python/pmxt/__init__.py — four types are imported but absent from __all__:

# Imported (line ~95–100):
from .models import (
    ...
    MarketFilterCriteria,   # imported but NOT in __all__
    EventFilterCriteria,    # imported but NOT in __all__
    MarketFetchParams,      # imported but NOT in __all__
    EventFetchParams,       # imported but NOT in __all__
)

sdks/python/pmxt/models.py — five types defined but never imported or exported from __init__.py:

# models.py — defined but not re-exported:
SortOption      # Literal or Enum
SearchIn        # Literal or Enum
OrderSide       # Literal or Enum
OrderType       # Literal or Enum
CandleInterval  # Literal or Enum

Expected

All of the following should be added to __all__ in sdks/python/pmxt/__init__.py:

  • MarketFilterCriteria
  • EventFilterCriteria
  • MarketFetchParams
  • EventFetchParams
  • SortOption
  • SearchIn
  • OrderSide
  • OrderType
  • CandleInterval

SortOption, SearchIn, OrderSide, OrderType, and CandleInterval also need to be imported in __init__.py before they can be added to __all__.

Impact

Users who do from pmxt import MarketFilterCriteria will succeed (the symbol is importable), but from pmxt import * will not include it, violating the principle of least surprise. Tools like pydoc, pdoc, and IDE stubs that rely on __all__ will omit these types entirely. SortOption and the other unimported enums are completely unreachable from the public API, forcing users to import from pmxt.models directly — an undocumented internal path.

Found by automated SDK cross-language drift audit

Metadata

Metadata

Assignees

No one assigned

    Labels

    sdk-driftCross-language SDK consistency findings (TypeScript vs Python)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions