Package: personio-py
personio-pypersonio-pyis a lightweightPersonioAPI client library for Python. Also, it's pretty intuitive to use. But don't take my word for it, please have a look:>>>frompersonio_pyimportPersonio>>>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-pyaims to provide Python function wrappers and object mappings for all endpoints of thePersonio 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 theopen issuesand vote for an existing issue or create a new one, if you can't find an issue that describes your problem.📖 Documentation is available atat-gmbh.github.io/personio-pyFeaturesAims to cover all functions of the Personio API (work in progress)Python function wrappers for all API endpoints as part of the Personio classObject 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 rotationSupport for Type HintsOnly one dependency:requestsGetting StartedThe package is available onPyPIand can be installed withpip install personio-pyNow you canimport personio_pyand start coding. Please have a look at theUser Guideand theExamplessection for more details.ContributingContributions are very welcome! For our contribution guidelines, please have a look atCONTRIBUTING.md.To set up your local development environment, please use a fresh virtual environment, then runpip install -r requirements.txt -r requirements-dev.txtThis project is intended to be used as library, so there is no command line interface or stuff like that.We usepytestas test framework. To execute the tests, please runpython setup.py testTo build a distribution package (wheel), please usepython setup.py distthis will clean up the build folder and then run thebdist_wheelcommand.Before contributing code, please set up the pre-commit hooks to reduce errors and ensure consistencypip install -U pre-commit && pre-commit installPyPI ReleaseThis project is released onPyPI. Most of the tedious steps that are required to test & publish your release are automated byCI 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 insrc/personio_py/version.pywrite a summary of your changes inCHANGELOG.mdadd a tag on the master branch with the new version number preceded by the letterv, e.g. for version 1.0.0 the tag would bev1.0.0. To tag the head of the current branch, usegit tag v1.0.0push your changes to github and don't forget to push the tag withgit push origin v1.0.0now have a look at therelease pipelineon GitHub. If it finishes without errors, you can find your release onTestPyPI. 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 theReleasesnow; 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 toCHANGELOG.mdinto the description field and publish it.After you publish the release, thedeploy pipelineis triggered on GitHub. It will publish the release directly toPyPIwhere everyone can enjoy your latest features.API FunctionsSince thePersonio APIgets 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.AvailableAuthenticationPOST /auth: fully transparent authentication handlingEmployeesGET /company/employees: list all employeesPOST /company/employees: create a new employeeGET /company/employees/{id}: get the employee with the specified IDGET /company/employees/{id}/profile-picture/{width}: get the profile picture of the specified employeeAttendancesGET /company/attendances: fetch attendance data for the company employeesPOST /company/attendances: add attendance data for the company employeesDELETE /company/attendances/{id}: delete the attendance entry with the specified IDPATCH /company/attendances/{id}: update the attendance entry with the specified IDProjectsGET /company/attendances/projects: provides a list of all company projectsPOST /company/attendances/projects: creates a project into the company accountDELETE /company/attendances/projects/{id}: deletes a project from the company accountPATCH /company/attendances/projects/{id}: updates a project with the given dataAbsencesGET /company/time-off-types: get a list of available absences typesGET /company/time-offs: fetch absence data for the company employeesPOST /company/time-offs: add absence data for the company employeesGET /company/time-offs/{id}: get the absence entry with the specified IDDELETE /company/time-offs/{id}: delete the absence entry with the specified IDNot yet implementedPATCH /company/employees/{id}: update an existing employee entryGET /company/employees/{employee_id}/absences/balance: retrieve the absence balance for a specific employeeGET /company/employees/custom-attributes: this endpoint is an alias for /company/employees/attributesGET /company/employees/attributes: lists all the allowed attributes per API credentials including custom (dynamic) attributes.GET /company/absence-periodsPOST /company/absence-periodsDELETE /company/absence-periods/{id}GET /company/document-categories: this endpoint is responsible for fetching all document categories of the companyPOST /company/documents: this endpoint is responsible for uploading documents for the company employeesGET /company/custom-reports/reports: this endpoint provides you with metadata about existing custom reports in your Personio account, such as report name, report type, report date / timeframeGET /company/custom-reports/reports/{report_id}: this endpoint provides you with the data of an existing Custom ReportGET /company/custom-reports/columns: this endpoint provides human-readable labels for report table columnsall of therecruiting APIContactSebastian Straub (sebastian.straub [at] alexanderthamm.com)Developed with ❤ atAlexander Thamm GmbHLicenseCopyright 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.