Skip to main content

An async Python client for the decidalo V3 Import API

Project description

decidalo_client.py

License: MIT Python Versions (officially) supported Pypi status badge

Unittests status badge Coverage status badge Linting status badge Formatting status badge

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decidalo_client-0.0.2.tar.gz (51.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

decidalo_client-0.0.2-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

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

Hashes for decidalo_client-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c41ef6b4a8c37a8b8541a89a1975f77b39e7b8cb5d6c5ab066e77c3b8e1ace94
MD5 546922b9bab9e93896ab95007adb0b2b
BLAKE2b-256 f3b876423facf510a5cf8d116842c74431e99adb32b70c8ae482f76294d9b903

See more details on using hashes here.

Provenance

The following attestation bundles were made for decidalo_client-0.0.2.tar.gz:

Publisher: python-publish.yml on Hochfrequenz/decidalo_client.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file decidalo_client-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for decidalo_client-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2eee8cbcd3410ecb7e3abeb67b5cfffff317148306eb999bed994115428f9ecc
MD5 cb13ee4bdc95d5d617fdf65d62679caa
BLAKE2b-256 fc8b2607d6caf071c87d6ebea3e09f25e4e8208d864fbd37ebadea18b66a40ea

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page