← Back to all posts
Introducing the Forminit Python SDK
We’re releasing the official Python SDK for Forminit. Handle form submissions from any Python application — Flask, Django, FastAPI, or plain Python.
Install
pip install forminit
Requires Python 3.8+.
Quick example
import os
from forminit import ForminitClient
client = ForminitClient(api_key=os.environ["FORMINIT_API_KEY"])
response = client.submit("YOUR_FORM_ID", {
"fi-sender-fullName": "John Doe",
"fi-sender-email": "john@example.com",
"fi-text-message": "Hello from Python!",
})
if response.get("error"):
print("Error:", response["error"]["message"])
else:
print("Submission ID:", response["data"]["hashId"])
That’s it. Your form data is now in the Forminit dashboard with email notifications, validation, and everything else handled automatically.
Works with your framework
The SDK supports both sync and async usage, so it fits right into whatever you’re already using:
- Flask — Use
request.form.to_dict()and submit directly - Django — Use
request.POST.dict()and submit directly - FastAPI — Use the async client for non-blocking submissions
Tracking included
Pass UTM parameters and ad click IDs to keep attribution data with every submission:
response = client.submit("YOUR_FORM_ID", form_data, tracking={
"utm_source": "google",
"utm_medium": "cpc",
"gclid": "EAIaIQobChMI...",
})
Get started
- Python Quickstart — General usage and examples
- Flask Integration — Step-by-step Flask setup
- Django Integration — Step-by-step Django setup
- FastAPI Integration — Step-by-step FastAPI setup
- Python SDK Reference — Full API reference