Skip to main content
# Python client for Workday

This is a Python client (2.7 or 3.4+) for communicating with one of the Workday XML/SOAP APIs.

[![PyPI version](https://badge.fury.io/py/workday.svg)](https://badge.fury.io/py/workday)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

# Features

This client
* facilitates the authentication to a Workday SOAP API (Workday Web Services) and the parsing of data.
* supports Anonymous, Basic HTTP and WS-Security (which is the prefered configuration in Workday)
* allows the setup of multiple WWS endpoints

# Configuring WSDLs

The first parameter of the `WorkdayClient` constructor is a dictionary. This dictinary contains all the APIs you want to access and the endpoints of them.

The key used in the dictionary will then become a *property* of the client instance with the methods for that API.

```python
import workday

apis = {
'talent': 'https://workday.com/tenant/434$sd.xml',
'hcm': 'https://workday.com/tenant/hcm$sd.xml'
}

client = workday.WorkdayClient(
wsdls=apis,
authentication=...
)

users = client.hcm.Get_Users()
```

Any calls to an API method will return an instance of `workday.client.WorkdayResponse`. If you want to page results, the paging data is in the response.

The data will be in the `data` property of any API response.

# Authentication Examples

All authentication methods are in the `workday.auth` module and the instance of them should be passed to the `WorkdayClient` constructor as the `authentication` argument.

## No authentication

```python
from workday.auth import AnonymousAuthentication

anon = AnonymousAuthentication()

client = workday.WorkdayClient(
authentiation=anon,
...
)
```


## WS-Security username/password

```python
from workday.auth import WsSecurityCredentialAuthentication

auth = WsSecurityCredentialAuthentication('my_user@tenant_name', 'mypassword')

client = workday.WorkdayClient(
authentiation=auth,
...
)
```

## WS-Security X509-only authentication

```python
from workday.auth import WsSecurityCertificateAuthentication

auth = WsSecurityCertificateAuthentication('/path/to/private.key', '/path/to/public.key')

client = workday.WorkdayClient(
authentiation=auth,
...
)
```

## WS-Security X509-only signed credentials (Recommended by Workday)

```python
from workday.auth import WsSecurityCertificateCredentialAuthentication

auth = WsSecurityCertificateCredentialAuthentication(
'user@tenant',
'password',
'/path/to/private.key',
'/path/to/public.key')

client = workday.WorkdayClient(
authentiation=auth,
...
)
```

# Example

This simple example returns a list of dictionaries back from the Workday API for each configured language.

```python

import workday
from workday.auth import WsSecurityCredentialAuthentication

client = workday.WorkdayClient(
wsdls={'talent': 'https://workday.com/tenant/434$sd.xml'},
authentication=WsSecurityCredentialAuthentication(config['user'], config['password']),
)

print(client.talent.Get_Languages().data)
```

# Credits

This module was written by Anthony Shaw at Dimension Data

# Contributions

Always welcome. See CONTRIBUTING.rst

=======
History
=======

0.2.0 (2018-06-22)
------------------

* WS-Security support
* Protected WSDL support
* Paging support

0.1.0 (2018-06-22)
------------------

* First release on PyPI.
* Template for Talent API (SOAP) method execution


Metadata

Release files for workday 0.2.0

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

Source distribution (sdist)

Source distribution for workday 0.2.0
File Size Uploaded Provenance Actions
workday-0.2.0.tar.gz 9.8 kB Without provenance Details for workday-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for workday 0.2.0
File Interpreter ABI Platform Actions
workday-0.2.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for workday-0.2.0-py2.py3-none-any.whl

Total release size: 16.7 kB

Release files / workday-0.2.0.tar.gz

Download URL workday-0.2.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e802299cda735838c89a823ef64570c7fe6a101df8f41bf17c97bb68b1de5c70
BLAKE2b-256 checksum
How to use checksums
0827fe5e0a9b2a5909865e6dc39893fb2a237caad419ea9ad870869695b249ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / workday-0.2.0-py2.py3-none-any.whl

Download URL workday-0.2.0-py2.py3-none-any.whl
Size 6.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e788204d50b9ea0bebb669637a88652f8ce66471c28dee9dfea32cf04627513c
BLAKE2b-256 checksum
How to use checksums
8380ed6e67d624c1355514bb5bfa3e0cd8f7a8d37cc28ea49f76473c0dd13dba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for workday 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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