### Install timebutler-client Source: https://pypi.org/project/timebutler-client Install the package via pip. ```bash pip install timebutler-client ``` -------------------------------- ### Initialize and Test Development Environment Source: https://pypi.org/project/timebutler-client Commands to set up the development environment and execute standard quality assurance tasks like testing, linting, and type checking. ```bash # Create dev environment tox -e dev # Run tests tox -e tests # Run linting tox -e linting # Run type checking tox -e type_check ``` -------------------------------- ### Initialize and fetch absences Source: https://pypi.org/project/timebutler-client Create a client instance using an API key and retrieve absence data for a specific year. ```python from timebutler_client import TimebutlerClient # Create client with your API key client = TimebutlerClient(api_key="your-api-key") # Fetch absences for a specific year absences = await client.get_absences(year=2026) for absence in absences: print(f"{absence.employee_number}: {absence.from_date} - {absence.to_date} ({absence.absence_type})") ``` -------------------------------- ### get_services() Source: https://pypi.org/project/timebutler-client Retrieves a list of all services defined in the system. ```APIDOC ## get_services() ### Description Fetch all services. ``` -------------------------------- ### get_projects() Source: https://pypi.org/project/timebutler-client Retrieves a list of all projects defined in the system. ```APIDOC ## get_projects() ### Description Fetch all projects. ``` -------------------------------- ### get_users() Source: https://pypi.org/project/timebutler-client Retrieves a list of all users registered in the system. ```APIDOC ## get_users() ### Description Fetch all users. ``` -------------------------------- ### Track time by project Source: https://pypi.org/project/timebutler-client Aggregate worktime entries by project name using the client's project and worktime endpoints. ```python from timebutler_client import TimebutlerClient client = TimebutlerClient(api_key="your-api-key") # Get all projects and worktime entries projects = await client.get_projects() worktime = await client.get_worktime(year=2026, month=1) # Build a project name lookup project_names = {p.id: p.name_stripped for p in projects} # Sum hours by project for entry in worktime: if entry.has_project: project_name = project_names.get(entry.project_id, "Unknown") print(f"{entry.date}: {entry.duration} on {project_name}") ``` -------------------------------- ### get_worktime(year, month, user_id) Source: https://pypi.org/project/timebutler-client Fetches worktime entries with optional filtering by year, month, or specific user ID. ```APIDOC ## get_worktime(year?, month?, user_id?) ### Description Fetch worktime entries with optional filters. ### Parameters - **year** (int) - Optional - Filter by year. - **month** (int) - Optional - Filter by month. - **user_id** (str/int) - Optional - Filter by user ID. ``` -------------------------------- ### get_workdays() Source: https://pypi.org/project/timebutler-client Fetches workday schedules for all users, filtering out employees with invalid or missing employee numbers. ```APIDOC ## get_workdays() ### Description Fetch workday schedules for all users. Returns a WorkdaysResult containing schedules and a list of invalid_employees. ``` -------------------------------- ### get_absences(year) Source: https://pypi.org/project/timebutler-client Fetches all absence records for a specified year. ```APIDOC ## get_absences(year) ### Description Fetches absences for a given year. ### Parameters - **year** (int) - Required - The year for which to fetch absence data. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.