Mintlify Documentation Setup
Publishing Your Python Tools Portfolio
What is Mintlify?
Mintlify auto-generates beautiful API documentation from your GitHub repos. Instead of maintaining docs manually, they pull from your code. Result:docs.yourname.dev with unified docs for all 50+ tools.
Setup: 5 Steps (30 minutes)
Step 1: Create Mintlify Account
- Go to mintlify.com
- Click “Sign up” → “Sign up with GitHub”
- Authorize Mintlify to access your GitHub org
- Create workspace: “Python Assets”
Step 2: Connect Your Tools
- In Mintlify dashboard: “New documentation”
- Select “GitHub” as source
- Choose organization: “yourname-tools”
- Select repositories to document:
- async-retry
- concur
- … (all production tools)
- Click “Connect”
Step 3: Configure mint.json
Mintlify reads amint.json file in your repo for configuration.
Create: docs/mint.json in your main docs repo or in each tool repo.
Step 4: Create Documentation Files
Mintlify reads markdown files. Here’s the structure:Step 5: Deploy
In Mintlify dashboard:- Click “Deploy”
- Select your docs folder
- Choose custom domain:
docs.yourname.dev - Wait 5 minutes
- ✅ Live!
Documentation Template Files
1. introduction.mdx
What’s Next?
Using poetry
Verify Installation
Optional Dependencies
For development
- pytest (testing)
- pytest-asyncio (async testing)
- black (formatting)
- mypy (type checking)
For documentation
Next Steps
With Exponential Backoff
Add delays between retries:With Jitter
Spread out retries to avoid thundering herd:Custom Retry Condition
Retry only on specific exceptions:With Logging
Track retry attempts:Next Steps
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
max_attempts | int | 3 | Maximum number of retry attempts |
backoff_factor | float | 1 | Multiplier for delay between retries (1s, 2s, 4s, etc.) |
jitter | bool | False | Add random jitter to delays to avoid thundering herd |
retry_on | tuple[Exception] | (Exception,) | Only retry on these exception types |
on_retry | Callable | None | Callback function called before each retry |
Examples
Basic Retry
With Backoff
With Jitter
Selective Retries
With Logging
Return Value
The decorator preserves the original function’s return type.Exceptions
If all retries fail, the original exception is raised:Next Steps
Deployment
Option 1: Mintlify Cloud (Easiest)
- In Mintlify dashboard: “Settings” → “Deployment”
- Select “Mintlify Cloud”
- Add custom domain:
docs.yourname.dev - Point DNS CNAME to Mintlify servers
- ✅ Done! Docs deploy automatically on push
Option 2: Self-Hosted (GitHub Pages)
Option 3: Vercel
Tips for Great Docs
1. Add Code Blocks with Syntax Highlighting
2. Use Cards for Navigation
3. Use Tabs for Different Examples
4. Use Callouts for Important Info
5. Link Between Tools
Auto-Generate API Docs
Use Mintlify’s auto-generation feature with docstrings:Python Docstring Format
Analytics
Track docs usage:Slack Integration
Notify Slack when docs are updated:- GitHub Actions → Create workflow
- On push to docs/
- Call Slack webhook
- Message: “Docs updated! 📖“
Next Steps
- ✅ Create Mintlify account (2 min)
- ✅ Connect your GitHub org (1 min)
- ✅ Create mint.json (5 min)
- ✅ Write 3 core docs (15 min)
- ✅ Deploy (2 min)
- ✅ Custom domain (5 min)