Skip to main content

The one Obelisk client to rule them all

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Construct Additional Obelisks

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.

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.

Please never copy the repo into your own project, rather use pip install construct-addditional-obelisks.

Retry strategies

Construct Additional Obelisks 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, with numpydoc for their lovely layouts and conventions. Building is as follows:

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

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

construct_additional_obelisks-0.3.1.tar.gz (49.6 kB view details)

Uploaded Source

Built Distribution

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

construct_additional_obelisks-0.3.1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file construct_additional_obelisks-0.3.1.tar.gz.

File metadata

File hashes

Hashes for construct_additional_obelisks-0.3.1.tar.gz
Algorithm Hash digest
SHA256 8d5f4a99329ab45e001b67b0ba2f3b2fc78e7fc875f13e003001bd341c66252f
MD5 e75002007ad88508df4d7b8bd37e93c9
BLAKE2b-256 ff7ce743f7b28edbcfa890cc18e8a5b39a096d48e43c9387ae9df89e397f9426

See more details on using hashes here.

File details

Details for the file construct_additional_obelisks-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for construct_additional_obelisks-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b78d4f182069f516be2396899e6361e107284fef9668b5810b5b5638f857abe7
MD5 952ad52a9b0a057be7c9aebf1cf37ecc
BLAKE2b-256 dedd907e16a7906c82f1b46e5b4d6cbd71d9c24e401d2a5cdc3add767da5c308

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