Async Python client for the IDrive e2 Get Region Endpoint API (returns only endpoint URL).
Project description
idrive-e2-client
Async Python client for the
IDrive e2 Get Region Endpoint API.
This library provides a minimal, typed wrapper around the IDrive e2 region lookup call:
- 🔑 Fetch the correct endpoint URL for an access key
- 🚦 Handle invalid credentials and network errors with clean exceptions
- ⚡ Async-first design, built on
aiohttp
It is lightweight, minimal, and used by the Home Assistant backup integration for IDrive e2.
Install
pip install idrive-e2-client
Quick Start
import asyncio
import aiohttp
from idrive_e2 import IDriveE2Client, InvalidAuth, CannotConnect
ACCESS_KEY = "..."
async def main():
async with aiohttp.ClientSession() as session:
client = IDriveE2Client(session)
try:
endpoint = await client.get_region_endpoint(ACCESS_KEY)
print("Resolved endpoint:", endpoint)
except InvalidAuth:
print("Invalid credentials")
except CannotConnect:
print("Cannot connect to IDrive e2")
asyncio.run(main())
Why?
Before you can connect to IDrive e2 with standard S3 tools,
you must call the Get Region Endpoint API to determine the correct regional endpoint.
This client wraps that step into a reusable Python package with a simple, async method.
Installation
pip install idrive-e2-client
For development
git clone https://github.com/patrickvorgers/idrive-e2-client.git
cd idrive-e2-client
pip install -e .[dev]
API
IDriveE2Client(session: aiohttp.ClientSession)
Create a new client instance using an aiohttp session.
await client.get_region_endpoint(access_key: str) -> str
Resolve and return the correct endpoint URL for the given access key.
The returned string is normalized to include a scheme (e.g., https://...).
Raises
InvalidAuth→ credentials not validCannotConnect→ API not reachable/bad response/malformed data
Exceptions
InvalidAuth-> credentials not validCannotConnect-> API not reachable or bad responseIDriveE2Error-> base class for all errors
Contributing
Contributions are welcome! Please open an issue or pull request.
License
MIT © 2025 Patrick Vorgers
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file idrive_e2_client-0.1.1.tar.gz.
File metadata
- Download URL: idrive_e2_client-0.1.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3148996791eed8849152f144c9a266d17c0b36e0f85f6baeee121f62236a76e0
|
|
| MD5 |
61d484686145592ccd2d9671fb7f5163
|
|
| BLAKE2b-256 |
2b970f6714ddf14f12e71384b564057a02ed8b69f47a34e56203f238931eb36b
|
Provenance
The following attestation bundles were made for idrive_e2_client-0.1.1.tar.gz:
Publisher:
release.yml on patrickvorgers/idrive-e2-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
idrive_e2_client-0.1.1.tar.gz -
Subject digest:
3148996791eed8849152f144c9a266d17c0b36e0f85f6baeee121f62236a76e0 - Sigstore transparency entry: 868916446
- Sigstore integration time:
-
Permalink:
patrickvorgers/idrive-e2-client@e706e189a2acdf569f095cd35aa43bdc955ad9aa -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/patrickvorgers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e706e189a2acdf569f095cd35aa43bdc955ad9aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file idrive_e2_client-0.1.1-py3-none-any.whl.
File metadata
- Download URL: idrive_e2_client-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f44f5965c8881bc7c460d51f9343e24d7a5718f9eae5b2aaa0850a4597fc43da
|
|
| MD5 |
c15a0c2932a3663e39b9d750f82bb651
|
|
| BLAKE2b-256 |
322096e7562ba9a8f2c81967c4cf232f7db84315ea2900d1a378f4a1e86e3390
|
Provenance
The following attestation bundles were made for idrive_e2_client-0.1.1-py3-none-any.whl:
Publisher:
release.yml on patrickvorgers/idrive-e2-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
idrive_e2_client-0.1.1-py3-none-any.whl -
Subject digest:
f44f5965c8881bc7c460d51f9343e24d7a5718f9eae5b2aaa0850a4597fc43da - Sigstore transparency entry: 868916449
- Sigstore integration time:
-
Permalink:
patrickvorgers/idrive-e2-client@e706e189a2acdf569f095cd35aa43bdc955ad9aa -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/patrickvorgers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e706e189a2acdf569f095cd35aa43bdc955ad9aa -
Trigger Event:
push
-
Statement type: