edurra 1.0.0__tar.gz
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.
- edurra-1.0.0/LICENSE +21 -0
- edurra-1.0.0/PKG-INFO +173 -0
- edurra-1.0.0/PyPI_README.md +161 -0
- edurra-1.0.0/README.md +160 -0
- edurra-1.0.0/pyproject.toml +18 -0
- edurra-1.0.0/setup.cfg +4 -0
- edurra-1.0.0/src/edurra.egg-info/PKG-INFO +173 -0
- edurra-1.0.0/src/edurra.egg-info/SOURCES.txt +64 -0
- edurra-1.0.0/src/edurra.egg-info/dependency_links.txt +1 -0
- edurra-1.0.0/src/edurra.egg-info/requires.txt +1 -0
- edurra-1.0.0/src/edurra.egg-info/top_level.txt +1 -0
- edurra-1.0.0/src/edurra_sdk/__init__.py +5 -0
- edurra-1.0.0/src/edurra_sdk/hooks/__init__.py +1 -0
- edurra-1.0.0/src/edurra_sdk/hooks/hook.py +109 -0
- edurra-1.0.0/src/edurra_sdk/models/__init__.py +6 -0
- edurra-1.0.0/src/edurra_sdk/models/curate_bus_route_request_dto.py +33 -0
- edurra-1.0.0/src/edurra_sdk/models/get_catchment_request_dto.py +24 -0
- edurra-1.0.0/src/edurra_sdk/models/get_demographics_request_dto.py +24 -0
- edurra-1.0.0/src/edurra_sdk/models/get_schools_request_dto.py +29 -0
- edurra-1.0.0/src/edurra_sdk/models/utils/__init__.py +1 -0
- edurra-1.0.0/src/edurra_sdk/models/utils/base_model.py +337 -0
- edurra-1.0.0/src/edurra_sdk/models/utils/cast_models.py +83 -0
- edurra-1.0.0/src/edurra_sdk/models/utils/json_map.py +86 -0
- edurra-1.0.0/src/edurra_sdk/models/utils/one_of_base_model.py +136 -0
- edurra-1.0.0/src/edurra_sdk/models/utils/sentinel.py +18 -0
- edurra-1.0.0/src/edurra_sdk/net/__init__.py +1 -0
- edurra-1.0.0/src/edurra_sdk/net/environment/__init__.py +3 -0
- edurra-1.0.0/src/edurra_sdk/net/environment/environment.py +30 -0
- edurra-1.0.0/src/edurra_sdk/net/headers/__init__.py +1 -0
- edurra-1.0.0/src/edurra_sdk/net/headers/access_token_auth.py +43 -0
- edurra-1.0.0/src/edurra_sdk/net/headers/api_key_auth.py +47 -0
- edurra-1.0.0/src/edurra_sdk/net/headers/base_header.py +28 -0
- edurra-1.0.0/src/edurra_sdk/net/request_chain/__init__.py +1 -0
- edurra-1.0.0/src/edurra_sdk/net/request_chain/handlers/__init__.py +1 -0
- edurra-1.0.0/src/edurra_sdk/net/request_chain/handlers/base_handler.py +53 -0
- edurra-1.0.0/src/edurra_sdk/net/request_chain/handlers/hook_handler.py +73 -0
- edurra-1.0.0/src/edurra_sdk/net/request_chain/handlers/http_handler.py +144 -0
- edurra-1.0.0/src/edurra_sdk/net/request_chain/handlers/retry_handler.py +103 -0
- edurra-1.0.0/src/edurra_sdk/net/request_chain/request_chain.py +78 -0
- edurra-1.0.0/src/edurra_sdk/net/transport/__init__.py +1 -0
- edurra-1.0.0/src/edurra_sdk/net/transport/api_error.py +30 -0
- edurra-1.0.0/src/edurra_sdk/net/transport/request.py +117 -0
- edurra-1.0.0/src/edurra_sdk/net/transport/request_error.py +36 -0
- edurra-1.0.0/src/edurra_sdk/net/transport/response.py +125 -0
- edurra-1.0.0/src/edurra_sdk/net/transport/serializer.py +291 -0
- edurra-1.0.0/src/edurra_sdk/net/transport/utils.py +30 -0
- edurra-1.0.0/src/edurra_sdk/sdk.py +106 -0
- edurra-1.0.0/src/edurra_sdk/sdk_async.py +44 -0
- edurra-1.0.0/src/edurra_sdk/services/__init__.py +1 -0
- edurra-1.0.0/src/edurra_sdk/services/async_/__init__.py +1 -0
- edurra-1.0.0/src/edurra_sdk/services/async_/catchment_area_analysis.py +17 -0
- edurra-1.0.0/src/edurra_sdk/services/async_/demographic_insights.py +17 -0
- edurra-1.0.0/src/edurra_sdk/services/async_/health.py +14 -0
- edurra-1.0.0/src/edurra_sdk/services/async_/school_discovery.py +17 -0
- edurra-1.0.0/src/edurra_sdk/services/async_/transportation_planning.py +17 -0
- edurra-1.0.0/src/edurra_sdk/services/async_/utils/__init__.py +1 -0
- edurra-1.0.0/src/edurra_sdk/services/async_/utils/to_async.py +22 -0
- edurra-1.0.0/src/edurra_sdk/services/catchment_area_analysis.py +50 -0
- edurra-1.0.0/src/edurra_sdk/services/demographic_insights.py +52 -0
- edurra-1.0.0/src/edurra_sdk/services/health.py +38 -0
- edurra-1.0.0/src/edurra_sdk/services/school_discovery.py +50 -0
- edurra-1.0.0/src/edurra_sdk/services/transportation_planning.py +52 -0
- edurra-1.0.0/src/edurra_sdk/services/utils/__init__.py +1 -0
- edurra-1.0.0/src/edurra_sdk/services/utils/base_service.py +157 -0
- edurra-1.0.0/src/edurra_sdk/services/utils/default_headers.py +59 -0
- edurra-1.0.0/src/edurra_sdk/services/utils/validator.py +243 -0
edurra-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Maiaddy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
edurra-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: edurra
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Maiaddy Cloud Essence Edurra platform for educational planning and resource management
|
|
5
|
+
License: MIT
|
|
6
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
7
|
+
Requires-Python: >=3.9
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: requests>=2.31.0
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# EdurraSdk Python SDK 1.0.0<a id="edurrasdk-python-sdk-100"></a>
|
|
14
|
+
|
|
15
|
+
Welcome to the EdurraSdk SDK documentation. This guide will help you get started with integrating and using the EdurraSdk SDK in your project.
|
|
16
|
+
|
|
17
|
+
[](https://liblab.com/?utm_source=readme)
|
|
18
|
+
|
|
19
|
+
## Versions<a id="versions"></a>
|
|
20
|
+
|
|
21
|
+
- API version: `1.0.0`
|
|
22
|
+
- SDK version: `1.0.0`
|
|
23
|
+
|
|
24
|
+
## About the API<a id="about-the-api"></a>
|
|
25
|
+
|
|
26
|
+
Edurra API for Educational Planning and Resource Management. Powered by postcode-based intelligence and Loccode integration.
|
|
27
|
+
|
|
28
|
+
## Table of Contents<a id="table-of-contents"></a>
|
|
29
|
+
|
|
30
|
+
- [Setup & Configuration](#setup--configuration)
|
|
31
|
+
- [Supported Language Versions](#supported-language-versions)
|
|
32
|
+
- [Installation](#installation)
|
|
33
|
+
- [Authentication](#authentication)
|
|
34
|
+
- [Access Token Authentication](#access-token-authentication)
|
|
35
|
+
- [Setting a Custom Timeout](#setting-a-custom-timeout)
|
|
36
|
+
- [Sample Usage](#sample-usage)
|
|
37
|
+
- [Services](#services)
|
|
38
|
+
- [Models](#models)
|
|
39
|
+
|
|
40
|
+
# Setup & Configuration<a id="setup--configuration"></a>
|
|
41
|
+
|
|
42
|
+
## Supported Language Versions<a id="supported-language-versions"></a>
|
|
43
|
+
|
|
44
|
+
This SDK is compatible with the following versions: `Python >= 3.7`
|
|
45
|
+
|
|
46
|
+
## Installation<a id="installation"></a>
|
|
47
|
+
|
|
48
|
+
To get started with the SDK, we recommend installing using `pip`:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pip install edurra
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
If you are using Python 3, you can use `pip3` instead:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip3 install edurra
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Authentication<a id="authentication"></a>
|
|
61
|
+
|
|
62
|
+
### Access Token Authentication<a id="access-token-authentication"></a>
|
|
63
|
+
|
|
64
|
+
The EdurraSdk API uses an Access Token for authentication.
|
|
65
|
+
|
|
66
|
+
This token must be provided to authenticate your requests to the API.
|
|
67
|
+
|
|
68
|
+
#### Setting the Access Token<a id="setting-the-access-token"></a>
|
|
69
|
+
|
|
70
|
+
When you initialize the SDK, you can set the access token as follows:
|
|
71
|
+
|
|
72
|
+
```py
|
|
73
|
+
EdurraSdk(
|
|
74
|
+
access_token="YOUR_ACCESS_TOKEN",
|
|
75
|
+
api_key="YOUR_API_KEY",
|
|
76
|
+
api_key_header="YOUR_API_KEY_HEADER",
|
|
77
|
+
timeout=10000
|
|
78
|
+
)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
If you need to set or update the access token after initializing the SDK, you can use:
|
|
82
|
+
|
|
83
|
+
```py
|
|
84
|
+
sdk.set_access_token("YOUR_ACCESS_TOKEN")
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Setting a Custom Timeout<a id="setting-a-custom-timeout"></a>
|
|
88
|
+
|
|
89
|
+
You can set a custom timeout for the SDK's HTTP requests as follows:
|
|
90
|
+
|
|
91
|
+
```py
|
|
92
|
+
from edurra_sdk import EdurraSdk
|
|
93
|
+
|
|
94
|
+
sdk = EdurraSdk(timeout=10000)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
# Sample Usage<a id="sample-usage"></a>
|
|
98
|
+
|
|
99
|
+
Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:
|
|
100
|
+
|
|
101
|
+
```py
|
|
102
|
+
from edurra_sdk import EdurraSdk
|
|
103
|
+
|
|
104
|
+
sdk = EdurraSdk(
|
|
105
|
+
access_token="YOUR_ACCESS_TOKEN",
|
|
106
|
+
api_key="YOUR_API_KEY",
|
|
107
|
+
api_key_header="YOUR_API_KEY_HEADER",
|
|
108
|
+
timeout=10000
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
result = sdk.health.health_check()
|
|
112
|
+
|
|
113
|
+
print(result)
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
# Async Usage<a id="async-usage"></a>
|
|
118
|
+
|
|
119
|
+
The SDK includes an Async Client for making asynchronous API requests. This is useful for applications that need non-blocking operations, like web servers or apps with a graphical user interface.
|
|
120
|
+
|
|
121
|
+
```py
|
|
122
|
+
import asyncio
|
|
123
|
+
from edurra_sdk import EdurraSdkAsync
|
|
124
|
+
|
|
125
|
+
sdk = EdurraSdkAsync(
|
|
126
|
+
access_token="YOUR_ACCESS_TOKEN",
|
|
127
|
+
api_key="YOUR_API_KEY",
|
|
128
|
+
api_key_header="YOUR_API_KEY_HEADER",
|
|
129
|
+
timeout=10000
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
async def main():
|
|
134
|
+
result = await sdk.health.health_check()
|
|
135
|
+
print(result)
|
|
136
|
+
|
|
137
|
+
asyncio.run(main())
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Services<a id="services"></a>
|
|
141
|
+
|
|
142
|
+
The SDK provides various services to interact with the API.
|
|
143
|
+
|
|
144
|
+
<details>
|
|
145
|
+
<summary>Below is a list of all available services:</summary>
|
|
146
|
+
|
|
147
|
+
| Name |
|
|
148
|
+
| :---------------------- |
|
|
149
|
+
| school_discovery |
|
|
150
|
+
| demographic_insights |
|
|
151
|
+
| catchment_area_analysis |
|
|
152
|
+
| transportation_planning |
|
|
153
|
+
| health |
|
|
154
|
+
|
|
155
|
+
</details>
|
|
156
|
+
|
|
157
|
+
## Models<a id="models"></a>
|
|
158
|
+
|
|
159
|
+
The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.
|
|
160
|
+
|
|
161
|
+
<details>
|
|
162
|
+
<summary>Below is a list of all available models:</summary>
|
|
163
|
+
|
|
164
|
+
| Name | Description |
|
|
165
|
+
| :------------------------ | :---------- |
|
|
166
|
+
| GetSchoolsRequestDto | |
|
|
167
|
+
| GetDemographicsRequestDto | |
|
|
168
|
+
| GetCatchmentRequestDto | |
|
|
169
|
+
| CurateBusRouteRequestDto | |
|
|
170
|
+
|
|
171
|
+
</details>
|
|
172
|
+
|
|
173
|
+
<!-- This file was generated by liblab | https://liblab.com/ -->
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# EdurraSdk Python SDK 1.0.0<a id="edurrasdk-python-sdk-100"></a>
|
|
2
|
+
|
|
3
|
+
Welcome to the EdurraSdk SDK documentation. This guide will help you get started with integrating and using the EdurraSdk SDK in your project.
|
|
4
|
+
|
|
5
|
+
[](https://liblab.com/?utm_source=readme)
|
|
6
|
+
|
|
7
|
+
## Versions<a id="versions"></a>
|
|
8
|
+
|
|
9
|
+
- API version: `1.0.0`
|
|
10
|
+
- SDK version: `1.0.0`
|
|
11
|
+
|
|
12
|
+
## About the API<a id="about-the-api"></a>
|
|
13
|
+
|
|
14
|
+
Edurra API for Educational Planning and Resource Management. Powered by postcode-based intelligence and Loccode integration.
|
|
15
|
+
|
|
16
|
+
## Table of Contents<a id="table-of-contents"></a>
|
|
17
|
+
|
|
18
|
+
- [Setup & Configuration](#setup--configuration)
|
|
19
|
+
- [Supported Language Versions](#supported-language-versions)
|
|
20
|
+
- [Installation](#installation)
|
|
21
|
+
- [Authentication](#authentication)
|
|
22
|
+
- [Access Token Authentication](#access-token-authentication)
|
|
23
|
+
- [Setting a Custom Timeout](#setting-a-custom-timeout)
|
|
24
|
+
- [Sample Usage](#sample-usage)
|
|
25
|
+
- [Services](#services)
|
|
26
|
+
- [Models](#models)
|
|
27
|
+
|
|
28
|
+
# Setup & Configuration<a id="setup--configuration"></a>
|
|
29
|
+
|
|
30
|
+
## Supported Language Versions<a id="supported-language-versions"></a>
|
|
31
|
+
|
|
32
|
+
This SDK is compatible with the following versions: `Python >= 3.7`
|
|
33
|
+
|
|
34
|
+
## Installation<a id="installation"></a>
|
|
35
|
+
|
|
36
|
+
To get started with the SDK, we recommend installing using `pip`:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install edurra
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If you are using Python 3, you can use `pip3` instead:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip3 install edurra
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Authentication<a id="authentication"></a>
|
|
49
|
+
|
|
50
|
+
### Access Token Authentication<a id="access-token-authentication"></a>
|
|
51
|
+
|
|
52
|
+
The EdurraSdk API uses an Access Token for authentication.
|
|
53
|
+
|
|
54
|
+
This token must be provided to authenticate your requests to the API.
|
|
55
|
+
|
|
56
|
+
#### Setting the Access Token<a id="setting-the-access-token"></a>
|
|
57
|
+
|
|
58
|
+
When you initialize the SDK, you can set the access token as follows:
|
|
59
|
+
|
|
60
|
+
```py
|
|
61
|
+
EdurraSdk(
|
|
62
|
+
access_token="YOUR_ACCESS_TOKEN",
|
|
63
|
+
api_key="YOUR_API_KEY",
|
|
64
|
+
api_key_header="YOUR_API_KEY_HEADER",
|
|
65
|
+
timeout=10000
|
|
66
|
+
)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
If you need to set or update the access token after initializing the SDK, you can use:
|
|
70
|
+
|
|
71
|
+
```py
|
|
72
|
+
sdk.set_access_token("YOUR_ACCESS_TOKEN")
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Setting a Custom Timeout<a id="setting-a-custom-timeout"></a>
|
|
76
|
+
|
|
77
|
+
You can set a custom timeout for the SDK's HTTP requests as follows:
|
|
78
|
+
|
|
79
|
+
```py
|
|
80
|
+
from edurra_sdk import EdurraSdk
|
|
81
|
+
|
|
82
|
+
sdk = EdurraSdk(timeout=10000)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
# Sample Usage<a id="sample-usage"></a>
|
|
86
|
+
|
|
87
|
+
Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:
|
|
88
|
+
|
|
89
|
+
```py
|
|
90
|
+
from edurra_sdk import EdurraSdk
|
|
91
|
+
|
|
92
|
+
sdk = EdurraSdk(
|
|
93
|
+
access_token="YOUR_ACCESS_TOKEN",
|
|
94
|
+
api_key="YOUR_API_KEY",
|
|
95
|
+
api_key_header="YOUR_API_KEY_HEADER",
|
|
96
|
+
timeout=10000
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
result = sdk.health.health_check()
|
|
100
|
+
|
|
101
|
+
print(result)
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
# Async Usage<a id="async-usage"></a>
|
|
106
|
+
|
|
107
|
+
The SDK includes an Async Client for making asynchronous API requests. This is useful for applications that need non-blocking operations, like web servers or apps with a graphical user interface.
|
|
108
|
+
|
|
109
|
+
```py
|
|
110
|
+
import asyncio
|
|
111
|
+
from edurra_sdk import EdurraSdkAsync
|
|
112
|
+
|
|
113
|
+
sdk = EdurraSdkAsync(
|
|
114
|
+
access_token="YOUR_ACCESS_TOKEN",
|
|
115
|
+
api_key="YOUR_API_KEY",
|
|
116
|
+
api_key_header="YOUR_API_KEY_HEADER",
|
|
117
|
+
timeout=10000
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
async def main():
|
|
122
|
+
result = await sdk.health.health_check()
|
|
123
|
+
print(result)
|
|
124
|
+
|
|
125
|
+
asyncio.run(main())
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Services<a id="services"></a>
|
|
129
|
+
|
|
130
|
+
The SDK provides various services to interact with the API.
|
|
131
|
+
|
|
132
|
+
<details>
|
|
133
|
+
<summary>Below is a list of all available services:</summary>
|
|
134
|
+
|
|
135
|
+
| Name |
|
|
136
|
+
| :---------------------- |
|
|
137
|
+
| school_discovery |
|
|
138
|
+
| demographic_insights |
|
|
139
|
+
| catchment_area_analysis |
|
|
140
|
+
| transportation_planning |
|
|
141
|
+
| health |
|
|
142
|
+
|
|
143
|
+
</details>
|
|
144
|
+
|
|
145
|
+
## Models<a id="models"></a>
|
|
146
|
+
|
|
147
|
+
The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.
|
|
148
|
+
|
|
149
|
+
<details>
|
|
150
|
+
<summary>Below is a list of all available models:</summary>
|
|
151
|
+
|
|
152
|
+
| Name | Description |
|
|
153
|
+
| :------------------------ | :---------- |
|
|
154
|
+
| GetSchoolsRequestDto | |
|
|
155
|
+
| GetDemographicsRequestDto | |
|
|
156
|
+
| GetCatchmentRequestDto | |
|
|
157
|
+
| CurateBusRouteRequestDto | |
|
|
158
|
+
|
|
159
|
+
</details>
|
|
160
|
+
|
|
161
|
+
<!-- This file was generated by liblab | https://liblab.com/ -->
|
edurra-1.0.0/README.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Edurra Python SDK 1.0.0
|
|
2
|
+
|
|
3
|
+
Welcome to the Edurra SDK documentation. This guide will help you get started with integrating and using the Edurra SDK in your project.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Versions
|
|
7
|
+
|
|
8
|
+
- API version: `1.0.0`
|
|
9
|
+
- SDK version: `1.0.0`
|
|
10
|
+
|
|
11
|
+
## About the API
|
|
12
|
+
|
|
13
|
+
Edurra API for Educational Planning and Resource Management. Powered by postcode-based intelligence and Loccode integration.
|
|
14
|
+
|
|
15
|
+
## Table of Contents
|
|
16
|
+
|
|
17
|
+
- [Setup & Configuration](#setup--configuration)
|
|
18
|
+
- [Supported Language Versions](#supported-language-versions)
|
|
19
|
+
- [Installation](#installation)
|
|
20
|
+
- [Authentication](#authentication)
|
|
21
|
+
- [Access Token Authentication](#access-token-authentication)
|
|
22
|
+
- [Setting a Custom Timeout](#setting-a-custom-timeout)
|
|
23
|
+
- [Sample Usage](#sample-usage)
|
|
24
|
+
- [Async Usage](#async-usage)
|
|
25
|
+
- [Services](#services)
|
|
26
|
+
- [Models](#models)
|
|
27
|
+
|
|
28
|
+
# Setup & Configuration
|
|
29
|
+
|
|
30
|
+
## Supported Language Versions
|
|
31
|
+
|
|
32
|
+
This SDK is compatible with the following versions: `Python >= 3.7`
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
To get started with the SDK, we recommend installing using `pip`:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install edurra
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If you are using Python 3, you can use `pip3` instead:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip3 install edurra
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Authentication
|
|
49
|
+
|
|
50
|
+
### Access Token Authentication
|
|
51
|
+
|
|
52
|
+
The EdurraSdk API uses an Access Token for authentication.
|
|
53
|
+
|
|
54
|
+
This token must be provided to authenticate your requests to the API.
|
|
55
|
+
|
|
56
|
+
#### Setting the Access Token
|
|
57
|
+
|
|
58
|
+
When you initialize the SDK, you can set the access token as follows:
|
|
59
|
+
|
|
60
|
+
```py
|
|
61
|
+
EdurraSdk(
|
|
62
|
+
access_token="YOUR_ACCESS_TOKEN",
|
|
63
|
+
api_key="YOUR_API_KEY",
|
|
64
|
+
api_key_header="YOUR_API_KEY_HEADER",
|
|
65
|
+
timeout=10000
|
|
66
|
+
)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
If you need to set or update the access token after initializing the SDK, you can use:
|
|
70
|
+
|
|
71
|
+
```py
|
|
72
|
+
sdk.set_access_token("YOUR_ACCESS_TOKEN")
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Setting a Custom Timeout
|
|
76
|
+
|
|
77
|
+
You can set a custom timeout for the SDK's HTTP requests as follows:
|
|
78
|
+
|
|
79
|
+
```py
|
|
80
|
+
from edurra_sdk import EdurraSdk
|
|
81
|
+
|
|
82
|
+
sdk = EdurraSdk(timeout=10000)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
# Sample Usage
|
|
86
|
+
|
|
87
|
+
Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:
|
|
88
|
+
|
|
89
|
+
```py
|
|
90
|
+
from edurra_sdk import EdurraSdk
|
|
91
|
+
|
|
92
|
+
sdk = EdurraSdk(
|
|
93
|
+
access_token="YOUR_ACCESS_TOKEN",
|
|
94
|
+
api_key="YOUR_API_KEY",
|
|
95
|
+
api_key_header="YOUR_API_KEY_HEADER",
|
|
96
|
+
timeout=10000
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
result = sdk.health.health_check()
|
|
100
|
+
|
|
101
|
+
print(result)
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
# Async Usage
|
|
106
|
+
|
|
107
|
+
The SDK includes an Async Client for making asynchronous API requests. This is useful for applications that need non-blocking operations, like web servers or apps with a graphical user interface.
|
|
108
|
+
|
|
109
|
+
```py
|
|
110
|
+
import asyncio
|
|
111
|
+
from edurra_sdk import EdurraSdkAsync
|
|
112
|
+
|
|
113
|
+
sdk = EdurraSdkAsync(
|
|
114
|
+
access_token="YOUR_ACCESS_TOKEN",
|
|
115
|
+
api_key="YOUR_API_KEY",
|
|
116
|
+
api_key_header="YOUR_API_KEY_HEADER",
|
|
117
|
+
timeout=10000
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
async def main():
|
|
122
|
+
result = await sdk.health.health_check()
|
|
123
|
+
print(result)
|
|
124
|
+
|
|
125
|
+
asyncio.run(main())
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Services
|
|
129
|
+
|
|
130
|
+
The SDK provides various services to interact with the API.
|
|
131
|
+
|
|
132
|
+
<details>
|
|
133
|
+
<summary>Below is a list of all available services with links to their detailed documentation:</summary>
|
|
134
|
+
|
|
135
|
+
| Name |
|
|
136
|
+
| :--------------------------------------------------------------------------------------- |
|
|
137
|
+
| [SchoolDiscoveryService](documentation/services/SchoolDiscoveryService.md) |
|
|
138
|
+
| [DemographicInsightsService](documentation/services/DemographicInsightsService.md) |
|
|
139
|
+
| [CatchmentAreaAnalysisService](documentation/services/CatchmentAreaAnalysisService.md) |
|
|
140
|
+
| [TransportationPlanningService](documentation/services/TransportationPlanningService.md) |
|
|
141
|
+
| [HealthService](documentation/services/HealthService.md) |
|
|
142
|
+
|
|
143
|
+
</details>
|
|
144
|
+
|
|
145
|
+
## Models
|
|
146
|
+
|
|
147
|
+
The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.
|
|
148
|
+
|
|
149
|
+
<details>
|
|
150
|
+
<summary>Below is a list of all available models with links to their detailed documentation:</summary>
|
|
151
|
+
|
|
152
|
+
| Name | Description |
|
|
153
|
+
| :----------------------------------------------------------------------------- | :---------- |
|
|
154
|
+
| [GetSchoolsRequestDto](documentation/models/GetSchoolsRequestDto.md) | |
|
|
155
|
+
| [GetDemographicsRequestDto](documentation/models/GetDemographicsRequestDto.md) | |
|
|
156
|
+
| [GetCatchmentRequestDto](documentation/models/GetCatchmentRequestDto.md) | |
|
|
157
|
+
| [CurateBusRouteRequestDto](documentation/models/CurateBusRouteRequestDto.md) | |
|
|
158
|
+
|
|
159
|
+
</details>
|
|
160
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
[build-system]
|
|
3
|
+
requires = ["setuptools>=61.0"]
|
|
4
|
+
build-backend = "setuptools.build_meta"
|
|
5
|
+
|
|
6
|
+
[project]
|
|
7
|
+
name = "edurra"
|
|
8
|
+
version = "1.0.0"
|
|
9
|
+
license = { text = "MIT" }
|
|
10
|
+
description = """Maiaddy Cloud Essence Edurra platform for educational planning and resource management"""
|
|
11
|
+
readme = "PyPI_README.md"
|
|
12
|
+
requires-python = ">=3.9"
|
|
13
|
+
classifiers = [
|
|
14
|
+
"License :: OSI Approved :: MIT License"
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
"requests>=2.31.0"
|
|
18
|
+
]
|
edurra-1.0.0/setup.cfg
ADDED