A minimal, modern, lightning-fast open-source URL shortener built with Flask and MongoDB.
🌐 Live Website • 📖 Documentation • 📦 PyPI Package • 🐍 SDK Repo
- 🔗 Smart URL Shortening: Generate clean, reliable short URLs instantly.
- 🔒 Password Protection: Secure sensitive links with bcrypt encryption.
- ⏳ Custom Expiration: Set auto-expiring links with standard ISO 8601 timestamps.
- 📱 QR Code Generation: Built-in downloadable high-resolution QR codes.
- 📊 Link Analytics: Track total visitor counts and metadata in real-time.
- 🌙 Modern Dual Theme: Refined Light and Dark mode UI with fluid responsive design.
- 🐍 Official Python SDK: Automate workflows and integrate directly with Python applications and Telegram bots.
- ⚡ Zero Bloat: No forced signups, no ads, and zero unnecessary friction.
Redirox provides an official Python SDK published on PyPI.
pip install rediroxfrom redirox import (
Redirox,
RediroxValidationError,
RediroxAuthError,
RediroxNotFoundError,
RediroxConnectionError,
RediroxAPIError,
)
client = Redirox()
try:
# 1. Shorten a link with QR code & optional password
result = client.shorten(
"https://github.com/MKishoreDev/Redirox",
password="mypassword",
generate_qr=True
)
print("Short URL:", result["short_url"])
# 2. Get link metadata & visit count
info = client.info(result["code"])
print(f"Total visits: {info['visits']}")
# 3. Verify link password
check = client.verify(result["code"], "mypassword")
print("Password verified:", check["success"])
except RediroxValidationError as error:
print("Invalid input:", error)
except RediroxAuthError as error:
print("Incorrect password:", error)
except RediroxNotFoundError as error:
print("Link not found / expired:", error)
except RediroxConnectionError as error:
print("Connection error:", error)
except RediroxAPIError as error:
print(f"API error ({error.status_code}):", error)The Redirox backend exposes clean JSON endpoints for developers.
POST /shorten
Payload:
{
"url": "https://example.com",
"password": "optional_password",
"expires_at": "2026-12-31T23:59:59Z",
"generate_qr": true
}Response: 200 OK
{
"code": "aB3x9z",
"short_url": "https://redirox.pages.dev/aB3x9z",
"url": "https://example.com",
"qr_code": "data:image/png;base64,...",
"expires_at": "2026-12-31T23:59:59",
"has_password": true
}GET /info/<code>
Response: 200 OK
{
"code": "aB3x9z",
"url": "https://example.com",
"visits": 42,
"created_at": "2026-10-01T10:00:00",
"expires_at": "2026-12-31T23:59:59",
"has_password": true
}POST /verify/<code>
Payload:
{
"password": "mypassword"
}Clone the repository and run the application locally in 3 steps:
git clone https://github.com/MKishoreDev/Redirox.git
cd Rediroxpython -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt# Set your MongoDB connection string (or defaults to localhost:27017)
export MONGO_URI="mongodb://localhost:27017" # On Windows PowerShell: $env:MONGO_URI="mongodb://localhost:27017"
python app.pyThe application will be running at http://127.0.0.1:5000/.
Redirox/
├── app.py # Main Flask application and REST API endpoints
├── requirements.txt # Python package dependencies
├── vercel.json # Vercel serverless deployment config
├── templates/
│ ├── index.html # Landing page & shortener interface
│ ├── docs.html # Official Python SDK documentation portal
│ ├── password.html # Password authentication gate
│ └── 404.html # Custom 404 error page
├── static/
│ ├── style.css # Core design system & theme variables
│ ├── script.js # Shortener frontend interactions
│ ├── docs.css # Documentation stylesheet
│ ├── docs.js # Docs copy buttons & scrollspy
│ ├── datepicker.js # Date & time picker engine
│ ├── password.js # Password verification logic
│ ├── 404.js # 404 page script
│ └── redirox.png # Brand logo asset
├── LICENSE # MIT License (Kishore M)
└── SDK-README.md # Python SDK standalone guide
Contributions, feedback, and pull requests are welcome!
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more details.
⭐ If you find Redirox useful, please consider giving it a star on GitHub! ⭐
Made with ❤️ by Kishore M