factorialhr


Namefactorialhr JSON
Version 4.1.0 PyPI version JSON
download
home_pageNone
SummaryPython package for the api of FactorialHR
upload_time2025-08-22 08:36:48
maintainerNone
docs_urlNone
authorNone
requires_python<3.14,>=3.11
licenseNone
keywords factorialhr hr
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FactorialHR api python wrapper

This package provides a python wrapper to the [api of FactorialHR](https://apidoc.factorialhr.com/docs).

The package currently supports the api version 2025-07-01. You can find the openapi specification [here](https://apidoc.factorialhr.com/openapi/67e137b5e9907d003ce15082).
**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
```python
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
```python
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()}
```

## CLI

A commandline interface can be installed with `factorialhr[cli]`. This is especially useful as a uv tool `uv tool install factorialhr[cli]`.

`(uvx) factorialhr --help`

### Login

The cli currently only supports oauth2 as login method. Please create an issue or contribute yourself if you need a different login method.

`(uvx) factorialhr account login`

## Contribute

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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "factorialhr",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.14,>=3.11",
    "maintainer_email": null,
    "keywords": "FactorialHR, HR",
    "author": null,
    "author_email": "Leon Budnick <y6q6ea9w@mail-proxy.org>",
    "download_url": "https://files.pythonhosted.org/packages/c4/e1/c7fc3e92a296d8b8ae00075ddd9f63edbf874b3aec84ca8228b0a64e4b36/factorialhr-4.1.0.tar.gz",
    "platform": null,
    "description": "# FactorialHR api python wrapper\n\nThis package provides a python wrapper to the [api of FactorialHR](https://apidoc.factorialhr.com/docs).\n\nThe package currently supports the api version 2025-07-01. You can find the openapi specification [here](https://apidoc.factorialhr.com/openapi/67e137b5e9907d003ce15082).\n**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.**\n\n## Disclaimer\n\nI 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/\n\n## Usage\n\nGet all employees\n```python\nimport factorialhr\n\nauthorizer = factorialhr.ApiKeyAuth('<api_key>')  # checkout other authorization methods\nasync with factorialhr.ApiClient(auth=authorizer) as api:\n    all_employees = await factorialhr.EmployeesEndpoint(api).all()  # fetches all employees. on big companies you might want to increase the timeout by using timeout=...\n```\nGet a dictionary with team id as key and a list of member as value\n```python\nimport asyncio\n\nimport factorialhr\n\nauthorizer = factorialhr.AccessTokenAuth('<access_token>')  # checkout other authorization methods\nasync with factorialhr.ApiClient(auth=authorizer) as api:\n        employees_endpoint = factorialhr.EmployeesEndpoint(api)\n        teams_endpoint = factorialhr.TeamsEndpoint(api)\n        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\n        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()}\n```\n\n## CLI\n\nA commandline interface can be installed with `factorialhr[cli]`. This is especially useful as a uv tool `uv tool install factorialhr[cli]`.\n\n`(uvx) factorialhr --help`\n\n### Login\n\nThe cli currently only supports oauth2 as login method. Please create an issue or contribute yourself if you need a different login method.\n\n`(uvx) factorialhr account login`\n\n## Contribute\n\nFeel free to contribute! Please fork this repository, install the development dependencies with `uv sync --dev`\nand create pull request.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python package for the api of FactorialHR",
    "version": "4.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/leon1995/factorialhr/issues",
        "Repository": "https://github.com/leon1995/factorialhr"
    },
    "split_keywords": [
        "factorialhr",
        " hr"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "523c8c4ed48d56e149e64977b5d898c4ef9266a9441ec21272302c333f3aa756",
                "md5": "3d668bd846d18f4a3ef6346e7e1cdb50",
                "sha256": "b0eee684c32982fd297de2d7fcc8c70a34e856121ec5aa19cd3da8837907563c"
            },
            "downloads": -1,
            "filename": "factorialhr-4.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3d668bd846d18f4a3ef6346e7e1cdb50",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.14,>=3.11",
            "size": 100648,
            "upload_time": "2025-08-22T08:36:47",
            "upload_time_iso_8601": "2025-08-22T08:36:47.109526Z",
            "url": "https://files.pythonhosted.org/packages/52/3c/8c4ed48d56e149e64977b5d898c4ef9266a9441ec21272302c333f3aa756/factorialhr-4.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c4e1c7fc3e92a296d8b8ae00075ddd9f63edbf874b3aec84ca8228b0a64e4b36",
                "md5": "177818b6811da1045c4dc97b45a63f32",
                "sha256": "594f52d0e134bec2e02fce9282b236a2a8329d163576333f85462177e7aee6cc"
            },
            "downloads": -1,
            "filename": "factorialhr-4.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "177818b6811da1045c4dc97b45a63f32",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.11",
            "size": 75042,
            "upload_time": "2025-08-22T08:36:48",
            "upload_time_iso_8601": "2025-08-22T08:36:48.564126Z",
            "url": "https://files.pythonhosted.org/packages/c4/e1/c7fc3e92a296d8b8ae00075ddd9f63edbf874b3aec84ca8228b0a64e4b36/factorialhr-4.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-22 08:36:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "leon1995",
    "github_project": "factorialhr",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "factorialhr"
}
        
Elapsed time: 4.95665s