Skip to main content

Short description.

Project description

preepiseizures-api-client

Python client for interacting with the PreEpiSeizures API.

This client simplifies access to authorized endpoints for researchers working with seizure-related data.


🚀 Installation

Install from PyPI:

pip install preepiseizures-api-client

📦 Usage

from preepiseizures_api_client.client import PreEpiSeizuresDBClient

client = PreEpiSeizuresDBClient(
    api_url="http://localhost:8000", # or your remote server URL
    username="myusername",
    password="mypassword"
)

⚠️ Data Synchronization Notice

Important: The seizure times stored in the database are aligned with hospital data and not guaranteed to be synchronized with wearable recordings.

There are two critical issues to be aware of:

  1. Incorrect Wearable Timestamps:
    Some sessions contain wearable files where the initial timestamp is incorrect (e.g., starts exactly at 10:00:00, which may be a placeholder or default value).
  2. No Guaranteed Synchronization:
    Even when the wearable data has plausible timestamps, they are not guaranteed to be aligned with hospital data for the same session.

The patient codes for which the wearable timestamps are known to be reliable are: BLIW, BSEA, GPPF, OFUF, RGNI, UDZG, YIVL.

⚠️ If you are comparing or aligning events between wearable and hospital data, you must implement a synchronization method (e.g., heart rate signal alignment).


🔐 Authentication

The client handles authentication automatically:

  • Authenticates with the provided username and password
  • Requests a bearer token from the API
  • Uses the token to authorize future requests

📂 Examples

See the examples/example_query.py file for a complete usage example.


🧾 License

Distributed under the MIT License. See LICENSE for more information.


🙋‍♀️ Author

Created by Ana Sofia Carmo
Email: anascacais@gmail.com
GitHub: @anascacais

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

preepiseizures_api_client-0.1.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

preepiseizures_api_client-0.1.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file preepiseizures_api_client-0.1.1.tar.gz.

File metadata

File hashes

Hashes for preepiseizures_api_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 40ccb932d939949b1092cc821075cc4d16b7285c3028e049fbbb65b0aaef922a
MD5 6df5b690a2683aeb7f4cc3481217ac84
BLAKE2b-256 996fe8258d9e6986813c8fe78f487dcbadd4819f95970c0489725d718d6e0f42

See more details on using hashes here.

Provenance

The following attestation bundles were made for preepiseizures_api_client-0.1.1.tar.gz:

Publisher: release.yml on anascacais/preepiseizures-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file preepiseizures_api_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for preepiseizures_api_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 86a51089331525933ec9db33fee8edb36c1f9f8deed597f111dfbf5e4ccca336
MD5 70e544594e8affca862a8c3ed0b2962f
BLAKE2b-256 e608e5a21a5fb0549320d09cfadb7a00c714af76ad57bc7bd60de7436d08f666

See more details on using hashes here.

Provenance

The following attestation bundles were made for preepiseizures_api_client-0.1.1-py3-none-any.whl:

Publisher: release.yml on anascacais/preepiseizures-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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