moovio_sdk 0.9.0__py3-none-any.whl → 0.11.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- moovio_sdk/_hooks/types.py +7 -0
- moovio_sdk/_version.py +3 -3
- moovio_sdk/account_terminal_applications.py +8 -0
- moovio_sdk/accounts.py +18 -0
- moovio_sdk/adjustments.py +4 -0
- moovio_sdk/apple_pay.py +10 -0
- moovio_sdk/authentication.py +4 -0
- moovio_sdk/avatars.py +2 -0
- moovio_sdk/bank_accounts.py +18 -0
- moovio_sdk/basesdk.py +12 -20
- moovio_sdk/branding.py +8 -0
- moovio_sdk/capabilities.py +8 -0
- moovio_sdk/card_issuing.py +10 -0
- moovio_sdk/cards.py +10 -0
- moovio_sdk/disputes.py +22 -0
- moovio_sdk/end_to_end_encryption.py +4 -0
- moovio_sdk/enriched_address.py +2 -0
- moovio_sdk/enriched_profile.py +2 -0
- moovio_sdk/fee_plans.py +14 -0
- moovio_sdk/files.py +6 -0
- moovio_sdk/httpclient.py +7 -37
- moovio_sdk/industries.py +2 -0
- moovio_sdk/institutions.py +2 -0
- moovio_sdk/issuing_transactions.py +10 -0
- moovio_sdk/models/__init__.py +0 -1
- moovio_sdk/models/components/__init__.py +1804 -845
- moovio_sdk/models/components/sweep.py +7 -1
- moovio_sdk/models/components/sweepsubtotal.py +27 -0
- moovio_sdk/models/errors/__init__.py +193 -77
- moovio_sdk/models/internal/__init__.py +35 -1
- moovio_sdk/models/operations/__init__.py +1908 -1073
- moovio_sdk/onboarding.py +8 -0
- moovio_sdk/payment_links.py +12 -0
- moovio_sdk/payment_methods.py +4 -0
- moovio_sdk/ping.py +2 -0
- moovio_sdk/receipts.py +4 -0
- moovio_sdk/representatives.py +10 -0
- moovio_sdk/scheduling.py +12 -0
- moovio_sdk/sdk.py +145 -107
- moovio_sdk/sdkconfiguration.py +0 -7
- moovio_sdk/sweeps.py +12 -0
- moovio_sdk/terminal_applications.py +8 -0
- moovio_sdk/transfers.py +22 -0
- moovio_sdk/underwriting.py +4 -0
- moovio_sdk/utils/__init__.py +131 -46
- moovio_sdk/wallet_transactions.py +4 -0
- moovio_sdk/wallets.py +4 -0
- {moovio_sdk-0.9.0.dist-info → moovio_sdk-0.11.0.dist-info}/METADATA +46 -376
- {moovio_sdk-0.9.0.dist-info → moovio_sdk-0.11.0.dist-info}/RECORD +50 -49
- {moovio_sdk-0.9.0.dist-info → moovio_sdk-0.11.0.dist-info}/WHEEL +0 -0
@@ -2,10 +2,11 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
from .sweepstatus import SweepStatus
|
5
|
+
from .sweepsubtotal import SweepSubtotal, SweepSubtotalTypedDict
|
5
6
|
from datetime import datetime
|
6
7
|
from moovio_sdk.types import BaseModel
|
7
8
|
import pydantic
|
8
|
-
from typing import Optional
|
9
|
+
from typing import List, Optional
|
9
10
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
10
11
|
|
11
12
|
|
@@ -31,6 +32,8 @@ class SweepTypedDict(TypedDict):
|
|
31
32
|
r"""Amount that is transferred."""
|
32
33
|
statement_descriptor: NotRequired[str]
|
33
34
|
r"""The text that appears on the banking statement. The default descriptor is a 10 character ID if an override is not set in the sweep configs statementDescriptor."""
|
35
|
+
subtotals: NotRequired[List[SweepSubtotalTypedDict]]
|
36
|
+
r"""The subtotal of each transaction type contributing to the sweep's accrued amount."""
|
34
37
|
|
35
38
|
|
36
39
|
class Sweep(BaseModel):
|
@@ -78,3 +81,6 @@ class Sweep(BaseModel):
|
|
78
81
|
Optional[str], pydantic.Field(alias="statementDescriptor")
|
79
82
|
] = None
|
80
83
|
r"""The text that appears on the banking statement. The default descriptor is a 10 character ID if an override is not set in the sweep configs statementDescriptor."""
|
84
|
+
|
85
|
+
subtotals: Optional[List[SweepSubtotal]] = None
|
86
|
+
r"""The subtotal of each transaction type contributing to the sweep's accrued amount."""
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .amountdecimal import AmountDecimal, AmountDecimalTypedDict
|
5
|
+
from .wallettransactiontype import WalletTransactionType
|
6
|
+
from moovio_sdk.types import BaseModel
|
7
|
+
from typing_extensions import TypedDict
|
8
|
+
|
9
|
+
|
10
|
+
class SweepSubtotalTypedDict(TypedDict):
|
11
|
+
type: WalletTransactionType
|
12
|
+
r"""The type of wallet transaction the subtotal is for."""
|
13
|
+
count: int
|
14
|
+
r"""The number of transactions of this type accrued in the sweep."""
|
15
|
+
amount: AmountDecimalTypedDict
|
16
|
+
r"""The value of transactions of this type accrued in the sweep."""
|
17
|
+
|
18
|
+
|
19
|
+
class SweepSubtotal(BaseModel):
|
20
|
+
type: WalletTransactionType
|
21
|
+
r"""The type of wallet transaction the subtotal is for."""
|
22
|
+
|
23
|
+
count: int
|
24
|
+
r"""The number of transactions of this type accrued in the sweep."""
|
25
|
+
|
26
|
+
amount: AmountDecimal
|
27
|
+
r"""The value of transactions of this type accrued in the sweep."""
|
@@ -1,83 +1,95 @@
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
2
|
|
3
|
-
from
|
4
|
-
|
5
|
-
AccountTerminalApplicationErrorData,
|
6
|
-
)
|
7
|
-
from .addcapabilitieserror import AddCapabilitiesError, AddCapabilitiesErrorData
|
8
|
-
from .apierror import APIError
|
9
|
-
from .assigncountrieserror import AssignCountriesError, AssignCountriesErrorData
|
10
|
-
from .authtokenrequesterror import AuthTokenRequestError, AuthTokenRequestErrorData
|
11
|
-
from .bankaccountvalidationerror import (
|
12
|
-
BankAccountValidationError,
|
13
|
-
BankAccountValidationErrorData,
|
14
|
-
)
|
15
|
-
from .brandvalidationerror import BrandValidationError, BrandValidationErrorData
|
16
|
-
from .cardacquiringrefund import CardAcquiringRefund, CardAcquiringRefundData
|
17
|
-
from .createaccount import CreateAccountResponseBody, CreateAccountResponseBodyData
|
18
|
-
from .createpaymentlinkerror import CreatePaymentLinkError, CreatePaymentLinkErrorData
|
19
|
-
from .createsweepconfigerror import CreateSweepConfigError, CreateSweepConfigErrorData
|
20
|
-
from .feeplanagreementerror import FeePlanAgreementError, FeePlanAgreementErrorData
|
21
|
-
from .fileuploadvalidationerror import (
|
22
|
-
File,
|
23
|
-
FileTypedDict,
|
24
|
-
FileUploadValidationError,
|
25
|
-
FileUploadValidationErrorData,
|
26
|
-
)
|
27
|
-
from .filevalidationerror import FileValidationError, FileValidationErrorData
|
28
|
-
from .genericerror import GenericError, GenericErrorData
|
29
|
-
from .linkapplepayerror import LinkApplePayError, LinkApplePayErrorData
|
30
|
-
from .linkcarderror import LinkCardError, LinkCardErrorData
|
31
|
-
from .microdepositvalidationerror import (
|
32
|
-
MicroDepositValidationError,
|
33
|
-
MicroDepositValidationErrorData,
|
34
|
-
)
|
35
|
-
from .onboardinginviteerror import OnboardingInviteError, OnboardingInviteErrorData
|
36
|
-
from .patchsweepconfigerror import PatchSweepConfigError, PatchSweepConfigErrorData
|
37
|
-
from .refundvalidationerror import RefundValidationError, RefundValidationErrorData
|
38
|
-
from .representativevalidationerror import (
|
39
|
-
Error,
|
40
|
-
ErrorTypedDict,
|
41
|
-
RepresentativeValidationError,
|
42
|
-
RepresentativeValidationErrorData,
|
43
|
-
)
|
44
|
-
from .requestcarderror import RequestCardError, RequestCardErrorData
|
45
|
-
from .reversalvalidationerror import (
|
46
|
-
ReversalValidationError,
|
47
|
-
ReversalValidationErrorData,
|
48
|
-
)
|
49
|
-
from .revoketokenrequesterror import (
|
50
|
-
RevokeTokenRequestError,
|
51
|
-
RevokeTokenRequestErrorData,
|
52
|
-
)
|
53
|
-
from .schedulevalidationerror import (
|
54
|
-
ScheduleValidationError,
|
55
|
-
ScheduleValidationErrorData,
|
56
|
-
)
|
57
|
-
from .terminalapplicationerror import (
|
58
|
-
TerminalApplicationError,
|
59
|
-
TerminalApplicationErrorData,
|
60
|
-
)
|
61
|
-
from .transfer import Transfer, TransferData
|
62
|
-
from .transferoptionsvalidationerror import (
|
63
|
-
TransferOptionsValidationError,
|
64
|
-
TransferOptionsValidationErrorData,
|
65
|
-
)
|
66
|
-
from .transfervalidationerror import (
|
67
|
-
TransferValidationError,
|
68
|
-
TransferValidationErrorData,
|
69
|
-
)
|
70
|
-
from .updateaccount import UpdateAccountResponseBody, UpdateAccountResponseBodyData
|
71
|
-
from .updatecarderror import UpdateCardError, UpdateCardErrorData
|
72
|
-
from .updateissuedcarderror import UpdateIssuedCardError, UpdateIssuedCardErrorData
|
73
|
-
from .updatepaymentlinkerror import UpdatePaymentLinkError, UpdatePaymentLinkErrorData
|
74
|
-
from .updateunderwritingerror import (
|
75
|
-
UpdateUnderwritingError,
|
76
|
-
UpdateUnderwritingErrorData,
|
77
|
-
UpdateUnderwritingErrorError,
|
78
|
-
UpdateUnderwritingErrorErrorTypedDict,
|
79
|
-
)
|
3
|
+
from typing import TYPE_CHECKING
|
4
|
+
from importlib import import_module
|
80
5
|
|
6
|
+
if TYPE_CHECKING:
|
7
|
+
from .accountterminalapplicationerror import (
|
8
|
+
AccountTerminalApplicationError,
|
9
|
+
AccountTerminalApplicationErrorData,
|
10
|
+
)
|
11
|
+
from .addcapabilitieserror import AddCapabilitiesError, AddCapabilitiesErrorData
|
12
|
+
from .apierror import APIError
|
13
|
+
from .assigncountrieserror import AssignCountriesError, AssignCountriesErrorData
|
14
|
+
from .authtokenrequesterror import AuthTokenRequestError, AuthTokenRequestErrorData
|
15
|
+
from .bankaccountvalidationerror import (
|
16
|
+
BankAccountValidationError,
|
17
|
+
BankAccountValidationErrorData,
|
18
|
+
)
|
19
|
+
from .brandvalidationerror import BrandValidationError, BrandValidationErrorData
|
20
|
+
from .cardacquiringrefund import CardAcquiringRefund, CardAcquiringRefundData
|
21
|
+
from .createaccount import CreateAccountResponseBody, CreateAccountResponseBodyData
|
22
|
+
from .createpaymentlinkerror import (
|
23
|
+
CreatePaymentLinkError,
|
24
|
+
CreatePaymentLinkErrorData,
|
25
|
+
)
|
26
|
+
from .createsweepconfigerror import (
|
27
|
+
CreateSweepConfigError,
|
28
|
+
CreateSweepConfigErrorData,
|
29
|
+
)
|
30
|
+
from .feeplanagreementerror import FeePlanAgreementError, FeePlanAgreementErrorData
|
31
|
+
from .fileuploadvalidationerror import (
|
32
|
+
File,
|
33
|
+
FileTypedDict,
|
34
|
+
FileUploadValidationError,
|
35
|
+
FileUploadValidationErrorData,
|
36
|
+
)
|
37
|
+
from .filevalidationerror import FileValidationError, FileValidationErrorData
|
38
|
+
from .genericerror import GenericError, GenericErrorData
|
39
|
+
from .linkapplepayerror import LinkApplePayError, LinkApplePayErrorData
|
40
|
+
from .linkcarderror import LinkCardError, LinkCardErrorData
|
41
|
+
from .microdepositvalidationerror import (
|
42
|
+
MicroDepositValidationError,
|
43
|
+
MicroDepositValidationErrorData,
|
44
|
+
)
|
45
|
+
from .onboardinginviteerror import OnboardingInviteError, OnboardingInviteErrorData
|
46
|
+
from .patchsweepconfigerror import PatchSweepConfigError, PatchSweepConfigErrorData
|
47
|
+
from .refundvalidationerror import RefundValidationError, RefundValidationErrorData
|
48
|
+
from .representativevalidationerror import (
|
49
|
+
Error,
|
50
|
+
ErrorTypedDict,
|
51
|
+
RepresentativeValidationError,
|
52
|
+
RepresentativeValidationErrorData,
|
53
|
+
)
|
54
|
+
from .requestcarderror import RequestCardError, RequestCardErrorData
|
55
|
+
from .reversalvalidationerror import (
|
56
|
+
ReversalValidationError,
|
57
|
+
ReversalValidationErrorData,
|
58
|
+
)
|
59
|
+
from .revoketokenrequesterror import (
|
60
|
+
RevokeTokenRequestError,
|
61
|
+
RevokeTokenRequestErrorData,
|
62
|
+
)
|
63
|
+
from .schedulevalidationerror import (
|
64
|
+
ScheduleValidationError,
|
65
|
+
ScheduleValidationErrorData,
|
66
|
+
)
|
67
|
+
from .terminalapplicationerror import (
|
68
|
+
TerminalApplicationError,
|
69
|
+
TerminalApplicationErrorData,
|
70
|
+
)
|
71
|
+
from .transfer import Transfer, TransferData
|
72
|
+
from .transferoptionsvalidationerror import (
|
73
|
+
TransferOptionsValidationError,
|
74
|
+
TransferOptionsValidationErrorData,
|
75
|
+
)
|
76
|
+
from .transfervalidationerror import (
|
77
|
+
TransferValidationError,
|
78
|
+
TransferValidationErrorData,
|
79
|
+
)
|
80
|
+
from .updateaccount import UpdateAccountResponseBody, UpdateAccountResponseBodyData
|
81
|
+
from .updatecarderror import UpdateCardError, UpdateCardErrorData
|
82
|
+
from .updateissuedcarderror import UpdateIssuedCardError, UpdateIssuedCardErrorData
|
83
|
+
from .updatepaymentlinkerror import (
|
84
|
+
UpdatePaymentLinkError,
|
85
|
+
UpdatePaymentLinkErrorData,
|
86
|
+
)
|
87
|
+
from .updateunderwritingerror import (
|
88
|
+
UpdateUnderwritingError,
|
89
|
+
UpdateUnderwritingErrorData,
|
90
|
+
UpdateUnderwritingErrorError,
|
91
|
+
UpdateUnderwritingErrorErrorTypedDict,
|
92
|
+
)
|
81
93
|
|
82
94
|
__all__ = [
|
83
95
|
"APIError",
|
@@ -156,3 +168,107 @@ __all__ = [
|
|
156
168
|
"UpdateUnderwritingErrorError",
|
157
169
|
"UpdateUnderwritingErrorErrorTypedDict",
|
158
170
|
]
|
171
|
+
|
172
|
+
_dynamic_imports: dict[str, str] = {
|
173
|
+
"AccountTerminalApplicationError": ".accountterminalapplicationerror",
|
174
|
+
"AccountTerminalApplicationErrorData": ".accountterminalapplicationerror",
|
175
|
+
"AddCapabilitiesError": ".addcapabilitieserror",
|
176
|
+
"AddCapabilitiesErrorData": ".addcapabilitieserror",
|
177
|
+
"APIError": ".apierror",
|
178
|
+
"AssignCountriesError": ".assigncountrieserror",
|
179
|
+
"AssignCountriesErrorData": ".assigncountrieserror",
|
180
|
+
"AuthTokenRequestError": ".authtokenrequesterror",
|
181
|
+
"AuthTokenRequestErrorData": ".authtokenrequesterror",
|
182
|
+
"BankAccountValidationError": ".bankaccountvalidationerror",
|
183
|
+
"BankAccountValidationErrorData": ".bankaccountvalidationerror",
|
184
|
+
"BrandValidationError": ".brandvalidationerror",
|
185
|
+
"BrandValidationErrorData": ".brandvalidationerror",
|
186
|
+
"CardAcquiringRefund": ".cardacquiringrefund",
|
187
|
+
"CardAcquiringRefundData": ".cardacquiringrefund",
|
188
|
+
"CreateAccountResponseBody": ".createaccount",
|
189
|
+
"CreateAccountResponseBodyData": ".createaccount",
|
190
|
+
"CreatePaymentLinkError": ".createpaymentlinkerror",
|
191
|
+
"CreatePaymentLinkErrorData": ".createpaymentlinkerror",
|
192
|
+
"CreateSweepConfigError": ".createsweepconfigerror",
|
193
|
+
"CreateSweepConfigErrorData": ".createsweepconfigerror",
|
194
|
+
"FeePlanAgreementError": ".feeplanagreementerror",
|
195
|
+
"FeePlanAgreementErrorData": ".feeplanagreementerror",
|
196
|
+
"File": ".fileuploadvalidationerror",
|
197
|
+
"FileTypedDict": ".fileuploadvalidationerror",
|
198
|
+
"FileUploadValidationError": ".fileuploadvalidationerror",
|
199
|
+
"FileUploadValidationErrorData": ".fileuploadvalidationerror",
|
200
|
+
"FileValidationError": ".filevalidationerror",
|
201
|
+
"FileValidationErrorData": ".filevalidationerror",
|
202
|
+
"GenericError": ".genericerror",
|
203
|
+
"GenericErrorData": ".genericerror",
|
204
|
+
"LinkApplePayError": ".linkapplepayerror",
|
205
|
+
"LinkApplePayErrorData": ".linkapplepayerror",
|
206
|
+
"LinkCardError": ".linkcarderror",
|
207
|
+
"LinkCardErrorData": ".linkcarderror",
|
208
|
+
"MicroDepositValidationError": ".microdepositvalidationerror",
|
209
|
+
"MicroDepositValidationErrorData": ".microdepositvalidationerror",
|
210
|
+
"OnboardingInviteError": ".onboardinginviteerror",
|
211
|
+
"OnboardingInviteErrorData": ".onboardinginviteerror",
|
212
|
+
"PatchSweepConfigError": ".patchsweepconfigerror",
|
213
|
+
"PatchSweepConfigErrorData": ".patchsweepconfigerror",
|
214
|
+
"RefundValidationError": ".refundvalidationerror",
|
215
|
+
"RefundValidationErrorData": ".refundvalidationerror",
|
216
|
+
"Error": ".representativevalidationerror",
|
217
|
+
"ErrorTypedDict": ".representativevalidationerror",
|
218
|
+
"RepresentativeValidationError": ".representativevalidationerror",
|
219
|
+
"RepresentativeValidationErrorData": ".representativevalidationerror",
|
220
|
+
"RequestCardError": ".requestcarderror",
|
221
|
+
"RequestCardErrorData": ".requestcarderror",
|
222
|
+
"ReversalValidationError": ".reversalvalidationerror",
|
223
|
+
"ReversalValidationErrorData": ".reversalvalidationerror",
|
224
|
+
"RevokeTokenRequestError": ".revoketokenrequesterror",
|
225
|
+
"RevokeTokenRequestErrorData": ".revoketokenrequesterror",
|
226
|
+
"ScheduleValidationError": ".schedulevalidationerror",
|
227
|
+
"ScheduleValidationErrorData": ".schedulevalidationerror",
|
228
|
+
"TerminalApplicationError": ".terminalapplicationerror",
|
229
|
+
"TerminalApplicationErrorData": ".terminalapplicationerror",
|
230
|
+
"Transfer": ".transfer",
|
231
|
+
"TransferData": ".transfer",
|
232
|
+
"TransferOptionsValidationError": ".transferoptionsvalidationerror",
|
233
|
+
"TransferOptionsValidationErrorData": ".transferoptionsvalidationerror",
|
234
|
+
"TransferValidationError": ".transfervalidationerror",
|
235
|
+
"TransferValidationErrorData": ".transfervalidationerror",
|
236
|
+
"UpdateAccountResponseBody": ".updateaccount",
|
237
|
+
"UpdateAccountResponseBodyData": ".updateaccount",
|
238
|
+
"UpdateCardError": ".updatecarderror",
|
239
|
+
"UpdateCardErrorData": ".updatecarderror",
|
240
|
+
"UpdateIssuedCardError": ".updateissuedcarderror",
|
241
|
+
"UpdateIssuedCardErrorData": ".updateissuedcarderror",
|
242
|
+
"UpdatePaymentLinkError": ".updatepaymentlinkerror",
|
243
|
+
"UpdatePaymentLinkErrorData": ".updatepaymentlinkerror",
|
244
|
+
"UpdateUnderwritingError": ".updateunderwritingerror",
|
245
|
+
"UpdateUnderwritingErrorData": ".updateunderwritingerror",
|
246
|
+
"UpdateUnderwritingErrorError": ".updateunderwritingerror",
|
247
|
+
"UpdateUnderwritingErrorErrorTypedDict": ".updateunderwritingerror",
|
248
|
+
}
|
249
|
+
|
250
|
+
|
251
|
+
def __getattr__(attr_name: str) -> object:
|
252
|
+
module_name = _dynamic_imports.get(attr_name)
|
253
|
+
if module_name is None:
|
254
|
+
raise AttributeError(
|
255
|
+
f"No {attr_name} found in _dynamic_imports for module name -> {__name__} "
|
256
|
+
)
|
257
|
+
|
258
|
+
try:
|
259
|
+
module = import_module(module_name, __package__)
|
260
|
+
result = getattr(module, attr_name)
|
261
|
+
return result
|
262
|
+
except ImportError as e:
|
263
|
+
raise ImportError(
|
264
|
+
f"Failed to import {attr_name} from {module_name}: {e}"
|
265
|
+
) from e
|
266
|
+
except AttributeError as e:
|
267
|
+
raise AttributeError(
|
268
|
+
f"Failed to get {attr_name} from {module_name}: {e}"
|
269
|
+
) from e
|
270
|
+
|
271
|
+
|
272
|
+
def __dir__():
|
273
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
274
|
+
return sorted(lazy_attrs)
|
@@ -1,6 +1,40 @@
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
2
|
|
3
|
-
from
|
3
|
+
from typing import TYPE_CHECKING
|
4
|
+
from importlib import import_module
|
4
5
|
|
6
|
+
if TYPE_CHECKING:
|
7
|
+
from .globals import Globals, GlobalsTypedDict
|
5
8
|
|
6
9
|
__all__ = ["Globals", "GlobalsTypedDict"]
|
10
|
+
|
11
|
+
_dynamic_imports: dict[str, str] = {
|
12
|
+
"Globals": ".globals",
|
13
|
+
"GlobalsTypedDict": ".globals",
|
14
|
+
}
|
15
|
+
|
16
|
+
|
17
|
+
def __getattr__(attr_name: str) -> object:
|
18
|
+
module_name = _dynamic_imports.get(attr_name)
|
19
|
+
if module_name is None:
|
20
|
+
raise AttributeError(
|
21
|
+
f"No {attr_name} found in _dynamic_imports for module name -> {__name__} "
|
22
|
+
)
|
23
|
+
|
24
|
+
try:
|
25
|
+
module = import_module(module_name, __package__)
|
26
|
+
result = getattr(module, attr_name)
|
27
|
+
return result
|
28
|
+
except ImportError as e:
|
29
|
+
raise ImportError(
|
30
|
+
f"Failed to import {attr_name} from {module_name}: {e}"
|
31
|
+
) from e
|
32
|
+
except AttributeError as e:
|
33
|
+
raise AttributeError(
|
34
|
+
f"Failed to get {attr_name} from {module_name}: {e}"
|
35
|
+
) from e
|
36
|
+
|
37
|
+
|
38
|
+
def __dir__():
|
39
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
40
|
+
return sorted(lazy_attrs)
|