Skip to main content

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 jinko becomes from 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 a JinkoClient instance and the typed objects it returns (Model, Vpop, ProtocolDesign, Trial, ...), each with properties like .sid / .url and methods like trial.run().
  • Escape hatch renamed: jinko.make_request(...) becomes client.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.
  • pandas is optional now, not bundled.
    .to_dataframe() and the create_*_from_dataframe helpers need it installed separately — add pandas to your environment if you use them.
  • Errors are typed exceptions, not requests.exceptions.HTTPError.
    Catch AuthenticationError, NotFoundError, ValidationError, etc. from jinko instead.

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.