Skip to main content

glow-sdk

A typed Python SDK for the Glow loyalty API, published on PyPI under the MIT license. Import package: glow_sdk.

Every release goes through a pipeline that proves the path from commit to trusted artifact: version, commit SHA, pipeline, package checksums, SBOM and an evidence pack. There is no container image and no deployment: the artifacts are a wheel and an sdist.

The rules: no real member data in tests or CI (synthetic data only), standard tools and standard Python packaging, least privilege for every token (PyPI uploads use Trusted Publishing, so no PyPI token exists).

pipeline status coverage report

Install and use

pip install glow-sdk        # Python 3.12 or newer
from glow_sdk import SDK

sdk = SDK("https://api.example.com/", api_key="<key>", api_secret="<secret>")

for member in sdk.list_members(search="jane"):
    print(member.id, member.email, member.point_balance)

member = sdk.get_member(email="jane@example.com")  # or member_id=, platform_id=
sdk.update_member_points(point_balance=100, member=member)
sdk.delete_member(member_id=42)
  • list_members(ordering="desc", search=None) follows the pagination of the API and returns a list of Member models.
  • get_member, delete_member and update_member_points take a Member or an ID. A missing argument raises ValueError.
  • Rate limited requests (HTTP 429) are retried with exponential backoff and the Retry-After header is honoured. A connection error or an authentication error (HTTP 403) raises ValueError; other HTTP errors raise requests.exceptions.HTTPError.
  • The package is typed (py.typed). glow_sdk.__version__ is the installed version. Details: docs/architecture.md.

Quickstart

You need uv and Docker (for make mdlint and make reuse only). Python 3.13 is pinned in .python-version; the package supports 3.12 and newer.

uv sync --locked
make check              # all local checks, see below
make build              # wheel and sdist in dist/

make check runs these, in order:

Target or command What it checks
Ruff check and format check Lint (including complexity, C90, and the bandit S rules) and formatting
mypy --strict src tests tools ci Types
deptry . Declared dependencies match the imports (DEP001-DEP004)
pytest Tests, coverage at least 90 % (lines and branches)
uv lock --check uv.lock matches pyproject.toml
make deadcode Dead code (Vulture)
make mdlint Markdown style (markdownlint-cli2 Docker image, needs Docker)
make spell Spelling (codespell)
make reuse SPDX copyright and license header on every file (REUSE Docker image; not inside a git worktree)
make docs The Sphinx site builds with no warnings

More targets:

  • make fmt fixes formatting and auto-fixable lint issues in place.
  • make pre-commit runs all pre-commit hooks on every file.
  • make docs builds the documentation site into docs/_build/html (open index.html). Warnings fail the build.

Rules for new files and the reasons behind each check: docs/development.md.

Versioning and releases

  • Dev builds (MR and main pipelines): PEP 440 version X.Y.Z.dev<pipeline IID>. Main builds are published to the project's GitLab package registry (members only).
  • Releases: X.Y.Z, published to PyPI. Git tags have no v prefix. A + is never used.
  • X.Y.Z comes from Conventional Commits, computed by Commitizen (cz bump --get-next).
  • On every green main pipeline the release job runs cz bump. feat gives a minor release, fix, refactor and perf give a patch release, and ! or BREAKING CHANGE gives a major one (a minor one while the version is 0.x, because major_version_zero = true). chore, docs, test, ci, build and style do not release. It pushes a bump: commit and the tag X.Y.Z. The tag pipeline builds, scans and publishes that version to PyPI (Trusted Publishing) and creates the GitLab release.
  • The version is injected at build time (uv version --frozen, never committed). The wheel and sdist contain only the package, README, license and metadata; the pipeline fails otherwise.

Details: docs/versioning.md and ADR-0004 and ADR-0005.

Release evidence: every release gets an evidence pack (with a SHA-256) (change control, tests, code quality, security, supply chain, pipeline compliance). The latest one is on the Pages front page https://<pages-url>/ (members only). Every release's pack is kept in the package registry and linked from its release. See docs/evidence.md.

On every merge request, the mr-summary job posts one comment with the status of all checks and the commands to fix what failed. It updates itself on each pipeline.

Documentation

Published site (with the API reference): https://<pages-url>/. Replace the placeholder with the Pages URL of the project (setup manual, 3.9). The site is for project members only, and it shows the latest release. Build it locally with make docs.

Document Content
docs/architecture.md The library, its layers, error handling, packaging and supported Pythons
docs/pipeline.md Every stage and job, the release flow, schedules
docs/evidence.md The release evidence pack: contents, how it is judged, verify and export it
docs/versioning.md Version scheme per artifact, and how to trace a package to a commit
docs/development.md Daily workflow, commits, dependencies, review, code quality rules
docs/security.md Supply-chain measures, verifying packages, secret handling
docs/setup-manual.md Everything a maintainer configures in GitLab and external services
docs/adr/README.md Architecture decision records
CLAUDE.md Conventions for the agents that work on this repo

Metadata

Release files for glow-sdk 0.7.1

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

Source distribution (sdist)

Source distribution for glow-sdk 0.7.1
File Size Uploaded Provenance Actions
glow_sdk-0.7.1.tar.gz 9.3 kB Without provenance Details for glow_sdk-0.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for glow-sdk 0.7.1
File Interpreter ABI Platform Actions
glow_sdk-0.7.1-py3-none-any.whl Python 3 none any Details for glow_sdk-0.7.1-py3-none-any.whl

Total release size: 17.5 kB

Release files / glow_sdk-0.7.1.tar.gz

Download URL glow_sdk-0.7.1.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
71bb6958def4b17ab162c0369fb83ca5d63cc711b3cbdd0eefb9fd7081789c26
BLAKE2b-256 checksum
How to use checksums
d5a1e147e7d45b36eb78e356dac5f225098137753bb9e693ef18b1e97ac6153a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / glow_sdk-0.7.1-py3-none-any.whl

Download URL glow_sdk-0.7.1-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7eb5b63224993defa0864a24d51aae63149798876f17104259d90268d809f723
BLAKE2b-256 checksum
How to use checksums
86072ead4061cb8d54eef90dd5bbd935d91f504b9031a319b3dc81c2c8ba4754
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for glow-sdk 0.7.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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