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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

petropt-1.0.1.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

petropt-1.0.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file petropt-1.0.1.tar.gz.

File metadata

  • Download URL: petropt-1.0.1.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for petropt-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b192a0302924dc2d03ee41ecab6c748e0125011aa533eefc955e6d4881cb88a5
MD5 a511f774db51801cb724d42951b5bd4f
BLAKE2b-256 01245a5848f08c549e074fe688dd998b3d634eefbb2bc074cd425710e93fa198

See more details on using hashes here.

File details

Details for the file petropt-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: petropt-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for petropt-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 34b4f9b2780833541c2568d62a9e0f7227f87b0d4b139fcd13540f72eec83b3d
MD5 e7b4bfa292e2b8ad48a1bb5ab69ca6fb
BLAKE2b-256 4bebc6a7b9dbc1fa05e2fd3a8f5839797b7bad4fe7bb1df202454d21484e3c5e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

Supported by

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