Skip to content

Commit 6610620

Browse files
committed
[auth0-python] Add async functions to AsyncAuth0
Update AsyncAuth0 type hints
1 parent 6f7c797 commit 6610620

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

stubs/auth0-python/@tests/stubtest_allowlist.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ auth0\.test.*
55
# The way these stubs are currently implemented is that we pretend all classes have async methods
66
# Even though in reality, users need to call `auth0.asyncify.asyncify` to generate async subclasses
77
auth0\..*_async
8+
auth0\.management\.async_auth0\..*
89

910
# Inconsistently implemented, ommitted
1011
auth0\.management\.Auth0\..*

stubs/auth0-python/auth0/management/async_auth0.pyi

+64
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,74 @@ from typing_extensions import Self
33

44
from auth0.rest import RestClientOptions
55

6+
from .actions import Actions
7+
from .attack_protection import AttackProtection
8+
from .blacklists import Blacklists
9+
from .branding import Branding
10+
from .client_credentials import ClientCredentials
11+
from .client_grants import ClientGrants
12+
from .clients import Clients
13+
from .connections import Connections
14+
from .custom_domains import CustomDomains
15+
from .device_credentials import DeviceCredentials
16+
from .email_templates import EmailTemplates
17+
from .emails import Emails
18+
from .grants import Grants
19+
from .guardian import Guardian
20+
from .hooks import Hooks
21+
from .jobs import Jobs
22+
from .log_streams import LogStreams
23+
from .logs import Logs
24+
from .organizations import Organizations
25+
from .prompts import Prompts
26+
from .resource_servers import ResourceServers
27+
from .roles import Roles
28+
from .rules import Rules
29+
from .rules_configs import RulesConfigs
30+
from .stats import Stats
31+
from .tenants import Tenants
32+
from .tickets import Tickets
33+
from .user_blocks import UserBlocks
34+
from .users import Users
35+
from .users_by_email import UsersByEmail
36+
637
class AsyncAuth0:
738
def __init__(self, domain: str, token: str, rest_options: RestClientOptions | None = None) -> None: ...
839
def set_session(self, session) -> None: ...
940
async def __aenter__(self) -> Self: ...
1041
async def __aexit__(
1142
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
1243
) -> None: ...
44+
45+
# Same attributes as Auth0
46+
# See note in stubs/auth0-python/@tests/stubtest_allowlist.txt about _async methods
47+
actions: Actions
48+
attack_protection: AttackProtection
49+
blacklists: Blacklists
50+
branding: Branding
51+
client_credentials: ClientCredentials
52+
client_grants: ClientGrants
53+
clients: Clients
54+
connections: Connections
55+
custom_domains: CustomDomains
56+
device_credentials: DeviceCredentials
57+
email_templates: EmailTemplates
58+
emails: Emails
59+
grants: Grants
60+
guardian: Guardian
61+
hooks: Hooks
62+
jobs: Jobs
63+
log_streams: LogStreams
64+
logs: Logs
65+
organizations: Organizations
66+
prompts: Prompts
67+
resource_servers: ResourceServers
68+
roles: Roles
69+
rules_configs: RulesConfigs
70+
rules: Rules
71+
stats: Stats
72+
tenants: Tenants
73+
tickets: Tickets
74+
user_blocks: UserBlocks
75+
users_by_email: UsersByEmail
76+
users: Users

0 commit comments

Comments
 (0)