Migrating from jinko_helpers to jinko
Starting with jinko-sdk 1.0.0, the SDK was rewritten from the ground up.
If your code still has import jinko_helpers as jinko and calls like jinko.make_request(...), here's what to know to port it.
What changed
- Import:
import jinko_helpers as jinkobecomesfrom jinko import JinkoClient. - Entry point: instead of a flat set of module-level functions (
make_request,get_project_item,get_core_item_id, ...), everything goes through aJinkoClientinstance and the typed objects it returns (Model,Vpop,ProtocolDesign,Trial, ...), each with properties like.sid/.urland methods liketrial.run(). - Escape hatch renamed:
jinko.make_request(...)becomesclient.raw_request(method, path, ...), for the rare case where no typed method exists yet.
The package name on PyPI is unchanged (pip install jinko-sdk) — only the import and usage change.
A quick before/after
Before
import jinko_helpers as jinko
jinko.initialize(project_id="your-project-id", api_key="your-api-key")
response = jinko.make_request(
path="/core/v2/trial_manager/trial",
method="POST",
json=trial_design,
options={"name": "Test Trial"},
)
project_item_info = jinko.get_project_item_info_from_response(response)
trial_core_item_id = project_item_info["coreItemId"]["id"]
After
from jinko import JinkoClient
client = JinkoClient(api_key="your-api-key", project_id="your-project-id")
trial = client.create_trial(model, vpop=vpop, protocol=protocol_design, name="Test Trial")
trial.run()
Other things to know
- Python ≥3.12 is now required.
If upgrading fails on an older interpreter, this is usually why. pandasis optional now, not bundled.
.to_dataframe()and thecreate_*_from_dataframehelpers need it installed separately — addpandasto your environment if you use them.- Errors are typed exceptions, not
requests.exceptions.HTTPError.
CatchAuthenticationError,NotFoundError,ValidationError, etc. fromjinkoinstead.
Where to go next
The Tutorials already use the new SDK end to end (authentication, search, modeling, virtual populations, protocols, trials, and analysis) — the easiest way to migrate a given piece of code is usually to find the matching tutorial and adapt its example.
If you're doing something a tutorial doesn't cover, client.raw_request(...) remains available as a fallback.