A minimal FastAPI starter showing how to integrate the Zid Python SDK.
Connect your store → See your data → Copy the code.
# Install the Zid SDK
pip install zid-client
# Install demo dependencies
uv sync
# Configure (add your Zid OAuth credentials)
cp .env.example .env
# Run
uvicorn app.main:app --reloadOpen http://localhost:8000 and click "Connect Your Zid Store".
After authenticating, you get a dashboard showing:
- Your store profile
- Recent orders
- Customer data
Plus the exact SDK code that powers it:
from zid import ZidClient
client = ZidClient(
authorization="...",
store_token="...",
)
store = client.stores.get_profile()
customers = client.customers.list()
orders = client.orders.list()Zid OAuth requires a publicly accessible callback URL — localhost won't work.
Options:
- ngrok — quick tunnel for local dev
- Cloudflare Tunnel
- Deploy to any cloud provider (Vercel, Railway, Render, etc.)
- Any reverse proxy or tunnel that gives you a public HTTPS URL
Example with ngrok:
ngrok http 8000Update .env:
ZID_REDIRECT_URI=https://your-url.ngrok.io/auth/callback
Add the same URL to your Zid app settings in the Partner Dashboard.
| Endpoint | SDK Method |
|---|---|
GET /api/store |
client.stores.get_profile() |
GET /api/customers |
client.customers.list() |
GET /api/orders |
client.orders.list() |
GET /api/orders/{id} |
client.orders.get(id) |
GET /api/webhooks |
client.webhooks.list() |
POST /api/webhooks |
client.webhooks.create() |
DELETE /api/webhooks/{id} |
client.webhooks.delete() |
├── app/
│ ├── main.py # SDK examples + pages
│ ├── auth.py # OAuth flow
│ ├── config.py # Settings + token storage
│ ├── errors.py # SDK exception handlers
│ └── templates.py # HTML pages
├── .env.example
├── pyproject.toml
└── README.md
MIT