meibo 1.0.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.
meibo/__init__.py ADDED
@@ -0,0 +1,150 @@
1
+ """
2
+ meibo — school and club directories, through a key their owner hands you.
3
+
4
+ import os
5
+ from meibo import Meibo
6
+
7
+ meibo = Meibo(api_key=os.environ["MEIBO_API_KEY"], directory="maple")
8
+ settings = meibo.read_settings()
9
+ print(settings["name"], settings["scopes"])
10
+
11
+ Everything is available in an async flavour too, with the same arguments::
12
+
13
+ from meibo import AsyncMeibo
14
+
15
+ async with AsyncMeibo(api_key=key, directory="maple") as meibo:
16
+ settings = await meibo.read_settings()
17
+ """
18
+
19
+ from __future__ import annotations
20
+
21
+ from ._client import DEFAULT_BASE_URL, DEFAULT_TIMEOUT, AsyncMeibo, EntryId, Meibo
22
+ from ._version import __version__
23
+ from .errors import (
24
+ MeiboAuthError,
25
+ MeiboConfigError,
26
+ MeiboConnectionError,
27
+ MeiboDirectoryNotReachedError,
28
+ MeiboDirectoryRequiredError,
29
+ MeiboError,
30
+ MeiboForbiddenError,
31
+ MeiboFrozenError,
32
+ MeiboNotFoundError,
33
+ MeiboRateLimitError,
34
+ MeiboRequestError,
35
+ MeiboScopeError,
36
+ MeiboServerError,
37
+ MeiboSuspendedError,
38
+ error_for_status,
39
+ error_from_response,
40
+ )
41
+ from .types import (
42
+ AiReview,
43
+ Child,
44
+ ChildInput,
45
+ Entry,
46
+ EntryDeleted,
47
+ EntryDetail,
48
+ EntryInput,
49
+ EntryList,
50
+ EntryModeration,
51
+ EntryUpdate,
52
+ EntryWritten,
53
+ FamilyEntry,
54
+ FamilyEntryInput,
55
+ FamilyEntryUpdate,
56
+ Group,
57
+ GroupInput,
58
+ IndividualEntry,
59
+ IndividualEntryInput,
60
+ IndividualEntryUpdate,
61
+ InvitesSent,
62
+ Link,
63
+ LinkInput,
64
+ ModerationFields,
65
+ ModerationFlag,
66
+ ModerationList,
67
+ ModerationSummary,
68
+ Parent,
69
+ ParentInput,
70
+ Preset,
71
+ Refusal,
72
+ Scope,
73
+ Settings,
74
+ SettingsUpdate,
75
+ StaffEntry,
76
+ StaffEntryInput,
77
+ StaffEntryUpdate,
78
+ WithheldFamilyEntry,
79
+ WithheldIndividualEntry,
80
+ WithheldModerationEntry,
81
+ WithheldStaffEntry,
82
+ )
83
+
84
+ __all__ = [
85
+ "__version__",
86
+ # clients
87
+ "Meibo",
88
+ "AsyncMeibo",
89
+ "DEFAULT_BASE_URL",
90
+ "DEFAULT_TIMEOUT",
91
+ "EntryId",
92
+ # errors
93
+ "MeiboError",
94
+ "MeiboRequestError",
95
+ "MeiboDirectoryRequiredError",
96
+ "MeiboAuthError",
97
+ "MeiboForbiddenError",
98
+ "MeiboScopeError",
99
+ "MeiboSuspendedError",
100
+ "MeiboFrozenError",
101
+ "MeiboNotFoundError",
102
+ "MeiboDirectoryNotReachedError",
103
+ "MeiboRateLimitError",
104
+ "MeiboServerError",
105
+ "MeiboConnectionError",
106
+ "MeiboConfigError",
107
+ "error_for_status",
108
+ "error_from_response",
109
+ # types
110
+ "AiReview",
111
+ "Child",
112
+ "ChildInput",
113
+ "Entry",
114
+ "EntryDeleted",
115
+ "EntryDetail",
116
+ "EntryInput",
117
+ "EntryList",
118
+ "EntryModeration",
119
+ "EntryUpdate",
120
+ "EntryWritten",
121
+ "FamilyEntry",
122
+ "FamilyEntryInput",
123
+ "FamilyEntryUpdate",
124
+ "Group",
125
+ "GroupInput",
126
+ "IndividualEntry",
127
+ "IndividualEntryInput",
128
+ "IndividualEntryUpdate",
129
+ "InvitesSent",
130
+ "Link",
131
+ "LinkInput",
132
+ "ModerationFields",
133
+ "ModerationFlag",
134
+ "ModerationList",
135
+ "ModerationSummary",
136
+ "Parent",
137
+ "ParentInput",
138
+ "Preset",
139
+ "Refusal",
140
+ "Scope",
141
+ "Settings",
142
+ "SettingsUpdate",
143
+ "StaffEntry",
144
+ "StaffEntryInput",
145
+ "StaffEntryUpdate",
146
+ "WithheldFamilyEntry",
147
+ "WithheldIndividualEntry",
148
+ "WithheldModerationEntry",
149
+ "WithheldStaffEntry",
150
+ ]