Python connector for Workday Live Data Query (LDQ). PyPI package: ldq-python-client; import as workday_ldq.
Dependencies install from PyPI. See Requirements and Installation below.
- Python 3.9+
pip install ldq_python_client-*.whlpython3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"Register an API client in Workday to obtain OAuth credentials. The registration UI differs by grant type:
- JWT Bearer Grant — you will obtain:
clientId, ISU username, private key, and the Token Endpoint URL - Authorization Code Grant — you will obtain:
clientId,clientSecret, redirect URL, Token Endpoint URL, and Authorization Endpoint URL
OAuth endpoint URLs are shown on the API client registration page after registration. Use them in ldq.properties as below.
Auth model via wd.authn.authModel (case-insensitive): JWT_BEARER (default) or AUTHORIZATION_CODE.
wd.authn.authModel=JWT_BEARER
wd.authn.accessTokenEndpoint=https://YOUR_TENANT.myworkday.com/ccx/oauth2/YOUR_TENANT/token
wd.authn.clientId=YOUR_CLIENT_ID
wd.authn.isu=YOUR_ISU_USERNAME
wd.authn.privateKeyFile=/path/to/private-key.pem
wd.host=YOUR_TENANT.myworkday.comOr set wd.authn.privateKey inline instead of wd.authn.privateKeyFile.
wd.authn.authModel=AUTHORIZATION_CODE
wd.authn.accessTokenEndpoint=https://YOUR_TENANT.myworkday.com/ccx/oauth2/YOUR_TENANT/token
wd.authn.clientId=YOUR_CLIENT_ID
wd.authn.authorizationEndpoint=https://YOUR_TENANT.myworkday.com/ccx/oauth2/YOUR_TENANT/authorize
wd.authn.redirectUrl=https://localhost:8888/callback
wd.authn.clientSecret=YOUR_CLIENT_SECRET
wd.host=YOUR_TENANT.myworkday.comfrom workday_ldq import create_connection
conn = create_connection("ldq.properties")
cursor = conn.cursor()
cursor.execute("SELECT * FROM worker LIMIT 10")
results = cursor.fetchall()
cursor.close()
conn.close()| Property | Default | Description |
|---|---|---|
wd.host |
localhost |
Workday / LDQ host |
wd.port |
443 |
Port |
wd.catalog |
workday_core |
Catalog |
wd.schema |
public |
Schema |
wd.http.timeout |
30 |
HTTP request timeout in seconds |
wd.sessionProperties |
(none) | Trino session properties (comma-separated key=value pairs, e.g. query_max_run_time=2h,exchange_order=ANY) |
The following property has been removed and is no longer supported:
wd.authn.includePathPrefix
Install dev dependencies (editable):
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"Integration tests are marked with @pytest.mark.integration and require a live environment. Skip them for local/offline development:
pytest -m "not integration"pytest tests/test_auth.py
pytest tests/test_connector.pypytest tests/test_auth.py::test_token_caching
pytest tests/test_connector.py::test_create_connectionpytest -k "thread_safety"Requires a configured tenant and browser login for authorization-code flows:
pytest -m integrationpip install build
python -m buildArtifacts land under dist/.
Generate HTML API reference locally (same role as ./gradlew javadoc in ldq-jdbc-driver).
Output under docs/api/ is not committed (like build/docs/javadoc/). CI runs this on every build.
pip install -e ".[docs]" # or .[dev], which includes pdoc
./scripts/generate-api-docs.shOpen docs/api/index.html in a browser. Partner entry points: create_connection, __version__.
See docs/README.md for details.
Browser login must complete within 3 minutes. Check redirect URL match, firewall on the callback port, and retry.
Apache-2.0 — see LICENSE, NOTICE, and CONTRIBUTING.