Python
Setup

Setup

To use thepi.pe, you need to install it and set the THEPIPE_API_KEY environment variable. This key is essential for authenticating your requests to the thepi.pe API.

Installation

You can install the Python package using pip:

pip install thepipe-api

Getting Your API Key

  1. Visit https://thepi.pe/platform/settings (opens in a new tab)
  2. Log in to your account (or create one if you haven't already)
  3. Locate your API key on the settings page

Setting the Environment Variable

On Unix-based systems (Linux, macOS)

Add the following line to your shell configuration file (e.g., ~/.bashrc, ~/.zshrc):

export THEPIPE_API_KEY=your_api_key_here

Then, reload your shell configuration:

source ~/.bashrc  # or ~/.zshrc

On Windows

  1. Open the Start menu and search for "Environment Variables"
  2. Click on "Edit the system environment variables"
  3. Click the "Environment Variables" button
  4. Under "User variables", click "New"
  5. Set the variable name as THEPIPE_API_KEY and the value as your API key
  6. Click "OK" to save

Remember to restart any open terminal windows or applications for the changes to take effect.

Local installation

To install thepi.pe locally, you can install extra dependencies with

pip install -r https://raw.githubusercontent.com/emcf/thepipe/main/local.txt

Note that some dependencies will require additional services such as OpenAI/LiteLLM/OpenRouter to provide AI extractions.