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-01-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-6.0.0.tar.gz (86.0 kB view details)

Uploaded Source

Built Distribution

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

factorialhr-6.0.0-py3-none-any.whl (120.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for factorialhr-6.0.0.tar.gz
Algorithm Hash digest
SHA256 74d2189f5a77155f42c441e1389bc94f5e29c11c6cf264ed78b9fc59fb9fd21e
MD5 d2c1c72c4f7d124571fab124aaf12907
BLAKE2b-256 9a47bd57eaada127af85d0be20eb27f250185ff8ed6c966c3732873d190dfd1b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for factorialhr-6.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b088c56f5258c3cc4164b7367769d3a8d3608ed84b0e7209020e557e78b50a8
MD5 38fcd83681c9ccb9eec0d9ed477b5551
BLAKE2b-256 ea6774998a6658764f348ced998d734a2d782d43ca7d0a12c20f1b3959624d6c

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