Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 1.64 KB

File metadata and controls

73 lines (53 loc) · 1.64 KB

01 — Installation

Requirements

  • 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 pip also works.

From PyPI (when published)

poetry add heleket-sdk
# or
pip install heleket-sdk

From this reference folder

This integration directory IS a Poetry project. Install it into a venv:

cd api-integrations/python
poetry install --with dev

Or with plain pip in editable mode:

python3.11 -m venv .venv
source .venv/bin/activate
pip install -e .

Verifying the installation

make test          # 54 pytest tests
make example-invoice   # End-to-end smoke test (needs .env)

Public surface

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,
    # ...
)

.env configuration

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_KEY

For production Django / FastAPI deployments, prefer the framework's settings module or environment variables.

Next steps