Sprint Datapusher
raw JSON → 0.1.2 verified Sat May 09 auth: no python
A Python tool to read CSV files, transform them to JSON, and push the data to a sprint_excel_webserver. Current version 0.1.2, released sporadically. Python >=3.7, <4.0.
pip install sprint-datapusher Common errors
error ModuleNotFoundError: No module named 'sprint_datapusher' ↓
cause Incorrect package name in import or pip install.
fix
Install with 'pip install sprint-datapusher' and import as 'from sprint_datapusher import Datapusher'.
error KeyError: 'SPRINT_ENDPOINT' ↓
cause Required environment variables not set.
fix
Set the environment variable SPRINT_ENDPOINT or pass the endpoint directly.
Warnings
gotcha The library expects the CSV to have headers exactly matching the sprint_excel_webserver schema. Mismatched columns cause silent failures or 400 errors. ↓
fix Ensure CSV headers match the expected schema exactly.
gotcha No built-in validation or error reporting for failed pushes. Check HTTP response manually if needed. ↓
fix Wrap push calls in try/except and inspect response.
Imports
- Datapusher wrong
from sprint_datapusher.datapusher import Datapushercorrectfrom sprint_datapusher import Datapusher
Quickstart
import os
from sprint_datapusher import Datapusher
dp = Datapusher(
csv_path="data.csv",
endpoint=os.environ.get('SPRINT_ENDPOINT', 'http://localhost:5000'),
api_key=os.environ.get('SPRINT_API_KEY', '')
)
dp.transform_and_push()
print("Data pushed successfully.")