Skip to content

Client

qgendapy.client.QGendaClient(email=None, password=None, company_key=None, base_url=None, cache=None)

Synchronous QGenda API client.

Source code in src/qgendapy/client.py
def __init__(
    self,
    email: str | None = None,
    password: str | None = None,
    company_key: str | None = None,
    base_url: str | None = None,
    cache: CacheBackend | None = None,
) -> None:
    config = resolve_config(
        email=email, password=password, company_key=company_key, base_url=base_url
    )
    self._config = config
    self._cache = cache or NullCache()
    self._auth = Auth(email=config.email, password=config.password, base_url=config.base_url)
    self._transport = Transport(auth=self._auth, base_url=config.base_url)

    # Resources
    self.schedule = ScheduleResource(self)
    self.staff = StaffResource(self)
    self.task = TaskResource(self)
    self.facility = FacilityResource(self)
    self.organization = OrganizationResource(self)
    self.time_event = TimeEventResource(self)
    self.daily_case = DailyCaseResource(self)
    self.request = RequestResource(self)
    self.request_limit = RequestLimitResource(self)
    self.daily = DailyResource(self)
    self.company = CompanyResource(self)
    self.tag = TagResource(self)
    self.profile = ProfileResource(self)
    self.pay_code = PayCodeResource(self)
    self.pay_rate = PayRateResource(self)
    self.pay_pool = PayPoolResource(self)
    self.staff_target = StaffTargetResource(self)
    self.staff_type = StaffTypeResource(self)
    self.credit = CreditAllocationResource(self)
    self.notification = NotificationResource(self)
    self.user = UserResource(self)
    self.integration = IntegrationResource(self)
    self.support = SupportResource(self)
    self.credentialing = CredentialingResource(self)

schedule = ScheduleResource(self) instance-attribute

staff = StaffResource(self) instance-attribute

task = TaskResource(self) instance-attribute

facility = FacilityResource(self) instance-attribute

organization = OrganizationResource(self) instance-attribute

time_event = TimeEventResource(self) instance-attribute

daily_case = DailyCaseResource(self) instance-attribute

request = RequestResource(self) instance-attribute

request_limit = RequestLimitResource(self) instance-attribute

daily = DailyResource(self) instance-attribute

company = CompanyResource(self) instance-attribute

tag = TagResource(self) instance-attribute

profile = ProfileResource(self) instance-attribute

pay_code = PayCodeResource(self) instance-attribute

pay_rate = PayRateResource(self) instance-attribute

pay_pool = PayPoolResource(self) instance-attribute

staff_target = StaffTargetResource(self) instance-attribute

staff_type = StaffTypeResource(self) instance-attribute

credit = CreditAllocationResource(self) instance-attribute

notification = NotificationResource(self) instance-attribute

user = UserResource(self) instance-attribute

integration = IntegrationResource(self) instance-attribute

support = SupportResource(self) instance-attribute

credentialing = CredentialingResource(self) instance-attribute

company_key property

close()

Source code in src/qgendapy/client.py
def close(self) -> None:
    self._transport.close()

__enter__()

Source code in src/qgendapy/client.py
def __enter__(self) -> QGendaClient:
    return self

__exit__(*args)

Source code in src/qgendapy/client.py
def __exit__(self, *args: object) -> None:
    self.close()

qgendapy.client.AsyncQGendaClient(email=None, password=None, company_key=None, base_url=None, cache=None)

Asynchronous QGenda API client.

Source code in src/qgendapy/client.py
def __init__(
    self,
    email: str | None = None,
    password: str | None = None,
    company_key: str | None = None,
    base_url: str | None = None,
    cache: CacheBackend | None = None,
) -> None:
    config = resolve_config(
        email=email, password=password, company_key=company_key, base_url=base_url
    )
    self._config = config
    self._cache = cache or NullCache()
    self._auth = AsyncAuth(
        email=config.email, password=config.password, base_url=config.base_url
    )
    self._transport = AsyncTransport(auth=self._auth, base_url=config.base_url)

    # Resources
    self.schedule = AsyncScheduleResource(self)
    self.staff = AsyncStaffResource(self)
    self.task = AsyncTaskResource(self)
    self.facility = AsyncFacilityResource(self)
    self.organization = AsyncOrganizationResource(self)
    self.time_event = AsyncTimeEventResource(self)
    self.daily_case = AsyncDailyCaseResource(self)
    self.request = AsyncRequestResource(self)
    self.request_limit = AsyncRequestLimitResource(self)
    self.daily = AsyncDailyResource(self)
    self.company = AsyncCompanyResource(self)
    self.tag = AsyncTagResource(self)
    self.profile = AsyncProfileResource(self)
    self.pay_code = AsyncPayCodeResource(self)
    self.pay_rate = AsyncPayRateResource(self)
    self.pay_pool = AsyncPayPoolResource(self)
    self.staff_target = AsyncStaffTargetResource(self)
    self.staff_type = AsyncStaffTypeResource(self)
    self.credit = AsyncCreditAllocationResource(self)
    self.notification = AsyncNotificationResource(self)
    self.user = AsyncUserResource(self)
    self.integration = AsyncIntegrationResource(self)
    self.support = AsyncSupportResource(self)
    self.credentialing = AsyncCredentialingResource(self)

schedule = AsyncScheduleResource(self) instance-attribute

staff = AsyncStaffResource(self) instance-attribute

task = AsyncTaskResource(self) instance-attribute

facility = AsyncFacilityResource(self) instance-attribute

organization = AsyncOrganizationResource(self) instance-attribute

time_event = AsyncTimeEventResource(self) instance-attribute

daily_case = AsyncDailyCaseResource(self) instance-attribute

request = AsyncRequestResource(self) instance-attribute

request_limit = AsyncRequestLimitResource(self) instance-attribute

daily = AsyncDailyResource(self) instance-attribute

company = AsyncCompanyResource(self) instance-attribute

tag = AsyncTagResource(self) instance-attribute

profile = AsyncProfileResource(self) instance-attribute

pay_code = AsyncPayCodeResource(self) instance-attribute

pay_rate = AsyncPayRateResource(self) instance-attribute

pay_pool = AsyncPayPoolResource(self) instance-attribute

staff_target = AsyncStaffTargetResource(self) instance-attribute

staff_type = AsyncStaffTypeResource(self) instance-attribute

credit = AsyncCreditAllocationResource(self) instance-attribute

notification = AsyncNotificationResource(self) instance-attribute

user = AsyncUserResource(self) instance-attribute

integration = AsyncIntegrationResource(self) instance-attribute

support = AsyncSupportResource(self) instance-attribute

credentialing = AsyncCredentialingResource(self) instance-attribute

company_key property

close() async

Source code in src/qgendapy/client.py
async def close(self) -> None:
    await self._transport.close()

__aenter__() async

Source code in src/qgendapy/client.py
async def __aenter__(self) -> AsyncQGendaClient:
    return self

__aexit__(*args) async

Source code in src/qgendapy/client.py
async def __aexit__(self, *args: object) -> None:
    await self.close()