Skip to main content

petropt — The Python Library for Petroleum Engineering

PyPI License: MIT Python 3.10+

Petroleum engineering correlations for Python. MIT licensed.

Online Calculators · Documentation

⚠️ Version notice — do not use pre-1.0.0 releases. Every version before 1.0.0 has been withdrawn and superseded by the current release line. Install only 1.0.0 or later — pip install "petropt>=1.0.0". Any copy of an older version obtained from a mirror, cache, or third-party listing should be discarded.

Install

pip install petropt

Quick Start

import petropt
import numpy as np

# Load a bundled production dataset
df = petropt.datasets.load_sample_production()

# PVT: Standing bubble point pressure
pb = petropt.correlations.standing_bubble_point(api=35, gas_sg=0.65, temp=200)

# Decline: Arps hyperbolic forecast
t = np.arange(0, 60)
q = petropt.correlations.arps_decline(qi=1000, di=0.05, b=0.5, t=t)

# Volumetrics: STOIIP estimate
ooip = petropt.correlations.stoiip(area=640, thickness=50, porosity=0.20, sw=0.30, bo=1.25)

# Petrophysics: water saturation from resistivity
sw = petropt.petrophysics.archie_sw(rt=20.0, phi=0.20, rw=0.05)

# Well logs: read a LAS file
logs = petropt.io.read_las("well.las")

What's Inside

Correlations

  • PVT — Standing bubble point / Rs / Bo, Dranchuk Z-factor
  • Decline — Arps (exponential, hyperbolic, harmonic)
  • Volumetrics — STOIIP, GIIP, recovery factor
  • Material balance — gas P/Z

Petrophysics

  • Vshale — linear, Larionov (Tertiary / older), Clavier
  • Porosity — density
  • Water saturation — Archie

I/O

  • LAS files — read well logs into pandas DataFrames (wraps lasio)

Datasets

  • Sample production — bundled 2-well, 12-month dataset for demos

Links

Citation

Shirangi, M.G. (2026). petropt: The Python Library for Petroleum Engineering.
https://pypi.org/project/petropt/

License

MIT — see LICENSE for details.

Metadata

Release files for petropt 1.0.1

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

Source distribution (sdist)

Source distribution for petropt 1.0.1
File Size Uploaded
petropt-1.0.1.tar.gz 14.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for petropt 1.0.1
File Interpreter ABI Platform
petropt-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.1 kB

Release files / petropt-1.0.1.tar.gz

Download URL petropt-1.0.1.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b192a0302924dc2d03ee41ecab6c748e0125011aa533eefc955e6d4881cb88a5
BLAKE2b-256 checksum
How to use checksums
01245a5848f08c549e074fe688dd998b3d634eefbb2bc074cd425710e93fa198
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / petropt-1.0.1-py3-none-any.whl

Download URL petropt-1.0.1-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34b4f9b2780833541c2568d62a9e0f7227f87b0d4b139fcd13540f72eec83b3d
BLAKE2b-256 checksum
How to use checksums
4bebc6a7b9dbc1fa05e2fd3a8f5839797b7bad4fe7bb1df202454d21484e3c5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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