
Bitly
URL shortening and link management service for creating concise, trackable links with analytics
Discover top open-source software, updated regularly with real-world adoption signals.

Self-hosted URL shortener with analytics and custom links
Pygmy is an extensible, Python-based URL shortener with custom short codes, expiry options, secret protection, user dashboards, and built-in link analytics.

Pygmy is a Python URL shortener designed for teams and individuals who want full control over their link infrastructure. Built with a loosely coupled architecture, it separates core shortening logic, a Flask-based REST API, and a Django UI layer, making it easy to integrate or extend.
Create custom short URLs, set automatic expiration times, and protect links with secret keys. Users can sign up to track their shortened URLs and access detailed analytics by appending a + to any short link. The dashboard provides visibility into link performance and usage patterns.
Pygmy supports SQLite, MySQL, and PostgreSQL, and ships with Docker images for rapid deployment. Whether you're running a personal instance or deploying for an organization, the straightforward setup and configuration files make hosting simple. The REST API enables programmatic link creation and management, while the shell interface supports scripting and automation workflows.
When teams consider Pygmy, these hosted platforms usually appear on the same shortlist.
Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.
Internal Marketing Campaigns
Marketing teams create branded short links with expiration dates for time-sensitive promotions, tracking click-through rates via the built-in analytics dashboard.
Secure Document Sharing
Operations teams generate secret-protected short URLs for confidential documents, ensuring only authorized recipients with the key can access the content.
API-Driven Link Management
Developers integrate Pygmy's REST API into existing applications to programmatically shorten URLs, retrieve analytics, and manage link lifecycles without manual intervention.
Personal Link Organization
Individuals self-host Pygmy to create memorable short links for portfolios, blogs, and social profiles, maintaining full ownership and privacy of their data.
Pygmy works with SQLite (default), MySQL, and PostgreSQL. You configure the database engine, credentials, and connection details in the pygmy.cfg file.
Append a plus sign (+) to the end of any short URL (e.g., demo.pygy.co/pygmy+) to access detailed link statistics including hit counters and timestamps.
Yes, Pygmy supports custom short URLs. You can specify your own short code when creating a link, such as pygy.co/pygmy, instead of accepting an auto-generated code.
Pygmy's architecture separates the Flask REST API and Django UI layer, but the included run.py script uses gunicorn to serve both components together for simplified deployment.
Yes, Pygmy includes a shell interface (./shell) that provides a Python REPL with context for shortening, unshortening, and managing links programmatically without the web UI.
Project at a glance
DormantLast synced 4 days ago