1
- from ..utils import is_async_available
2
1
from .actions import Actions
3
2
from .attack_protection import AttackProtection
4
3
from .blacklists import Blacklists
30
29
from .users import Users
31
30
from .users_by_email import UsersByEmail
32
31
33
- modules = {
34
- "actions" : Actions ,
35
- "attack_protection" : AttackProtection ,
36
- "blacklists" : Blacklists ,
37
- "branding" : Branding ,
38
- "client_credentials" : ClientCredentials ,
39
- "client_grants" : ClientGrants ,
40
- "clients" : Clients ,
41
- "connections" : Connections ,
42
- "custom_domains" : CustomDomains ,
43
- "device_credentials" : DeviceCredentials ,
44
- "email_templates" : EmailTemplates ,
45
- "emails" : Emails ,
46
- "grants" : Grants ,
47
- "guardian" : Guardian ,
48
- "hooks" : Hooks ,
49
- "jobs" : Jobs ,
50
- "log_streams" : LogStreams ,
51
- "logs" : Logs ,
52
- "organizations" : Organizations ,
53
- "prompts" : Prompts ,
54
- "resource_servers" : ResourceServers ,
55
- "roles" : Roles ,
56
- "rules_configs" : RulesConfigs ,
57
- "rules" : Rules ,
58
- "stats" : Stats ,
59
- "tenants" : Tenants ,
60
- "tickets" : Tickets ,
61
- "user_blocks" : UserBlocks ,
62
- "users_by_email" : UsersByEmail ,
63
- "users" : Users ,
64
- }
65
-
66
32
67
33
class Auth0 :
68
34
"""Provides easy access to all endpoint classes
@@ -79,9 +45,41 @@ class Auth0:
79
45
"""
80
46
81
47
def __init__ (self , domain , token , rest_options = None ):
82
- for name , cls in modules .items ():
83
- setattr (
84
- self ,
85
- name ,
86
- cls (domain = domain , token = token , rest_options = rest_options ),
87
- )
48
+ self .actions = Actions (domain , token , rest_options = rest_options )
49
+ self .attack_protection = AttackProtection (
50
+ domain , token , rest_options = rest_options
51
+ )
52
+ self .blacklists = Blacklists (domain , token , rest_options = rest_options )
53
+ self .branding = Branding (domain , token , rest_options = rest_options )
54
+ self .client_credentials = ClientCredentials (
55
+ domain , token , rest_options = rest_options
56
+ )
57
+ self .client_grants = ClientGrants (domain , token , rest_options = rest_options )
58
+ self .clients = Clients (domain , token , rest_options = rest_options )
59
+ self .connections = Connections (domain , token , rest_options = rest_options )
60
+ self .custom_domains = CustomDomains (domain , token , rest_options = rest_options )
61
+ self .device_credentials = DeviceCredentials (
62
+ domain , token , rest_options = rest_options
63
+ )
64
+ self .email_templates = EmailTemplates (domain , token , rest_options = rest_options )
65
+ self .emails = Emails (domain , token , rest_options = rest_options )
66
+ self .grants = Grants (domain , token , rest_options = rest_options )
67
+ self .guardian = Guardian (domain , token , rest_options = rest_options )
68
+ self .hooks = Hooks (domain , token , rest_options = rest_options )
69
+ self .jobs = Jobs (domain , token , rest_options = rest_options )
70
+ self .log_streams = LogStreams (domain , token , rest_options = rest_options )
71
+ self .logs = Logs (domain , token , rest_options = rest_options )
72
+ self .organizations = Organizations (domain , token , rest_options = rest_options )
73
+ self .prompts = Prompts (domain , token , rest_options = rest_options )
74
+ self .resource_servers = ResourceServers (
75
+ domain , token , rest_options = rest_options
76
+ )
77
+ self .roles = Roles (domain , token , rest_options = rest_options )
78
+ self .rules_configs = RulesConfigs (domain , token , rest_options = rest_options )
79
+ self .rules = Rules (domain , token , rest_options = rest_options )
80
+ self .stats = Stats (domain , token , rest_options = rest_options )
81
+ self .tenants = Tenants (domain , token , rest_options = rest_options )
82
+ self .tickets = Tickets (domain , token , rest_options = rest_options )
83
+ self .user_blocks = UserBlocks (domain , token , rest_options = rest_options )
84
+ self .users_by_email = UsersByEmail (domain , token , rest_options = rest_options )
85
+ self .users = Users (domain , token , rest_options = rest_options )
0 commit comments