Skip to main content

Python SDK Documentation

Installation

To install the Instafill Python SDK, use pip:

pip install instafill

Usage

Here is a basic example of how to use the Instafill Python SDK:

import os
from instafill import InstaFillClient
from dotenv import load_dotenv

# Load environment variables from .env file
load_dotenv()

# Initialize the client
client = InstaFillClient(api_key=os.getenv('INSTAFILL_API_KEY'))
# or client = InstaFillClient('INSTAFILL_API_KEY')

# Create a new profile
profile = client.create_profile()
profile_id = profile['profile']['id']
print('Profile created:', profile)

# Update profile name
update_response = client.update_profile_name(profile_id, 'Updated Profile Name')
print('Profile name updated:', update_response)

# Get profile details
profile_details = client.get_profile(profile_id)
print('Profile details:', profile_details)