This repository contains the public Python SDK for the Linkup API.
Keep the SDK aligned with the current public, stable Linkup API while:
- implementing a Pythonic public interface,
- documenting the features through docstrings,
- and adding type safety through type hints or input data validation with
pydanticmodels when relevant.
- Prefer minimal diffs focused on the public API change being synchronized.
- Do not expose internal, beta, deprecated, or undocumented API behavior unless explicitly requested.
- Preserve the repo's public Python conventions:
- use snake_case in the SDK public surface;
- convert to API wire-format only at the request boundary.
- Keep sync and async client methods aligned when a capability exists in both forms.
- Avoid unnecessary breaking changes. If a change would be breaking or ambiguous, stop and explain instead of guessing.
- If code generation exists for a given area, use the generation command instead of manually editing generated output.
When adding or changing a public API capability, update the relevant pieces together:
- client method signatures,
- request/response typing and models,
- sync and async behavior when applicable,
- tests,
- README if anything in it became out-dated.
After having done some changes or before opening a PR, run the CI checks:
make lint typecheck test.
Never run the underlying checks without using these make commands (e.g. with uv run ruff ...),
as these kind of checks won't take into account some settings (like the exclude list).
- Do not change package version, release config, or publish settings unless the task explicitly asks for it.
- Do not refactor unrelated code while performing API synchronization.
Add durable exceptions here when a proposed sync should not be repeated.
- Do not expose API capabilities that are not clearly public and stable.
- Do not implement
/credits/balancein this SDK unless explicitly requested. - Do not implement
/responsesin this SDK unless explicitly requested. - If a capability was intentionally rejected for product/design reasons, do not propose it again until this file is updated.
Besides the practices enforced through the CI checks (especially with ruff), we try to enforce the following coding practices:
- Mark non-public modules, classes, methods, functions, and attributes private with a leading underscore when they are not part of the SDK public API.
- Prefer Google style guide imports
for new code: import modules instead of importing symbols, except for
typingsymbols, public re-exports, and cases where the existing file convention makes module imports awkward. - Treat anything exported from
linkup.__init__or listed in__all__as public API; add exports only intentionally. - Keep API wire-format names at the request/response boundary only. Internal and public Python APIs should stay snake_case, and camelCase/API aliases should live in request serialization or Pydantic aliases.
- Keep sync and async methods structurally aligned: same parameters, same validation behavior, same returned models, and same documented errors.
- Store secrets as
pydantic.SecretStror an equivalent secret container once they enter client state; do not store raw API keys on instances. - Prefer explicit SDK error classes over leaking transport or dependency exceptions from public methods, except where deliberately documented.
- Add
# noqa,# type: ignore, and# pyright: ignoreonly with a short reason. - Avoid adding runtime dependencies for small conveniences; keep SDK dependencies minimal.
- Write tests through the public
linkupAPI unless the test is specifically covering private or internal behavior.