Skip to main content

ship-il-sdk

PyPI version Python versions License CI

Independent/community Python SDK for the SHIP Israel API.

This is not an official SHIP SDK. It is an independent/community project.

PyPI: https://pypi.org/project/ship-il-sdk/

Documentation

The OpenAPI file documents the vendor HTTP endpoints, not the Python SDK itself. It is included as a reference for API tooling, contract review, mock servers, or future code generation. The SDK does not load it at runtime.

Installation

From PyPI:

python -m pip install ship-il-sdk

From this repository:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install .

If you only want to run from a checkout without installing:

PYTHONPATH=src python -m pytest -q

Development

Install the SDK and dev tooling inside a virtual environment:

make install

Available commands:

make format
make lint
make typecheck
make test
make check
make integration-test
make package
make release

make package builds the source distribution and wheel into dist/. make release increments the latest vX.Y.Z tag by one patch version, updates pyproject.toml, runs verification, commits the version bump, creates an annotated tag, pushes the branch, and pushes the tag. make check runs lint, typecheck, and tests. make integration-test runs the real API integration script.

CI/CD

GitHub Actions workflows live in .github/workflows/.

  • ci.yml runs on pull requests to main and manual dispatch. It installs the package with dev tooling, then runs lint, typecheck, and tests across Python 3.9 through 3.13, and builds the package once on Python 3.13.
  • release.yml runs only on tags matching v*. It runs the same checks, builds dist/, uploads the distribution files as a workflow artifact, creates a GitHub Release, and publishes to PyPI through Trusted Publishing.
  • PyPI publishing does not use a stored API token. Configure a pending trusted publisher in PyPI with these values:
    • PyPI project name: ship-il-sdk
    • Owner: yair-ros
    • Repository name: ship-il-sdk
    • Workflow name: release.yml
    • Environment name: pypi

To create a GitHub Release and trigger PyPI publishing:

make release

If your virtual environment is not activated, pass the interpreter explicitly:

make release PYTHON=.venv/bin/python

Usage

from ship_il_sdk import (
    Environment,
    ShipClient,
    build_consignee_address,
    build_pickup_shipment_request_from_point,
    build_shipment_preparation,
)

client = ShipClient(
    username="YOUR_USERNAME",
    password="YOUR_PASSWORD",
    customer_id="YOUR_CUSTOMER_ID",
    environment=Environment.DEV,
)

points = client.points.get_closest_points(
    city="Tel Aviv",
    street="Herzl",
    house_number="10",
)

consignee = build_consignee_address(
    city_name="Tel Aviv",
    street_name="Herzl",
    house_number="10",
    contact_person="Dana Cohen",
    customer_name="Dana Cohen",
    phone1="0501234567",
)

preparation = build_shipment_preparation(
    consignee_address=consignee,
    number_of_packages=1,
    reference1="ORDER-123",
)

shipment = build_pickup_shipment_request_from_point(
    preparation=preparation,
    pickup_point=points.Points[0],
)

response = client.shipments.insert_pickup_shipment(shipment)
print(response.Result.TrackingNumber)

Additional shipment operations currently exposed by the SDK:

  • insert_standard_shipment(...)
  • insert_pickup_shipment(...)
  • insert_pickup_drop_shipment(...)
  • insert_picking_list(...)
  • print_wb_order_details(...)
  • get_wb_status(...)
  • get_pricing(...)

Booking operations currently exposed by the SDK:

  • get_pickup_dates(...)
  • get_pickup_times(...)
  • insert_domestic_booking(...)
  • insert_export_booking(...)
  • cancel_booking(...)

The repository no longer keeps standalone example scripts under examples/. Use scripts/integration_test.py for real DEV verification and docs/usage.md for copy-paste SDK usage patterns.

Supported Workflow

The SDK supports a generic flow that does not depend on any specific commerce platform:

  1. authenticate
  2. find closest pickup points
  3. build a shipment draft
  4. manually or heuristically choose a pickup point
  5. create the shipment
  6. download the label

For conservative automatic recommendation, use recommend_pickup_point(...). If it returns None, require manual pickup selection.

Official API References

The SDK implementation should be reviewed against the official SHIP docs:

Error Handling

from ship_il_sdk import Environment, ShipClient
from ship_il_sdk.exceptions import AuthenticationError, ShipAPIError

client = ShipClient(
    username="YOUR_USERNAME",
    password="YOUR_PASSWORD",
    customer_id="YOUR_CUSTOMER_ID",
    environment=Environment.DEV,
)

try:
    client.login()
except AuthenticationError as exc:
    print(f"Authentication failed: {exc}")

try:
    points = client.points.get_closest_points(
        city="Tel Aviv",
        street="Herzl",
        house_number="10",
    )
except ShipAPIError as exc:
    print(f"API error: {exc}")

Metadata

Release files for ship-il-sdk 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ship-il-sdk 0.2.4
File Size Uploaded Provenance Actions
ship_il_sdk-0.2.4.tar.gz 21.1 kB With provenance Details for ship_il_sdk-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ship-il-sdk 0.2.4
File Interpreter ABI Platform Actions
ship_il_sdk-0.2.4-py3-none-any.whl Python 3 none any Details for ship_il_sdk-0.2.4-py3-none-any.whl

Total release size: 39.6 kB

Release files / ship_il_sdk-0.2.4.tar.gz

Download URL ship_il_sdk-0.2.4.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5e1961a3ebc5c4699576de42d3d2adb6072b6a3dd217de6742b56baf7a1116c0
BLAKE2b-256 checksum
How to use checksums
5b02de50518e391703d14e8fad6a2729750157d6637b6fa652ba8f929765398a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / ship_il_sdk-0.2.4-py3-none-any.whl

Download URL ship_il_sdk-0.2.4-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0e184ec4876a0aff6f2da189f48d5eae7910585d84d2b5c2cc6f86127e45a3e
BLAKE2b-256 checksum
How to use checksums
f073a8562bcb44529cfdd247f57d2b50317e234be2e3f814ea7af45bb366ffbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for ship-il-sdk 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ship_il_sdk-0.2.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page