Metadata-Version: 2.4
Name: edurra
Version: 1.0.2
Summary: Maiaddy Cloud Essence Edurra platform for educational planning and resource management
License: MIT
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Dynamic: license-file

# Edurra Python SDK 1.0.0<a id="edurrasdk-python-sdk-100"></a>

Welcome to the Edurra SDK documentation. This guide will help you get started with integrating and using the Edurra SDK in your project.


## Versions<a id="versions"></a>

- API version: `1.0.2`
- SDK version: `1.0.2`

## About the API<a id="about-the-api"></a>

Edurra API for Educational Planning and Resource Management. Powered by postcode-based intelligence and Loccode integration.

## Table of Contents<a id="table-of-contents"></a>

- [Setup & Configuration](#setup--configuration)
  - [Supported Language Versions](#supported-language-versions)
  - [Installation](#installation)
- [Authentication](#authentication)
  - [Access Token Authentication](#access-token-authentication)
- [Setting a Custom Timeout](#setting-a-custom-timeout)
- [Sample Usage](#sample-usage)
- [Services](#services)
- [Models](#models)

# Setup & Configuration<a id="setup--configuration"></a>

## Supported Language Versions<a id="supported-language-versions"></a>

This SDK is compatible with the following versions: `Python >= 3.7`

## Installation<a id="installation"></a>

To get started with the SDK, we recommend installing using `pip`:

```bash
pip install edurra
```

If you are using Python 3, you can use `pip3` instead:

```bash
pip3 install edurra
```

## Authentication<a id="authentication"></a>

### Access Token Authentication<a id="access-token-authentication"></a>

The EdurraSdk API uses an Access Token for authentication.

This token must be provided to authenticate your requests to the API.

#### Setting the Access Token<a id="setting-the-access-token"></a>

When you initialize the SDK, you can set the access token as follows:

```py
EdurraSdk(
    access_token="YOUR_ACCESS_TOKEN",
    api_key="YOUR_API_KEY",
    api_key_header="YOUR_API_KEY_HEADER",
    timeout=10000
)
```

If you need to set or update the access token after initializing the SDK, you can use:

```py
sdk.set_access_token("YOUR_ACCESS_TOKEN")
```

## Setting a Custom Timeout<a id="setting-a-custom-timeout"></a>

You can set a custom timeout for the SDK's HTTP requests as follows:

```py
from edurra_sdk import EdurraSdk

sdk = EdurraSdk(timeout=10000)
```

# Sample Usage<a id="sample-usage"></a>

Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:

```py
from edurra_sdk import EdurraSdk

sdk = EdurraSdk(
    access_token="YOUR_ACCESS_TOKEN",
    api_key="YOUR_API_KEY",
    api_key_header="YOUR_API_KEY_HEADER",
    timeout=10000
)

result = sdk.health.health_check()

print(result)

```

# Async Usage<a id="async-usage"></a>

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.

```py
import asyncio
from edurra_sdk import EdurraSdkAsync

sdk = EdurraSdkAsync(
    access_token="YOUR_ACCESS_TOKEN",
    api_key="YOUR_API_KEY",
    api_key_header="YOUR_API_KEY_HEADER",
    timeout=10000
)


async def main():
  result = await sdk.health.health_check()
  print(result)

asyncio.run(main())
```

## Services<a id="services"></a>

The SDK provides various services to interact with the API.

<details> 
<summary>Below is a list of all available services:</summary>

| Name                    |
| :---------------------- |
| school_discovery        |
| demographic_insights    |
| catchment_area_analysis |
| transportation_planning |
| health                  |

</details>

## Models<a id="models"></a>

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.

<details> 
<summary>Below is a list of all available models:</summary>

| Name                      | Description |
| :------------------------ | :---------- |
| GetSchoolsRequestDto      |             |
| GetDemographicsRequestDto |             |
| GetCatchmentRequestDto    |             |
| CurateBusRouteRequestDto  |             |

</details>

