Skip to main content

Obelisk-Python

After years of copy-pasting and modifying Obelisk client implementations all over, we've had enough of hearing "construct additional obelisks". Thus, we have decided to build the one client to rule them all.

This project is licensed according to the LICENSE file included with the source. You should have received a copy alongside the code bundle, otherwise you can get it for the most recent version here.

Usage

Take your pick of asynchronous or sync, import the relevant Producer or Consumer and go crazy. There is explicitly minimal documentation on actual filter values, read the Obelisk docs for that. Documentation for the Python API can be found here.

Please never copy the repo into your own project, rather use pip install obelisk-py.

Retry strategies

Obelisk-py provides first class support for retry behaviours. These are defined in strategies/retry.py, we provide NoRetryStrategy, ImmediateRetryStrategy, and ExponentialBackoffRetryStrategy. These do exactly what it says on the tin, when provided in the constructor of your producer, consumer or client, they will cause the client to retry requests according to the strategy whenever the response status is not in the 2XX range.

The default strategy is no retry, we do recommend setting at least some form of retry as the token validity behaviour sometimes encounters edge cases.

Async and Sync support

The library has an async and blocking edition. The async edition is contained in the module asynchronous due to async being a reserved keyword and invalid package name, synchronous can be found in sync. The sync edition is simply a wrapper around asynchronous, maintaining an own event loop.

HFS and Classic support

All constructors take an optional kind argument, set this to the appropriate variety for you.

There is no special handling for HFS userId / patientId fields as those are never directly touched by the library. The only exception is that Datapoint has explicit support for userId and allows extra fields to provide naive support for other field names.

Building and Docs

uv is used to manage this project. Tests can be run using uv run pytest, building and deployment are handled by uv build and uv publish.

Documentation uses the classic sphinx setup. Building is as follows:

# uv run sphinx-build -M html docs/source/ docs/build/

In case of major restructuring, it may be needed to clean up the contents of docs/_autosummary and potentially other rst files in docs, followed by re-running the build. Manually triggering sphinx-apidoc is unnecessary.

Hooks

We use some simple Git hooks to avoid fighting the CI too often. These are stored in the hooks/ directory, and can be enabled by setting git config core.hooksPath hooks/.

Credits

Base implementation originally by Pieter Moens Pieter.Moens@ugent.be, modified by Kyana Bosschaerts Kyana.Bosschaerts@ugent.be and finally consolidated by Stef Pletinck Stef.Pletinck@ugent.be.

Metadata

Release files for obelisk-py 2.3.2

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

Source distribution (sdist)

Source distribution for obelisk-py 2.3.2
File Size Uploaded Provenance Actions
obelisk_py-2.3.2.tar.gz 48.4 kB Without provenance Details for obelisk_py-2.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for obelisk-py 2.3.2
File Interpreter ABI Platform Actions
obelisk_py-2.3.2-py3-none-any.whl Python 3 none any Details for obelisk_py-2.3.2-py3-none-any.whl

Total release size: 71.5 kB

Release files / obelisk_py-2.3.2.tar.gz

Download URL obelisk_py-2.3.2.tar.gz
Size 48.4 kB
Tags Source
SHA-256 checksum
How to use checksums
61724849d27771cbf407189b077531ad8a01e3f680d0236c6ea8c8d4b1448911
BLAKE2b-256 checksum
How to use checksums
75f8cecc900e042eac9a3359a251a32d53f58893c57c23239062233f129cdb79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / obelisk_py-2.3.2-py3-none-any.whl

Download URL obelisk_py-2.3.2-py3-none-any.whl
Size 23.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2984e7f5debc6ed1f56db0a2aa7193097fca95eae6c2f0c4b7e230d8a9c30624
BLAKE2b-256 checksum
How to use checksums
a78778d66bc99751146ffac2b54daee6ed932d2fcb9cbec9ae59849a1deb170c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for obelisk-py 2.3.2

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