Skip to main content

PRIMO - The P&A Project Optimizer Toolkit

PRIMO - The Oil & Gas Well Plugging Optimizer supports decision makers (state agencies, large-scale well operators, plugging companies, etc.) to (1) prioritize end-of-life wells for Plugging & Abandonment (P&A) operations, (2) design high-impact and/or high-efficiency P&A projects, and (3) compare P&A projects in an unbiased, fully transparent, and defensible way.

Project Status

PyPI - Python Version Pypi Checks codecov Black Imports: isort Documentation Status Contributors Merged PRs Issue stats Downloads

Getting Started

Our complete documentation is available on readthedocs, but here is a summarized set of steps to get started using the framework.

While not required, we encourage the installation of Anaconda or Miniconda and using the conda command to create a separate python environment in which to install the PRIMO Toolkit.

Regular users can use conda to create a new "primo" environment.

conda env create -f conda-env.yml

This creates a new conda environment with the name "primo" that comes installed with all required dependencies to solve PRIMO's optimization problems.

Developers can create a new "primo" environment by executing:

conda env create -f conda-env-dev.yml

Activate the new environment with:

conda activate primo

To test the installation of the primo package, execute:

pytest primo\utils\tests\test_imports.py

The above test, if executed successfully, confirms that primo package is now installed and available in the "primo" package that was just created.

To use the utilities implemented in the PRIMO package that query the U.S. Census API, an appropriate API key must be obtained by signing up with the respective service. These keys must be configured in a .env file in the parent directory. For more details, please see: API Keys

Additionally, use of elevation based utilities requires the user to provide a GeoTIFF file that provides elevation data across the region of interest. Users can download this data from USGS Science Data Catalog. For more details, please see: Elevation Data

Users can also employ other commercial solvers, for example Gurobi, to solve the optimization problem. However, users are responsible for configuring and setting up these solvers themselves.

Running PRIMO with Binder

You can run PRIMO with Binder: a public cloud service that provides a temporary and short-lived sandbox environment to run PRIMO without installing any software locally.

Quickstart

You can launch the Binder environment by clicking on the following badge: Binder

Key Notes

  • Binder environments are automatically destroyed after a few minutes of inactivity. To avoid lost work, please download the notebook file on your local machine periodically.
  • The Binder provided environment is public and insecure. Please do not use this environment to work with sensitive data.

Funding acknowledgements

This work is funded by DOE program grant DE-FOA-003109.

Contributing

By contributing to this repository, you are agreeing to all the terms set out in the LICENSE.md and COPYRIGHT.md files in this directory.

Metadata

Release files for primo-optimizer 0.4.10

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

Source distribution (sdist)

Source distribution for primo-optimizer 0.4.10
File Size Uploaded Provenance Actions
primo_optimizer-0.4.10.tar.gz 234.2 kB With provenance Details for primo_optimizer-0.4.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for primo-optimizer 0.4.10
File Interpreter ABI Platform Actions
primo_optimizer-0.4.10-py3-none-any.whl Python 3 none any Details for primo_optimizer-0.4.10-py3-none-any.whl

Total release size: 514.9 kB

Release files / primo_optimizer-0.4.10.tar.gz

Download URL primo_optimizer-0.4.10.tar.gz
Size 234.2 kB
Tags Source
SHA-256 checksum
How to use checksums
93182d470b5286325e786a1d19fa5a47f3390da11aa2f8f0febe2f4410195db6
BLAKE2b-256 checksum
How to use checksums
d501a3b95dd7a2bda572fd918df67b33be98c63e50fd0f2c549d35a652a419cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 17, 2026.

Transparency log

Release files / primo_optimizer-0.4.10-py3-none-any.whl

Download URL primo_optimizer-0.4.10-py3-none-any.whl
Size 280.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e07ab4e42d96cc24a2a837b95f4360c54c502476dc099c565f0592365be40110
BLAKE2b-256 checksum
How to use checksums
fd9a8c417d97138ae4ffa3ca60a08b17eaaa6a36e94443f360dcbb97ec35b9ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 17, 2026.

Transparency log

Security for primo-optimizer 0.4.10

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for primo_optimizer-0.4.10.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 Nov 17, 2026.

Transparency log

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