An async Python client for the decidalo V3 Import API
Project description
decidalo_client.py
An async Python client for the decidalo V3 Import API (Swagger UI)
[!IMPORTANT] This is a community project and is NOT an official decidalo client. It is not affiliated with or endorsed by Data Assessment Solutions GmbH.
Installation
pip install decidalo-client
Usage
import asyncio
from decidalo_client import DecidaloClient, DecidaloAPIError, DecidaloAuthenticationError
async def main() -> None:
async with DecidaloClient(api_key="your-api-key") as client:
# Get all users
users = await client.get_users()
for user in users:
print(f"{user.displayName} ({user.email})")
# Get all projects
projects = await client.get_all_projects()
for project in projects:
print(f"{project.properties.name.value}")
if __name__ == "__main__":
asyncio.run(main())
Error Handling
import asyncio
from decidalo_client import DecidaloClient, DecidaloAPIError, DecidaloAuthenticationError
async def main() -> None:
async with DecidaloClient(api_key="your-api-key") as client:
try:
users = await client.get_users()
except DecidaloAuthenticationError as e:
print(f"Authentication failed: {e.message}")
except DecidaloAPIError as e:
print(f"API error {e.status_code}: {e.message}")
if __name__ == "__main__":
asyncio.run(main())
Features
- Async HTTP client built on
aiohttp - Type-safe request/response models using
pydantic - All major API endpoints:
- Users - Get users, import users (sync/async), check import status
- Teams - Get teams, import teams (sync/async), check import status
- Companies - Get companies, import companies
- Projects - Get projects, get all projects, import projects, check existence
- Bookings - Get bookings, get bookings by project, import bookings
- Absences - Get absences, import absences
- Resource Requests - Get resource requests, import resource requests
- Roles - Import roles
- Working Time Patterns - Get working time patterns, import working time patterns
Development
Clone the repository and install the development environment:
git clone https://github.com/Hochfrequenz/decidalo_client.py.git
cd decidalo_client.py
tox -e dev
To regenerate the Pydantic models from the OpenAPI spec:
tox -e codegen
For detailed information on the development setup (tox configuration, IDE setup, etc.), see the Hochfrequenz Python Template Repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 decidalo_client-0.0.2.tar.gz.
File metadata
- Download URL: decidalo_client-0.0.2.tar.gz
- Upload date:
- Size: 51.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c41ef6b4a8c37a8b8541a89a1975f77b39e7b8cb5d6c5ab066e77c3b8e1ace94
|
|
| MD5 |
546922b9bab9e93896ab95007adb0b2b
|
|
| BLAKE2b-256 |
f3b876423facf510a5cf8d116842c74431e99adb32b70c8ae482f76294d9b903
|
Provenance
The following attestation bundles were made for decidalo_client-0.0.2.tar.gz:
Publisher:
python-publish.yml on Hochfrequenz/decidalo_client.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
decidalo_client-0.0.2.tar.gz -
Subject digest:
c41ef6b4a8c37a8b8541a89a1975f77b39e7b8cb5d6c5ab066e77c3b8e1ace94 - Sigstore transparency entry: 830890654
- Sigstore integration time:
-
Permalink:
Hochfrequenz/decidalo_client.py@57ca036aad1027a76c226d9f27017012e0f00068 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/Hochfrequenz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@57ca036aad1027a76c226d9f27017012e0f00068 -
Trigger Event:
release
-
Statement type:
File details
Details for the file decidalo_client-0.0.2-py3-none-any.whl.
File metadata
- Download URL: decidalo_client-0.0.2-py3-none-any.whl
- Upload date:
- Size: 21.1 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 |
2eee8cbcd3410ecb7e3abeb67b5cfffff317148306eb999bed994115428f9ecc
|
|
| MD5 |
cb13ee4bdc95d5d617fdf65d62679caa
|
|
| BLAKE2b-256 |
fc8b2607d6caf071c87d6ebea3e09f25e4e8208d864fbd37ebadea18b66a40ea
|
Provenance
The following attestation bundles were made for decidalo_client-0.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on Hochfrequenz/decidalo_client.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
decidalo_client-0.0.2-py3-none-any.whl -
Subject digest:
2eee8cbcd3410ecb7e3abeb67b5cfffff317148306eb999bed994115428f9ecc - Sigstore transparency entry: 830890663
- Sigstore integration time:
-
Permalink:
Hochfrequenz/decidalo_client.py@57ca036aad1027a76c226d9f27017012e0f00068 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/Hochfrequenz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@57ca036aad1027a76c226d9f27017012e0f00068 -
Trigger Event:
release
-
Statement type: