Skip to content

Commit 7813baa

Browse files
committed
chore: prepare for PyPI release as zid-client v0.1.0
1 parent 8d3bb0e commit 7813baa

4 files changed

Lines changed: 107 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.10", "3.11", "3.12", "3.13"]
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Install dependencies
23+
run: pip install -e ".[dev]"
24+
25+
- name: Run tests
26+
run: pytest --tb=short

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
environment: pypi
11+
permissions:
12+
id-token: write # required for trusted publishing
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
20+
21+
- name: Install build tools
22+
run: pip install build
23+
24+
- name: Build package
25+
run: python -m build
26+
27+
- name: Publish to PyPI
28+
uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Changelog
2+
3+
All notable changes to `zid-client` will be documented in this file.
4+
5+
## [0.1.0] - 2026-03-03
6+
7+
### Added
8+
- Initial release of the Zid Python SDK
9+
- `ZidClient` — main entry point with support for all resources
10+
- Resources: Orders, Customers, Locations, Abandoned Carts, Reverse Orders,
11+
Delivery Options, Payment Methods, Stores, Geography, Webhooks,
12+
Coupons, Bundle Offers, Loyalty
13+
- Automatic pagination via `PaginatedIterator` — iterate across pages transparently
14+
- OAuth token auto-refresh on 401 responses
15+
- Retry logic with exponential backoff and jitter for transient errors (5xx)
16+
- Rate limit handling — auto-wait on 429 with `Retry-After` support
17+
- Full type annotations with `py.typed` marker (PEP 561)
18+
- Pydantic v2 models for all API responses
19+
- Exception hierarchy: `ZidError`, `ZidAPIError`, `ZidAuthenticationError`,
20+
`ZidAuthorizationError`, `ZidNotFoundError`, `ZidValidationError`,
21+
`ZidRateLimitError`, `ZidServerError`, `ZidConnectionError`
22+
- Context manager support (`with ZidClient(...) as client`)
23+
- Python 3.10, 3.11, 3.12, 3.13 support

pyproject.toml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,33 @@ requires = ["hatchling"]
33
build-backend = "hatchling.build"
44

55
[project]
6-
name = "zid"
6+
name = "zid-client"
77
version = "0.1.0"
8-
description = "Python SDK for the Zid e-commerce platform API"
8+
description = "Official Python SDK for the Zid e-commerce platform API"
99
readme = "README.md"
1010
requires-python = ">=3.10"
11-
license = "MIT"
11+
license = { text = "MIT" }
12+
keywords = ["zid", "ecommerce", "sdk", "api", "python", "zid.sa", "arabic-ecommerce"]
13+
authors = [
14+
{ name = "Muath Almansour", email = "muath.almansour@zid.sa" },
15+
]
16+
maintainers = [
17+
{ name = "Muath Almansour", email = "muath.almansour@zid.sa" },
18+
]
19+
classifiers = [
20+
"Development Status :: 3 - Alpha",
21+
"Intended Audience :: Developers",
22+
"License :: OSI Approved :: MIT License",
23+
"Operating System :: OS Independent",
24+
"Programming Language :: Python :: 3",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.12",
28+
"Programming Language :: Python :: 3.13",
29+
"Topic :: Internet :: WWW/HTTP",
30+
"Topic :: Software Development :: Libraries :: Python Modules",
31+
"Typing :: Typed",
32+
]
1233
dependencies = [
1334
"httpx>=0.25.0",
1435
"pydantic>=2.0.0",
@@ -20,6 +41,12 @@ dev = [
2041
"pytest-cov>=4.0.0",
2142
]
2243

44+
[project.urls]
45+
Homepage = "https://github.com/MuathZidding/sdk-python"
46+
Repository = "https://github.com/MuathZidding/sdk-python"
47+
Issues = "https://github.com/MuathZidding/sdk-python/issues"
48+
Changelog = "https://github.com/MuathZidding/sdk-python/releases"
49+
2350
[tool.hatch.build.targets.wheel]
2451
packages = ["zid"]
2552

0 commit comments

Comments
 (0)