Summary
Add a py.typed marker file to the Deepgram Python SDK package for PEP 561 compliance, enabling static type checkers (mypy, pyright, pytype) to automatically discover and use the SDK's type annotations without requiring separate type stubs.
Problem it solves
Developers using static type checkers in their projects cannot automatically resolve Deepgram SDK types because the package lacks a PEP 561 py.typed marker. This means IDE autocompletion, type inference, and error detection do not work reliably with the SDK. Developers must manually configure type checker paths or suppress type errors, which undermines trust in the SDK's type safety and creates friction in professional Python development workflows where strict type checking is standard.
Proposed API
No API changes — this is a packaging enhancement:
- Add an empty
py.typed file to the deepgram/ package root
- Include
py.typed in the package's package_data or MANIFEST.in so it's distributed with the package
- Ensure all public-facing types are properly annotated
# After this change, developers get automatic type resolution:
from deepgram import DeepgramClient
client = DeepgramClient() # mypy/pyright now resolves all methods and return types
response = client.listen.rest.v("1").transcribe_file(payload)
response.results # IDE shows full type info with autocompletion
Acceptance criteria
Raised by the DX intelligence system.
Summary
Add a
py.typedmarker file to the Deepgram Python SDK package for PEP 561 compliance, enabling static type checkers (mypy, pyright, pytype) to automatically discover and use the SDK's type annotations without requiring separate type stubs.Problem it solves
Developers using static type checkers in their projects cannot automatically resolve Deepgram SDK types because the package lacks a PEP 561
py.typedmarker. This means IDE autocompletion, type inference, and error detection do not work reliably with the SDK. Developers must manually configure type checker paths or suppress type errors, which undermines trust in the SDK's type safety and creates friction in professional Python development workflows where strict type checking is standard.Proposed API
No API changes — this is a packaging enhancement:
py.typedfile to thedeepgram/package rootpy.typedin the package'spackage_dataorMANIFEST.inso it's distributed with the packageAcceptance criteria
py.typedmarker file exists in the distributed packagemypy --strictandpyrightcan resolve SDK types without configurationRaised by the DX intelligence system.