Skip to main content

Python package for the api of FactorialHR

Project description

This package provides a python wrapper to the api of FactorialHR.

The package currently supports the api version v2026-04-01. The openapi schema can be found at https://api.factorialhr.com/oas

I derived some types from the examples given. They might be incorrect. If you encounter any problems, please create an issue and/or contribute a fix.

Disclaimer

I am not affiliated, associated, authorized, endorsed by, or in any way officially connected with EVERYDAY SOFTWARE, S.L. or FactorialHR, or any of its subsidiaries or its affiliates. The official factorialhr.com website can be found at https://factorialhr.com/

Usage

Get all employees:

import factorialhr

authorizer = factorialhr.ApiKeyAuth('<api_key>')  # checkout other authorization methods
async with factorialhr.ApiClient(auth=authorizer) as api:
    all_employees = await factorialhr.EmployeesEndpoint(api).all()  # fetches all employees. on big companies you might want to increase the timeout by using timeout=...

Get a dictionary with team id as key and a list of member as value:

import asyncio

import factorialhr

authorizer = factorialhr.AccessTokenAuth('<access_token>')  # checkout other authorization methods
async with factorialhr.ApiClient(auth=authorizer) as api:
    employees_endpoint = factorialhr.EmployeesEndpoint(api)
    teams_endpoint = factorialhr.TeamsEndpoint(api)
    all_employees, all_teams = await asyncio.gather(employees_endpoint.all(), teams_endpoint.all())  # remember to increase the timeout if you have a lot of employees or teams
    employees_by_team_id = {team.id: [employee for employee in all_employees.data() if employee.id in team.employee_ids] for team in all_teams.data()}

Contribute

Feel free to contribute! Please fork this repository, install the development dependencies with uv sync --dev and create pull request.

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

factorialhr-7.0.0.tar.gz (88.8 kB view details)

Uploaded Source

Built Distribution

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

factorialhr-7.0.0-py3-none-any.whl (122.8 kB view details)

Uploaded Python 3

File details

Details for the file factorialhr-7.0.0.tar.gz.

File metadata

  • Download URL: factorialhr-7.0.0.tar.gz
  • Upload date:
  • Size: 88.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for factorialhr-7.0.0.tar.gz
Algorithm Hash digest
SHA256 a6a44a7989485defb38892736d4c2fc178de4664e3c822c8f4e6aa13afb346e4
MD5 1ccb200364591a505d74cdbfbe062538
BLAKE2b-256 3bd4ae2bcf9f5859f86f5fef6787c98cc4d42d0e38256c3aac3f0775cc1696ee

See more details on using hashes here.

File details

Details for the file factorialhr-7.0.0-py3-none-any.whl.

File metadata

  • Download URL: factorialhr-7.0.0-py3-none-any.whl
  • Upload date:
  • Size: 122.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for factorialhr-7.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b2d3b63ba945a8b3709f9d1ffadf2665e741b0e182ff301f2bd724a6543cf95
MD5 d5afd3f30018ad5ba20c2a15d4ffc5ec
BLAKE2b-256 ae8f236b7edad8d0717ad9d9bbbbac6b9a5e0e3c9007e9f3fc0b96d934b675ed

See more details on using hashes here.

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