qgendapy
Modern Python client for the QGenda REST API.
Documentation: GitHub Pages Docs
Thank you to JP Jorissen for laying the foundation for this library.
Features
- Full API coverage -- 160+ methods across 24 resource groups
- Sync + Async --
QGendaClientandAsyncQGendaClientwith identical APIs - Resource-namespaced --
client.schedule.list(),client.staff.get(key),client.credentialing.workflows() - Typed models -- Dataclass responses with automatic PascalCase-to-snake_case mapping
- OData builder --
OData().select("Name").filter("IsActive eq true") - 3-tier config -- Explicit args > environment variables > INI file
- Drop-in compat -- Migration module for legacy
python-qgendausers
Installation
pip install qgendapy
Quick Start
from qgendapy import QGendaClient, OData
client = QGendaClient(
email="you@hospital.org",
password="your-password",
company_key="your-company-key",
)
# Get this week's schedule
schedule = client.schedule.list(start_date="2024-01-15", end_date="2024-01-21")
for entry in schedule:
print(f"{entry.staff_f_name} {entry.staff_l_name}: {entry.task_name}")
# OData filtering
odata = OData().select("FirstName", "LastName").filter("IsActive eq true")
staff = client.staff.list(odata=odata)
Configuration
# Environment variables
export QGENDA_EMAIL="you@hospital.org"
export QGENDA_PASSWORD="your-password"
export QGENDA_COMPANY_KEY="your-company-key"
# Then just:
client = QGendaClient()
Legacy QGENDA_CONF_FILE INI format is also supported.
Requests time out after 30 seconds per phase by default — more generous than
httpx's own 5-second default, which leaves this API no margin on slower network
paths. Override it with QGendaClient(timeout=...), passing a float, an
httpx.Timeout for per-phase control, or None to wait indefinitely.
Related-entity loading: includes= vs OData $expand
QGenda offers two ways to ask for related entities, and they aren't interchangeable:
- OData
$expand(client.staff.list(expand="Tags")orodata=OData().expand("Tags")) targets nav properties on the OData DTO. On QGenda's production endpoints these often returnnullfor non-admin service accounts, even when the data exists. - QGenda's own
includes=query parameter is a separate, non-OData selector that returns rich nested categories. It works under non-admin scope on schedule-style endpoints — this is the preferred way to read tag/specialty data attached to schedule entries.
# Pull every Call 1 shift on a given day, with Primary Specialty,
# Sub Specialty, Staff Type, and Skill Set tags inline:
resp = client.schedule.list(
start_date="2026-05-22",
end_date="2026-05-22",
includes="StaffTags",
odata=OData().filter("TaskName eq 'Call 1'"),
)
for entry in resp:
if entry.staff_tags:
for cat in entry.staff_tags:
print(cat.category_name, [t["Name"] for t in (cat.tags or [])])
Allowed values, observed in the wild (cross-check against your QGenda deployment):
| Endpoint | Valid includes= values |
|---|---|
/schedule |
StaffTags, TaskTags, LocationTags |
/openshifts |
TaskTags, LocationTags |
/task |
Profiles, Tags, TaskShifts |
/staffmember |
Skillset, Tags, Profiles (verify per deployment) |
/dailycase |
Task, Supervisors, DirectProviders |
/patientencounter |
StandardFields, PatientInformation |
Async
from qgendapy import AsyncQGendaClient
async with AsyncQGendaClient() as client:
schedule = await client.schedule.list(start_date="2024-01-15")
Migrating from python-qgenda
# Change one import:
# from qgenda.api.client import QGendaClient
from qgendapy.compat import QGendaClient
# Everything else works the same
client = QGendaClient(username="...", password="...", company_key="...")
client.authenticate()
resp = client.get_schedule(start_date="2024-01-15")
data = resp.json()
See docs/migration.md for the full migration guide.
Resources
| Resource | Attribute | Methods |
|---|---|---|
| Schedule | client.schedule |
list, audit_log, open_shifts, rotations |
| Staff | client.staff |
list, get, create, update, tags, skillsets, profiles, pay_modifiers, ... |
| Staff Type | client.staff_type |
list |
| Task | client.task |
list, create, update, locations, tags, shifts |
| Facility | client.facility |
list, get, create, update, delete, staff, tags, tasks, ... |
| Time Event | client.time_event |
list, create, update, delete |
| Daily Case | client.daily_case |
list, create, update, delete |
| Request | client.request |
list, approved |
| Request Limit | client.request_limit |
CRUD + staff_quotas, task_shifts |
| Daily Ops | client.daily |
configurations, rooms, patient_encounters, capacity |
| Credentialing | client.credentialing |
contacts, locations, providers, privileges, records, workflows, ... |
| Notification | client.notification |
CRUD + contacts |
| User | client.user |
list, get, non_scheduled |
| + 11 more | pay, tags, profiles, company, organization, ... |
Acknowledgments
Inspired by python-qgenda by JP Jorissen.
License
MIT
Metadata
Release files for qgendapy 0.4.0
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 | Actions |
|---|---|---|---|---|
| qgendapy-0.4.0.tar.gz | 82.9 kB | With provenance | Details for qgendapy-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qgendapy-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for qgendapy-0.4.0-py3-none-any.whl |
Total release size: 125.7 kB
Release files / qgendapy-0.4.0.tar.gz
| Download URL | qgendapy-0.4.0.tar.gz |
|---|---|
| Size | 82.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c60ccdcf892fa5e1e905506c36444806e443ef95e7254edcd15b3d1fa8f7504
|
|
BLAKE2b-256 checksum How to use checksums |
192f2a8aaaa9d4e938701b5ef14f35f18c578a7562a3b02f3ce0a13803a96763
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 24, 2026.
Transparency logRelease files / qgendapy-0.4.0-py3-none-any.whl
| Download URL | qgendapy-0.4.0-py3-none-any.whl |
|---|---|
| Size | 42.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8bd7450271c6d456da4b8907f3058bfdeff59aacff34a5c79df124bdf27e0a8
|
|
BLAKE2b-256 checksum How to use checksums |
251516d55123914c1fc052dafb3c14c9b9bf80c49814be70e0e8ab58455afcf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 24, 2026.
Transparency logSecurity for qgendapy 0.4.0
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
Both files in this release have been uploaded with provenance metadata.
Attestation for qgendapy-0.4.0.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 Aug 24, 2026.
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.