PDM Reader
pdm-datareader is a python package for querying Production Data Mart tables using SQL. The package handles authentication for end users with user impersonation, but also allows for inserting your own token. It must be run from Equinor managed environments connected to Equinor network.
Pull requests, feature requests and issues are welcomed using the GitHub Project Repository or as a ServiceNow ticket directed to Production Data Mart.
Install
- Ensure that ODBC Driver for SQL Server is installed. Currently supports both v18 and v17.
This driver is bundled with the Microsoft SQL Client package in AccessIT, and should be pre installed on linux environments. Instructions for installing on MacOS can be found here.. - MacOS users must install unixodbc. See https://pypi.org/project/pyodbc/ for current instructions.
- Linux users must apply for Linux compliant device exclusion to get multifactor authentication to work.
- Finally install the latest version of the python package using:
pip install pdm-datareader
Usage
See examples/demo.py or try the code below that queries PDM and retrieves data:
import datetime as dt
from pdm_datareader import query
# Example with parameter bindings to avoid SQL injection issues (recommended)
sql = '''
SELECT top(100) *
FROM PDMVW.WELL_PROD_DAY
WHERE COUNTRY = :countrycode
AND PROD_DAY = :startdate
'''
df = query(sql, params={'countrycode': 'NO',
'startdate': dt.datetime(2022, 1, 1)})
print(df)
# Example without parameters (not recommended)
sql = 'SELECT TOP(1) * FROM PDMVW.WELL_PROD_DAY'
df = query(sql)
print(df)
Metadata
Release files for pdm-datareader 2.5.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdm_datareader-2.5.5.tar.gz | 5.7 kB | With provenance | Details for pdm_datareader-2.5.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdm_datareader-2.5.5-py3-none-any.whl | Python 3 | none | any | Details for pdm_datareader-2.5.5-py3-none-any.whl |
Total release size: 12.3 kB
Release files / pdm_datareader-2.5.5.tar.gz
| Download URL | pdm_datareader-2.5.5.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
435dc7d3b077de9f1c56f86f049d63cfeac2bd6afca31e47e9badb6c0f1557d2
|
|
BLAKE2b-256 checksum How to use checksums |
e569247b86d612799c46b043f297cc90c53c7025926a0aac090b6f10f47b3602
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / pdm_datareader-2.5.5-py3-none-any.whl
| Download URL | pdm_datareader-2.5.5-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b094b8d234f856b508b5c2e5e3b16fec448f1f145b351338a370cbdb1b52161
|
|
BLAKE2b-256 checksum How to use checksums |
292fcb2bf363309dc553b07a3695721bdb54d815838e7cff86990546d696090f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logSecurity for pdm-datareader 2.5.5
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pdm_datareader-2.5.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logA 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.