About Pygmy
Pygmy is a URL shortener and analytics tool written in Python, designed to be easy to host and run as your own custom shortener. Its architecture is loosely coupled so custom integrations can be added without much effort.
The project has three parts: the core shortening code, a REST API built with Flask, and a Django-based user interface. Features include custom short URLs, links that expire automatically, secret key protected URLs, user sign-up and login, a dashboard for tracked links, and link statistics that you reach by adding a plus sign to the short URL.
It supports PostgreSQL, MySQL and SQLite through SQLAlchemy, uses JWT for API authentication, and can be run with Docker using the published image or set up manually from source. Pygmy is MIT licensed, and a public demo shows how it works. It suits individuals and small teams who want their own branded short links.
Key features
- URL shortening with custom aliases
- Auto-expiring short links
- Secret key protected URLs
- Link analytics via plus-sign suffix
- User accounts and dashboard
- REST API built on Flask
- PostgreSQL, MySQL or SQLite storage
Good fit for
- โSelf-hosted branded short links
- โTracking clicks on shared URLs
- Tags
- url-shortener
- analytics
- python
- flask
- django
- docker
- link-analytics
- self-hosted
Pygmy: questions and answers
- What is Pygmy used for?
- Pygmy is an open-source URL shortener written in Python with link analytics, custom short URLs, expiring links and a user dashboard. It is a good fit for self-hosted branded short links and tracking clicks on shared URLs.
- Is Pygmy open source?
- Yes. Pygmy is open source under the MIT licence. Its source code is on GitHub at amitt001/pygmy and is written mainly in Python.
- Is Pygmy free?
- Yes. Pygmy is open source, so the software itself is free to use.
- Can I self-host Pygmy?
- Yes. Pygmy can be self-hosted on your own server or infrastructure.
- What is Pygmy an alternative to?
- Pygmy is an open-source alternative to Rebrandly, Short.io and Bitly. Other open-source alternatives to Rebrandly include YOURLS, Kutt and Shlink.
- Is Pygmy actively maintained?
- The most recent commit to Pygmy was on 7 March 2024, and the latest release is 1.2, published on 25 May 2019. The project has 728 stars on GitHub.
Open-source alternatives to Pygmy
See all
YOURLS
Marketing & SEO
๐ The ๐ฅ๐ฆ ๐ง๐ข๐ค๐ต๐ฐ standard, self hosted, powerful and customizable, URL shortener in
MITvs Bitlyโ 12k
Kutt
Marketing & SEO
Free Modern URL Shortener.
MITvs Bitlyโ 11k
Shlink
Marketing & SEO
The definitive self-hosted URL shortener
MITvs Bitlyโ 5.3kPolr
Marketing & SEO
:aerial_tramway: A modern, powerful, and robust URL shortener
GPL-2.0vs Rebrandlyโ 5.1k
Dub
Marketing & SEO
The modern link attribution platform. Loved by world-class marketing teams like Framer, Pe
OSSvs Bitlyโ 25k
Sink
Marketing & SEO
โก A Simple, Speedy, Secure, and Serverless Link Shortener with Analytics, Running Entirely
AGPL-3.0vs Short.ioโ 7.2k
SaaS alternatives to Pygmy
See all
Rebrandly
Marketing & SEO
Branded short link manager with custom domains and click tracking
SaaS
Short.io
Marketing & SEO
Custom-domain link shortener with analytics and deep links
SaaS
Bitly
Marketing & SEO
URL shortener and link management with QR codes and click analytics
SaaS
Click Dash
Marketing & SEO
URL shortener and file sharing tool with click analytics
SaaS
Clksy
Marketing & SEO
Short links with channel tagging, click analytics and weekly digests
SaaS
Dijital Link
Marketing & SEO
Link shortener, link in bio page builder and QR code tool in one platform
SaaS

