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.

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/

Unfortunately, the documentation is not detailed and updated, such that many parameters have been reverse engineered and may be wrong or change at any time. If you encounter some problems, open an issue or contribute the fix yourself.

Usage

Get all employees

from factorialhr import endpoints

async with endpoints.NetworkHandler as api:
    endpoint = endpoints.EmployeesEndpoint(api)
    all_employees = await endpoint.all()

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

from factorialhr import endpoints
from factorialhr import models

async with endpoints.NetworkHandler('<api_key>') as api:
    e_endpoint = endpoints.EmployeesEndpoint(api)
    t_endpoint = endpoints.TeamsEndpoint(api)
    all_employees = await e_endpoint.all()
    all_teams = await t_endpoint.all()
    employees_by_team_id: dict[int, models.Employee] = {team.id: [e for e in all_employees
                                                                  if e.id in team.employee_ids] for team in all_teams}

TODO

Contribute

Feel free to contribute! Please fork this repository, install the development dependencies with pip install -e ".[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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

factorialhr-2.0.0-py3-none-any.whl (8.9 kB view hashes)

Uploaded Python 3

Supported by

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