
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
@contractkit/plugin-python
Advanced tools
ContractKit built-in plugin: Python SDK client generation (Pydantic v2 + httpx)
ContractKit plugin that generates a Python SDK from .ck contract and operation files. Produces Pydantic v2 models and httpx-based client classes.
pnpm add @contractkit/contractkit-plugin-python-sdk
{
"plugins": {
"@contractkit/contractkit-plugin-python-sdk": {
"baseDir": "python-sdk",
"packageName": "acme"
}
}
}
| Option | Type | Default | Description |
|---|---|---|---|
baseDir | string | "python-sdk" | Output directory relative to rootDir |
packageName | string | "Sdk" | Name used for the aggregator SDK class |
python-sdk/
├── __init__.py # SDK aggregator class + __all__ exports
├── _base_client.py # Shared BaseClient and SdkError classes
├── _models_<name>.py # Pydantic v2 models (one file per .ck contract file)
├── _client_<name>.py # httpx client class (one file per .ck operation file)
└── requirements.txt # Runtime dependencies (httpx, pydantic>=2.0)
_models_*.py)Each contract declaration becomes a Pydantic v2 BaseModel. Contracts that have readonly or writeonly fields produce separate Input variants following the same rules as the TypeScript plugin:
Model — read model (no writeonly fields)ModelInput — input model (no readonly fields)_client_*.py)Each operation file with at least one public operation generates a client class. Methods correspond to HTTP verbs and are named from the sdk: field in the .ck source. Request and response bodies are typed with the generated Pydantic models.
__init__.py)The aggregator class (named from packageName) instantiates all client classes and exposes them as attributes. Pass the base URL and optional headers at construction time:
from python_sdk import AcmeSdk
sdk = AcmeSdk(base_url="https://api.acme.com", headers={"Authorization": "Bearer ..."})
payment = sdk.payments.get_payment(id="pay_123")
_base_client.py)Provides BaseClient (wraps httpx.Client) and SdkError (raised on non-2xx responses). All generated client classes inherit from BaseClient.
The generated SDK requires:
pydantic>=2.0
httpx
import { createPythonSdkPlugin } from '@contractkit/contractkit-plugin-python-sdk';
const plugin = createPythonSdkPlugin({
baseDir: 'sdks/python',
packageName: 'acme',
});
FAQs
ContractKit built-in plugin: Python SDK client generation (Pydantic v2 + httpx)
The npm package @contractkit/plugin-python receives a total of 40 weekly downloads. As such, @contractkit/plugin-python popularity was classified as not popular.
We found that @contractkit/plugin-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.