Python Integration Guide

Learn how to integrate the PumpFun API into your Python projects.

Setup

  1. Python Version Requirements

    Ensure you have Python 3.7 or higher installed. You can download it from python.org.

  2. Virtual Environment Setup

    python -m venv pumpfun-env
    source pumpfun-env/bin/activate  # On Windows use `pumpfun-env\Scripts\activate`
  3. Required Packages

    Install the required packages:

    pip install requests python-dotenv
  4. Configuration Management

    Create a .env file in your project root and add your API key:

    PUMPFUN_API_KEY=your_api_key_here

    Load the API key in your Python file:

    import os
    from dotenv import load_dotenv
    
    load_dotenv()
    api_key = os.getenv('PUMPFUN_API_KEY')