Skip to main content

permian-frac-exchange

The FracX Python library is a tool to interface with PDS Energy's FracX platform, used to submit and download frac schedules. Currently, the project interfaces with the FTP import/export service provided by PDS. As other means of integration become available from PDS, those means will be incorporated into this project as additional ways to import and export data from FracX.

Available on PyPI and Docker


Installation

Install with pipx:

pipx install fracx

Usage

Set environment variables:

export FRACX_FTP_USERNAME=my_fracx_username
export FRACX_FTP_PASSWORD=my_fracx_password
export FRACX_DATABASE_USERNAME=my_database_username
export FRACX_DATABASE_PASSWORD=my_database_passowrd
export FRACX_DATABASE_HOST=my.host.db
export FRACX_DATABASE_NAME=my_database
export FRACX_DATABASE_SCHEMA=my_schema
export FRACX_TABLE_NAME=frac_schedules

Initialize the database:

fracx db init

Initialization creates one table and one view in the target database:

  • frac_schedules (or the value of FRACX_TABLE_NAME)
  • frac_schedules_by_api10 (or the value of FRACX_TABLE_NAME+"_by_api10")

Re-running the db init command will attempt to create the table or view if they dont already exist. It will NOT drop an existing table or view. This must be done manually.

Run the app

Run the app:

fracx run collector

A successful execution will yield the following output:

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                app config: fracx.config.ProductionConfig
                flask app: fracx.manage.py
                flask env: production
                backend: postgres://fracx:***@db:5432/driftwood
                collector: sftp.pdswdx.com
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Starting download from sftp.pdswdx.com...
Download successful (download size: 70.58 KB, download_time: 0.0s)
frac_schedules.core_insert_update_on_conflict: inserted 625 records (1.28s)

Configuration Reference

Environment variables reference:

name default description
FRACX_FTP_URL sftp.pdswdx.com url to the remote ftp server
FRACX_FTP_PORT 21 port for the ftp server connection
FRACX_FTP_INPATH /Inbound ftp directory where uploads will be saved
FRACX_FTP_OUTPATH /Outbound ftp directory to look for downloads in
FRACX_FTP_USERNAME "" username for ftp authentication
FRACX_FTP_PASSWORD "" password for ftp authentication
FRACX_DATABASE_USERNAME "" username for database authentication
FRACX_DATABASE_PASSWORD "" password for database authentication
FRACX_DATABASE_DIALECT postgres database dialect ("postgres" or "mssql")
FRACX_DATABASE_HOST localhost database host name
FRACX_DATABASE_PORT 5432 database port
FRACX_DATABASE_NAME postgres database name
FRACX_TABLE_NAME frac_schedules database table to store frac schedules

Metadata

Release files for fracx 0.1.16

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

Source distribution (sdist)

Source distribution for fracx 0.1.16
File Size Uploaded Provenance Actions
fracx-0.1.16.tar.gz 29.3 kB Without provenance Details for fracx-0.1.16.tar.gz

Built distribution (wheel)

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

Total release size: 63.8 kB

Release files / fracx-0.1.16.tar.gz

Download URL fracx-0.1.16.tar.gz
Size 29.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6620eca64bae43729af3484b2910e30ab74700befedc2042d57a77752564efff
BLAKE2b-256 checksum
How to use checksums
6570007b485a315ba937491abc62e10c9c374d665ddfd74fafb5e59c744e84fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0 CPython/3.6.7 Darwin/19.0.0

Release files / fracx-0.1.16-py3-none-any.whl

Download URL fracx-0.1.16-py3-none-any.whl
Size 34.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a072e73df468e6e19a8a2951902dae9be115f89d85e61d19b3acdfffb376fac0
BLAKE2b-256 checksum
How to use checksums
b7dd4bfac76e5e8f0b235b4d6354f528d87f54aaf2f5ae3116e88ff179641aef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0 CPython/3.6.7 Darwin/19.0.0

Security for fracx 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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