- Python 3.11 or newer. The SDK uses
StrEnum,Self, structural typing patterns, and PEP 604 union syntax. - Poetry 1.6+ if you build with Poetry. Plain
pipalso works.
poetry add heleket-sdk
# or
pip install heleket-sdkThis integration directory IS a Poetry project. Install it into a venv:
cd api-integrations/python
poetry install --with devOr with plain pip in editable mode:
python3.11 -m venv .venv
source .venv/bin/activate
pip install -e .make test # 54 pytest tests
make example-invoice # End-to-end smoke test (needs .env)from heleket_sdk import (
HeleketPayment, HeleketPayout,
ClientOptions,
PaymentStatus, PayoutStatus, CourseSource,
WebhookVerifier, WebhookPayload,
HeleketError, ApiError, ValidationError, HttpError, SignatureError,
)
from heleket_sdk.types import (
CreateInvoiceRequest, Invoice,
CreatePayoutRequest, Payout,
HistoryOptions, HistoryPage,
# ...
)The examples directory expects a .env file in the project root. Start from the template:
cp .env.example .env
# Edit HELEKET_MERCHANT_ID, HELEKET_PAYMENT_KEY, HELEKET_PAYOUT_KEYFor production Django / FastAPI deployments, prefer the framework's settings module or environment variables.
- 02 — Configuration: per-request timeouts, custom transports
- 03 — Architecture: how requests flow through the SDK