Skip to content

refactor(python)!: rename import package sdk -> quicknode_sdk#35

Merged
johnpmitsch merged 2 commits into
mainfrom
dx-5534-rename-python-sdk-import-package-sdk-quicknode_sdk
May 29, 2026
Merged

refactor(python)!: rename import package sdk -> quicknode_sdk#35
johnpmitsch merged 2 commits into
mainfrom
dx-5534-rename-python-sdk-import-package-sdk-quicknode_sdk

Conversation

@johnpmitsch
Copy link
Copy Markdown
Collaborator

Summary

  • Renames the Python import package from the generic sdk to quicknode_sdk. Users now write from quicknode_sdk import QuicknodeSdk.
  • The PyPI distribution name (quicknode-sdk) and the Rust core crate name do not change — only the Python import path.
  • No backwards-compat shim: still on the 0.1.x line per repo policy, so this is a clean break.

Why

The old import name (sdk) is a footgun for users — it shadows any local sdk/ directory and reads poorly in third-party code. Every other language binding in this repo is namespaced (quicknode-sdk crate in Rust, @quicknode/sdk in Node, quicknode_sdk in Ruby). Python was the odd one out.

Files changed

  • pyproject.toml, crates/python/pyproject.toml — maturin module-name
  • python/sdk/python/quicknode_sdk/ (directory rename via git mv)
  • __init__.py, __init__.pyi, init_manual_override.pyi — internal from sdk._corefrom quicknode_sdk._core
  • All five python/examples/*.py scripts
  • python/README.md (6 import examples + error-class import line)
  • Root README.md project-structure tree
  • CLAUDE.md build/consistency notes
  • Justfile python-build recipe paths
  • .gitignore paths

Test plan

  • just python-build produces wheel for quicknode_sdk._core
  • from quicknode_sdk import QuicknodeSdk, ApiError imports cleanly
  • import sdk raises ModuleNotFoundError (old name fully removed)
  • All five example scripts parse and import (only fail later on missing QN_API_KEY, as expected)
  • cargo check && just lint pass
  • Reviewer: run just python-build on a clean tree to confirm the maturin/stub-gen step still produces matching _core/__init__.pyi

Linear: DX-5534

The Python distribution has always been published as `quicknode-sdk` on
PyPI, but the import name was the generic `sdk`. That name collides with
any local `sdk/` directory and reads poorly in third-party code — every
other language binding in this repo is namespaced (`quicknode-sdk` crate
in Rust, `@quicknode/sdk` in Node, `quicknode_sdk` in Ruby).

Rename the import path so callers write:

    from quicknode_sdk import QuicknodeSdk

The PyPI distribution name (`quicknode-sdk`) and the Rust core crate
name do not change — only the Python import name. No backwards-compat
shim: we're still on the 0.1.x line per repo policy.

Changes:
- maturin `module-name` in both pyproject.toml files
- python/sdk/ directory renamed to python/quicknode_sdk/
- internal `from sdk._core import ...` imports
- all five python/examples/*.py scripts
- python/README.md (6 import examples + error-class import line)
- root README.md project-structure tree
- CLAUDE.md build/consistency notes
- Justfile python-build recipe paths
- .gitignore paths

Verified: `just python-build` succeeds, `from quicknode_sdk import ...`
works, `import sdk` raises ModuleNotFoundError, `cargo check && just
lint` pass.
While the SDK is on the 0.x line, any release may contain breaking
changes. Add a short callout pointing readers at the GitHub release
notes so upgrades aren't surprising.

Mirrored byte-identically across the root README and all four
per-language READMEs to satisfy the polyglot consistency rule in
CLAUDE.md.
@johnpmitsch johnpmitsch merged commit d7b4190 into main May 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants