Skip to main content

A DLT source for personio

Project description


description: dlt source for personio.com keywords: [personio API, personio.com]

dlt-source-personio

PyPI version

DLT source for personio.

Currently loads the following data:

Table Contains Spec version
persons Items of the Person model with all properties V2
persons_custom_attributes All defined custom attributes. The table is pivoted, so each custom attribute becomes a column in the table. V2
persons_profile_pictures The profile picture for each employee (that has defined one) V1
employments Items of the Employment model with all properties V2

Why are you not using the dlt-hub/verified-sources personio source / Differences

The official verified source has a few drawbacks:

  • it is based on the Personio API V1, not the current V2
  • on usage of the verified source, a copy of the current state of the dlt-hub/verified-sources repository is copied into your project; Once you make changes to it, it effectively becomes a fork, making it hard to update after the fact.
  • The verified source does not use any data validation other than ensuring dates are correct; This means that data shape is not guaranteed, resulting in potential schema changes. This data source uses an (unofficial) OpenAPI spec, which is transformed into Pydantic 2 models.

Currently this data source does not support delta updates (the verified source does) and it also does not contain some of the data sources (absences, etc.). Contributions are welcome!

Usage

Create a .dlt/secrets.toml with your API key and email:

personio_client_id = "papi-..."
personio_client_secret = "papi-..."

and then run the default source with optional list references:

from dlt_source_personio import source as personio_source

pipeline = dlt.pipeline(
   pipeline_name="personio_pipeline",
   destination="duckdb",
   dev_mode=True,
)
personio_data = personio_source()
pipeline.run(personio_data)

Development

This project is using devenv.

Commands:

Command What does it do?
generate-model generates the personio Pydantic model from the current spec file, applies patches, etc.
update-spec Pulls in the latest master#HEAD of personio/api-docs
validate-spec Validates the local (unofficial) Personio V2 spec
refresh-model Both commands above plus adds it to git and commits the changes.
format Formats & lints all code
sample-pipeline-run Runs the sample pipeline. By default dev_mode=True which fetches resources with a limit of 1 (page)
sample-pipeline-show Starts the streamlit-based dlt hub

Run the sample

PERSONIO_CLIENT_ID=[...] \
   PERSONIO_CLIENT_SECRET=[...] \
      sample-pipeline-run

alternatively you can also create a .dlt/secrets.toml (excluded from git) with the following content:

personio_client_id = "papi-..."
personio_client_secret = "papi-..."

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

dlt_source_personio-0.0.3.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dlt_source_personio-0.0.3-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file dlt_source_personio-0.0.3.tar.gz.

File metadata

  • Download URL: dlt_source_personio-0.0.3.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dlt_source_personio-0.0.3.tar.gz
Algorithm Hash digest
SHA256 95cc5936b600b9f86129ba47242efa3a1e6656c52f20f1d18062ef2ace9ae851
MD5 afeac60c7e22d866429db58dc07b6bef
BLAKE2b-256 1318691f0c66ae163b6a41cf7851d74ca5eae2f9f11cfeed51cb6b08fafda3d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for dlt_source_personio-0.0.3.tar.gz:

Publisher: test.yml on planet-a-ventures/dlt-source-personio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dlt_source_personio-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for dlt_source_personio-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9bc42e100f3aeaf05201b91918a736da86c4646e7d2ca5ee7ec0c418397499a1
MD5 d5b6f4d0b7f03296ce9022f00c599520
BLAKE2b-256 740e18207ef3e7dd3124de60d3ed0e7ac12acc3a698ca3a4c97e2155137a0bd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for dlt_source_personio-0.0.3-py3-none-any.whl:

Publisher: test.yml on planet-a-ventures/dlt-source-personio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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