Skip to main content

Shortlinks

Shortlinks is a self-hostable URL shortener built using Python. It's a self-contained package that can be easily installed via PyPI and run on your local machine or deployed on a server. This lightweight and efficient tool allows you to create and manage shortened URLs with custom expiration times.

Features

  • Create shortened URLs quickly and easily
  • Set custom expiration times for links (30 seconds, 60 seconds, 3 minutes, or never expire)
  • Self-hosted solution for better privacy and control
  • Simple and intuitive web interface
  • Fast and efficient redirection

Requirements

  • Python 3.7+
  • pip (Python package manager)

Installation

Shortlinks is available on PyPI and can be installed with pip:

pip install shortlinks

This command will install Shortlinks and all its dependencies.

Usage

To run the Shortlinks server, simply use the following command:

shortlinks run

By default, the server will run on http://localhost:8000.

Open your web browser and go to http://localhost:8000 to access the Shortlinks interface.

Configuration (Optional)

You can customize the host and port by passing arguments when running the server:

shortlinks run

This will run the server on all available network interfaces on port 5000.

  1. Enter the long URL you want to shorten in the input field.
  2. Select an expiration time from the dropdown menu.
  3. Click the "Generate" button to create a shortened URL.
  4. Copy the shortened URL and share it as needed.

Deployment

To deploy Shortlinks on a server:

  1. Install Shortlinks on your server using pip.
  2. Run the Shortlinks server using the shortlinks run command.
  3. Set up a reverse proxy (e.g., Nginx or Apache) to forward requests to the Shortlinks application.
  4. Configure your firewall to allow traffic on the desired port.
  5. (Optional) Set up SSL/TLS for secure connections.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.


For more information or support, please open an issue on the GitHub repository.

Metadata

Release files for shortlinks 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shortlinks 0.1.1
File Size Uploaded Provenance Actions
shortlinks-0.1.1.tar.gz 6.1 MB Without provenance Details for shortlinks-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shortlinks 0.1.1
File Interpreter ABI Platform Actions
shortlinks-0.1.1-py3-none-any.whl Python 3 none any Details for shortlinks-0.1.1-py3-none-any.whl

Total release size: 12.3 MB

Security for shortlinks 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page