Python Integration Guide
Learn how to integrate the PumpFun API into your Python projects.
Setup
Python Version Requirements
Ensure you have Python 3.7 or higher installed. You can download it from python.org.
Virtual Environment Setup
python -m venv pumpfun-env source pumpfun-env/bin/activate # On Windows use `pumpfun-env\Scripts\activate`Required Packages
Install the required packages:
pip install requests python-dotenvConfiguration Management
Create a .env file in your project root and add your API key:
PUMPFUN_API_KEY=your_api_key_hereLoad the API key in your Python file:
import os from dotenv import load_dotenv load_dotenv() api_key = os.getenv('PUMPFUN_API_KEY')