Skip to main content

personio-py

build PyPI PyPI - Python Version documentation Codecov #personio-py:matrix.org PyPI - License

personio-py is a lightweight Personio API client library for Python. Also, it's pretty intuitive to use. But don't take my word for it, please have a look:

>>> from personio_py import Personio
>>> p = Personio(client_id='***', client_secret='***')
>>> ada = p.search_first("Ada")
>>> ada.last_name
'Lovelace'
>>> absences = p.get_absences(ada)
>>> len(absences)
12
>>> absences[0].to_dict()
{'id': 42, 'status': 'approved', 'start_date': '2020-08-01', 'end_date': '2020-08-16', ...}

personio-py aims to provide Python function wrappers and object mappings for all endpoints of the Personio REST API. Because personio-py is a third party library, and the REST API may change from time to time, we cannot guarantee that all functions are covered, but we try our best.

If something appears to be broken, please have a look at the open issues and vote for an existing issue or create a new one, if you can't find an issue that describes your problem.

📖 Documentation is available at at-gmbh.github.io/personio-py

Features

  • Aims to cover all functions of the Personio API (work in progress)
  • Python function wrappers for all API endpoints as part of the Personio class
  • Object mappings for all API resources, e.g. an Employee is an object with properties for all the information that is provided by the REST API.
  • Completely transparent handling of authentication and key rotation
  • Support for Type Hints
  • Only one dependency: requests

Getting Started

The package is available on PyPI and can be installed with

pip install personio-py

Now you can import personio_py and start coding. Please have a look at the User Guide and the Examples section for more details.

Contributing

Contributions are very welcome! For our contribution guidelines, please have a look at CONTRIBUTING.md.

To set up your local development environment, please use a fresh virtual environment, then run

pip install -r requirements.txt -r requirements-dev.txt

This project is intended to be used as library, so there is no command line interface or stuff like that.

We use pytest as test framework. To execute the tests, please run

python setup.py test

To build a distribution package (wheel), please use

python setup.py dist

this will clean up the build folder and then run the bdist_wheel command.

Before contributing code, please set up the pre-commit hooks to reduce errors and ensure consistency

pip install -U pre-commit && pre-commit install

PyPI Release

This project is released on PyPI. Most of the tedious steps that are required to test & publish your release are automated by CI pipelines. All you have to do is to write your code and when the time comes to make a release, please follow these steps:

  • update the program version in src/personio_py/version.py
  • write a summary of your changes in CHANGELOG.md
  • add a tag on the master branch with the new version number preceded by the letter v, e.g. for version 1.0.0 the tag would be v1.0.0. To tag the head of the current branch, use git tag v1.0.0
  • push your changes to github and don't forget to push the tag with git push origin v1.0.0
  • now have a look at the release pipeline on GitHub. If it finishes without errors, you can find your release on TestPyPI. Please verify that your release works as expected.
  • Now for the live deployment on PyPI. To avoid mistakes, this is only triggered, when a release is published on GitHub first. Please have a look at the Releases now; there should be a draft release with your version number (this was created by the CI pipeline which also made the TestPyPI release). Edit the draft release, copy the text you added to CHANGELOG.md into the description field and publish it.
  • After you publish the release, the deploy pipeline is triggered on GitHub. It will publish the release directly to PyPI where everyone can enjoy your latest features.

API Functions

Since the Personio API gets extended over time, personio-py usually only implements a subset of all available API features. This section gives an overview, which API functions are accessible through personio-py.

Available

Authentication

  • POST /auth: fully transparent authentication handling

Employees

Attendances

Projects

Absences

Not yet implemented

Contact

Sebastian Straub (sebastian.straub [at] alexanderthamm.com)

Developed with ❤ at Alexander Thamm GmbH

License

Copyright 2020 Alexander Thamm GmbH

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Release files for personio-py 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for personio-py 0.2.3
File Size Uploaded
personio-py-0.2.3.tar.gz 27.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for personio-py 0.2.3
File Interpreter ABI Platform
personio_py-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 56.9 kB

Release files / personio-py-0.2.3.tar.gz

Download URL personio-py-0.2.3.tar.gz
Size 27.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e2a49101063703e5b65108b608710371fa62c596ce93cc14b1b52b683797e42f
BLAKE2b-256 checksum
How to use checksums
12f33c2d875128d3a4296a5e6a2817ce0c14ba9ab65af54de4e3dd7c5a1cc97b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / personio_py-0.2.3-py3-none-any.whl

Download URL personio_py-0.2.3-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4218b6614d7c0af50d49390f018c99ae4a9ab49b933d85667fd428594c2b0b9b
BLAKE2b-256 checksum
How to use checksums
164b277c3a6d42565a6d5939baeaf88b935db0adb8ac0d28dcb6307752575087
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page