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:
- Incorrect Wearable Timestamps:
Some sessions contain wearable files where the initial timestamp is incorrect (e.g., starts exactly at10:00:00, which may be a placeholder or default value). - 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
Metadata
Release files for preepiseizures-api-client 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| preepiseizures_api_client-0.1.1.tar.gz | 5.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| preepiseizures_api_client-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.9 kB
Release files / preepiseizures_api_client-0.1.1.tar.gz
| Download URL | preepiseizures_api_client-0.1.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40ccb932d939949b1092cc821075cc4d16b7285c3028e049fbbb65b0aaef922a
|
|
BLAKE2b-256 checksum How to use checksums |
996fe8258d9e6986813c8fe78f487dcbadd4819f95970c0489725d718d6e0f42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2025.
Transparency logRelease files / preepiseizures_api_client-0.1.1-py3-none-any.whl
| Download URL | preepiseizures_api_client-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86a51089331525933ec9db33fee8edb36c1f9f8deed597f111dfbf5e4ccca336
|
|
BLAKE2b-256 checksum How to use checksums |
e608e5a21a5fb0549320d09cfadb7a00c714af76ad57bc7bd60de7436d08f666
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2025.
Transparency logSecurity for preepiseizures-api-client 0.1.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for preepiseizures_api_client-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2025.
Transparency logA 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.