Metadata-Version: 2.4
Name: purr-petra-cli
Version: 0.1.0
Summary: Add your description here
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=2.3.1
Requires-Dist: pandas>=2.3.0
Requires-Dist: psutil>=7.0.0
Requires-Dist: pyodbc>=5.2.0
Requires-Dist: typer>=0.16.0
Dynamic: license-file

# purr_petra_cli

| <img src="./docs/purrio.png" alt="purrio logo" height="100"/> | <img src="./docs/snp.png" alt="purrio logo" width="200"/>| **PETRA** |
|:--:|:--:|:--:|


Use **purr_petra_cli** to query Petra projects* from the command line and generate well-centric json. This is a stripped-down implementation of most export functionality of [purr_petra](https://github.com/rbhughes/purr_petra).


```
- core
- dst
- formation
- ip
- perforation
- production
- raster_log
- survey
- vector_log
- well
- zone
```


* _Each [Petra](https://www.spglobal.com/commodityinsights/en/ci/products/petra-geological-analysis.html) "project" is a semi-structured collection
  of E&P assets that interoperate with its own
  [DBISAM](https://www.elevatesoft.com/products?category=dbisam)
  database. From an IT perspective, Petra is a distributed collection of
  user-managed databases "on the network" containing millions of assets._


## WHO IS THIS FOR?

This was developed as part of a Databricks geospatial catalog pipeline. It is useful for quickly exporting data from Petra, particularly if you don't have a license or want to avoid Petra's cumbersome ASCII export.


## LIMITATIONS:

If you are trying to egress lots of data from a large Petra project, this is NOT the tool for you. It relies solely on ODBC via Python. You are better off exporting/parsing a .PPF file.

**purr_petra_cli** should be fine for smaller projects ~ roughly those with < 100000 wells. Use the `--uwis` filter to limit state/county. It's slow but memory-safe.


## QUICKSTART:

1. `pip install purr_petra_cli`
2. launch console "as Administrator" and run `prep-purr-petra`
3. `start-purr-petra`
4. visit `http://localhost:8070/docs` for auto-generated docs
