Skip to main content

Python package for the api of FactorialHR

Project description

FactorialHR api python wrapper

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

The package currently supports the api version 2025-10-01. 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-5.0.2.tar.gz (70.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-5.0.2-py3-none-any.whl (95.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for factorialhr-5.0.2.tar.gz
Algorithm Hash digest
SHA256 fb4a3a6ddeb1de6dd8a95c73def0b333a25b41ed0427ff5d67aa23ba0d568ed3
MD5 91799606305ebb112b32e1cf2f0264ef
BLAKE2b-256 6b60d11d4ed5bf71c5094e4c5888df205a545e82600839604647d2b46c8fdabf

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for factorialhr-5.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 14663903470126548ec7079214e87df52be8076c41a18bfbe2694bae29c8e431
MD5 9065d749f747e0480578af2beb379528
BLAKE2b-256 c20451fd378c57976e00f0a7cff8a3bc36488c7326ed38c0a2c5c5d71f62ba19

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