Skip to main content

Python client for the Factorial API.

Project description

drifactorial

Test Publish Coverage Package version

Python client for the Factorial API.


Documentation: https://dribia.github.io/drifactorial

Source Code: https://github.com/dribia/drifactorial


Factorial is a software dedicated to manage everything related to HR.

Drifactorial provides a tiny Python interface to the official API.

Key features

  • Authorize programatic access to your application.
  • Obtain and refresh access tokens.
  • Implements generic GET and POST methods.
  • Parses responses to Pydantic models.
  • Easily implement additional methods.

Example

The simplest example.

from drifactorial import Factorial
from datetime import datetime

factorial = Factorial(access_token="abc")

# get list of employees
employees = factorial.get_employees()
# get list of company holidays
holidays = factorial.get_holidays()
# get list of leaves
leaves = factorial.get_leaves()
# get list of days off of an employee
daysoff = factorial.get_daysoff(employee_id=123)
# get list of all shifts in October 2021
shifts = factorial.get_shifts(year=2021, month=10)
# get single employee
single_employee = factorial.get_single_employee(employee_id=123)
# get my account
account = factorial.get_account()

# clock in shift
clock_in = datetime(2021, 10, 1, 9, 0)
new_shift = factorial.clock_in(now=clock_in, employee_id=123)
# clock out shift
clock_out = datetime(2021, 10, 1, 13, 0)
updated_shift = factorial.clock_out(now=clock_in, employee_id=123)

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

drifactorial-0.3.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

drifactorial-0.3.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file drifactorial-0.3.2.tar.gz.

File metadata

  • Download URL: drifactorial-0.3.2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.7.12 Linux/5.11.0-1028-azure

File hashes

Hashes for drifactorial-0.3.2.tar.gz
Algorithm Hash digest
SHA256 7f992c3a387ec2f926d177ba1ace9903825d935b38cb1152cb5100a207bc1d07
MD5 f29cbdcd89e62ebccedeb193fe8d5435
BLAKE2b-256 65e36498f0de908f53a199f51d069b7c7dcfb8d9932507e64606c7d57a4e1835

See more details on using hashes here.

File details

Details for the file drifactorial-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: drifactorial-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.7.12 Linux/5.11.0-1028-azure

File hashes

Hashes for drifactorial-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6fbd0a221dc41cca642cb62ef957a55eb6a0bb2aafa8adde19eeefa4c35e2e5e
MD5 1428915bfef1074f0fe372b3cf19b57c
BLAKE2b-256 8372e711fa0dab26fbf59fd98d9ef01f51d7ec6d0deef2a07ed5331e9281fb82

See more details on using hashes here.

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