Python 0.6.0 parity map

September 17, 2026 ยท View on GitHub

Reference: typesafe-sdk-python 0.6.0, revision 420ef4ffb612d5a539a1e0f0fe883ff6770340af.

This is an implementation map, not a certification of complete parity. The current offline suite covers selected contracts; the full Python suite has not been ported and live API compatibility has not been verified. Rows citing an implementation or documentation describe the intended behavior, not an independently tested guarantee.

Upstream export/featurePHP equivalentEvidenceHonest limitation
TypeSafeClientTypeSafe\\TypeSafeClienttests/ContractTest.phpPHP uses try/finally rather than context manager syntax.
AsyncTypeSafeClientTypeSafe\\AsyncTypeSafeClientasync contract testGuzzle promises/cURL replace asyncio.
Models / AsyncModelsModels / AsyncModels resourcesmodels testsNo Python async iterator is involved.
Noul, Choice, Scoresame names in TypeSafe\\serialization testsPHP arrays need JsonObject internally for empty/sequential maps.
NoulModel, ChoiceModel, ScoreModelRaw question arraysraw question testPHP has no TypedDict equivalent; not all upstream static type constraints are represented.
Question, QuestionModel, QuestionsPHPDoc unions and arraysquestion validation testRuntime raw validation intentionally remains shallow.
JSONValue, JSONContentScalars, arrays and stdClass accepted through mixed inputsserialization testRecursive JSON aliases are not statically enforced.
SystemOneResponsesame nameresponse testsDerived views are readonly arrays, not cached properties.
NoulAnswer, ChoiceAnswer, ScoreAnswersame namesresponse testsScore object keys are converted to PHP ints.
Usagesame name with inputTokens/outputTokensresponse testsbilling_units remains intentionally absent, matching public upstream Usage.
ModelMetadatasame name with releaseDatemodels testWire key remains release_date.
ListModelsResponsesame namemodels testModels are a PHP list array rather than Python tuple.
RetryPolicysame name, camelCase optionsretry contract testDelay uses Guzzle's millisecond option; no Tenacity dependency.
TypeSafeError and status subclassessame nameserror contract testGuzzle transport errors are normalized before escaping the client.
from_http_responsefromHttpResponse(ResponseInterface, ?RequestInterface)response testPSR-7 replaces httpx response/request types.
request_id, raw_http_responsemagic properties plus getRequestId()/getRawHttpResponse()metadata testMetadata is unavailable on manually constructed DTOs.
system_one endpointssystemOne, models->listtransport testsOnly the two upstream endpoints are implemented.
env/default configcamelCase constructor and env namesconfig coverageNo global app configuration is changed.
logging/redactionPSR-3 Logger adapterlogging implementationBodies are not redacted; sanitized URLs omit userinfo/query/fragment.
HTTPX timeout phasesfloat or Timeouttimeout testGuzzle has no exact write/pool phase analogue; read setting is handler-dependent.
async cancellationGuzzle promise cancel() and client close()async implementationCancellation/close semantics depend on the selected Guzzle handler.
context managers / picklingclose() and PHP object lifecyclelifecycle docsPHP has neither Python context manager nor pickle protocol.