Skip to main content

The one Obelisk client to rule them all

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

obelisk_py-2.3.0.tar.gz (48.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

obelisk_py-2.3.0-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file obelisk_py-2.3.0.tar.gz.

File metadata

  • Download URL: obelisk_py-2.3.0.tar.gz
  • Upload date:
  • Size: 48.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for obelisk_py-2.3.0.tar.gz
Algorithm Hash digest
SHA256 c981d9b28e9a8b96a6948364a9d880df559cc8ffb5c665587cbaf0473740df1a
MD5 51ca87d89b1da97161cdba2b380a9d98
BLAKE2b-256 b8457f2e82e62208ed25cedc5ec893cb053752e7a796e14e4ae947c4b4b084d9

See more details on using hashes here.

File details

Details for the file obelisk_py-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: obelisk_py-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for obelisk_py-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c65c3c8f326c5d32377a9385551b3a5394a8fdcf92b3c5895b0da88438f66cc5
MD5 2e2092dd5e8831f1e53cad4203fdb782
BLAKE2b-256 113e131e3bb30d1618bfea3da2578abf8c896d67040ea15928e40917b575730d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page