checkbox_sdk.client package¶
Subpackages¶
- checkbox_sdk.client.api package
- Submodules
- checkbox_sdk.client.api.base module
- checkbox_sdk.client.api.branches module
- checkbox_sdk.client.api.cash_registers module
AsyncCashRegistersAsyncCashRegisters.ask_offline_codes()AsyncCashRegisters.get_cash_register()AsyncCashRegisters.get_cash_register_shifts()AsyncCashRegisters.get_cash_registers()AsyncCashRegisters.get_offline_codes()AsyncCashRegisters.get_offline_time()AsyncCashRegisters.go_offline()AsyncCashRegisters.go_online()AsyncCashRegisters.ping_tax_service()
CashRegisters
- checkbox_sdk.client.api.cashier module
- checkbox_sdk.client.api.currency module
- checkbox_sdk.client.api.extended_reports module
AsyncExtendedReportsAsyncExtendedReports.actual_revenue_report()AsyncExtendedReports.bookkeeper_z_report()AsyncExtendedReports.create_receipt_report()AsyncExtendedReports.create_z_report()AsyncExtendedReports.daily_cash_flow_report()AsyncExtendedReports.get_report_task_by_id()AsyncExtendedReports.goods_report()AsyncExtendedReports.net_turnover_report()AsyncExtendedReports.report_json_task_by_id()AsyncExtendedReports.report_xlsx_task_by_id()
ExtendedReportsExtendedReports.actual_revenue_report()ExtendedReports.bookkeeper_z_report()ExtendedReports.create_receipt_report()ExtendedReports.create_z_report()ExtendedReports.daily_cash_flow_report()ExtendedReports.get_report_task_by_id()ExtendedReports.goods_report()ExtendedReports.net_turnover_report()ExtendedReports.report_json_task_by_id()ExtendedReports.report_xlsx_task_by_id()
- checkbox_sdk.client.api.goods module
- checkbox_sdk.client.api.invoices module
- checkbox_sdk.client.api.nova_post module
- checkbox_sdk.client.api.orders module
- checkbox_sdk.client.api.organization module
- checkbox_sdk.client.api.prepayment_receipts module
- checkbox_sdk.client.api.receipts module
- checkbox_sdk.client.api.reports module
- checkbox_sdk.client.api.shifts module
- checkbox_sdk.client.api.tax module
- checkbox_sdk.client.api.transactions module
- checkbox_sdk.client.api.webhook module
- Module contents
Submodules¶
checkbox_sdk.client.asynchronous module¶
checkbox_sdk.client.base module¶
checkbox_sdk.client.rate_limit module¶
- class checkbox_sdk.client.rate_limit.AsyncRateLimitTransport(transport: AsyncBaseTransport, requests_per_10s: int | None = None)¶
Bases:
AsyncBaseTransportTransport wrapper to enforce rate limiting using requests per 10 seconds.
This class wraps an asynchronous HTTP transport to implement rate limiting, ensuring that no more than a specified number of requests are made within a 10-second window.
- transport¶
The underlying asynchronous HTTP transport to handle requests.
- Type:
httpx.AsyncBaseTransport
- lock¶
A lock to ensure thread-safe request handling.
- Type:
Lock
- min_interval¶
The minimum time interval between requests, calculated from the rate limit.
- Type:
float
- last_request_time¶
The timestamp of the last request, used to track elapsed time.
- Type:
float
- async handle_async_request(request)¶
Handles the asynchronous request, enforcing the rate limit by ensuring the time between requests does not exceed the specified interval.
The method calculates the elapsed time since the last request and waits if necessary to maintain the rate limit before forwarding the request to the underlying transport.
- Параметри:
request – The asynchronous HTTP request to be handled.
- Повертає:
The response returned by the underlying transport after handling the request.
- class checkbox_sdk.client.rate_limit.RateLimitTransport(transport: BaseTransport, requests_per_10s: int | None = None)¶
Bases:
BaseTransportTransport wrapper to enforce rate limiting using requests per 10 seconds.
This class wraps a synchronous HTTP transport to implement rate limiting, ensuring that no more than a specified number of requests are made within a 10-second window.
- transport¶
The underlying HTTP transport to handle requests.
- Type:
httpx.BaseTransport
- lock¶
A lock to ensure thread-safe request handling.
- Type:
Lock
- min_interval¶
The minimum time interval between requests, calculated from the rate limit.
- Type:
float
- last_request_time¶
The timestamp of the last request, used to track elapsed time.
- Type:
float
- handle_request(request)¶
Handles the request, enforcing the rate limit by ensuring the time between requests does not exceed the specified interval.
The method calculates the elapsed time since the last request and waits if necessary to maintain the rate limit before forwarding the request to the underlying transport.
- Параметри:
request – The HTTP request to be handled.
- Повертає:
The response returned by the underlying transport after handling the request.