Skip to main content

This project is used to interface with [PDSEnergy's](https://pdsenergy.com/frac-interference-exchange/) FracX platform to programmatically submit and download frac schedules.

Project description

permian-frac-exchange

This project is used to interface with PDSEnergy's FracX platform to programmatically 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.


Getting Started

  1. Initialize the destination table in the database. Example table definitions can be found in scripts
  2. Define the necessary environment variables in the docker-compose.yml file or in a .env file in the project root directory (examples below).
  3. Run the container with docker-compose: docker-compose up

Usage

  • Run the container using docker-compose: docker-compose up

Example output:

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                app config: fracx.config.ProductionConfig
                flask app: fracx.manage.py
                flask env: development
                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

The application can be configured with environment variables that are passed into the container at runtime. Environment variables can either be defined at the system level or in a file named '.env' in the project's root directory.

Saving output to a Postgres database


Using a .env file

Example configuration with .env file:

.env

FRACX_FTP_USERNAME=YOUR_FRACX_FTP_UERNAME
FRACX_FTP_PASSWORD=YOUR_FRACX_FTP_PASSWORD
DATABASE_USERNAME=YOUR_DATABASE_USERNAME
DATABASE_PASSWORD=YOUR_DATABASE_PASSWORD
DATABASE_HOST=YOUR_DATABASE_HOST
DATABASE_NAME=YOUR_DATABASE_NAME
DATABASE_SCHEMA=fracx
FRAC_SCHEDULE_TABLE_NAME=frac_schedules

When specifying configuration in a .env file, include it in docker-compose so the configuration is passed into the container at runtime.

docker-compose.yml

version: "3.7"

services:
  collector:
    image: driftwood/fracx
    env_file: .env


##### Using docker-compose.yml

Example configuration directly in the docker-compose.yml file:

services:
  collector:
    image: driftwood/fracx
    environment:
      FRACX_FTP_USERNAME: YOUR_FRACX_FTP_UERNAME
      FRACX_FTP_PASSWORD: YOUR_FRACX_FTP_PASSWORD
      DATABASE_USERNAME: YOUR_DATABASE_USERNAME
      DATABASE_PASSWORD: YOUR_DATABASE_PASSWORD
      DATABASE_HOST: YOUR_DATABASE_HOST
      DATABASE_NAME: YOUR_DATABASE_NAME
      DATABASE_SCHEMA: fracx
      FRAC_SCHEDULE_TABLE_NAME: frac_schedules

Project details


Download files

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

Files for fracx, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size fracx-0.1.4-py3-none-any.whl (33.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size fracx-0.1.4.tar.gz (27.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page