Self hostable url shortener
Project description
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.
Using Shortlinks
- Enter the long URL you want to shorten in the input field.
- Select an expiration time from the dropdown menu.
- Click the "Generate" button to create a shortened URL.
- Copy the shortened URL and share it as needed.
Deployment
To deploy Shortlinks on a server:
- Install Shortlinks on your server using pip.
- Run the Shortlinks server using the
shortlinks run
command. - Set up a reverse proxy (e.g., Nginx or Apache) to forward requests to the Shortlinks application.
- Configure your firewall to allow traffic on the desired port.
- (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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file shortlinks-0.1.1.tar.gz
.
File metadata
- Download URL: shortlinks-0.1.1.tar.gz
- Upload date:
- Size: 6.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.2 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ec663ba2fbdceb96a1a0018418f4c5f84d034114bb04ed4ce631f2cbdeb9aed |
|
MD5 | 0ee071374e18320abc33623f5307db66 |
|
BLAKE2b-256 | dcd74ba3ad87c001129e2ff0c2824463736c266c579198bbdabfaf8442fa0e27 |
File details
Details for the file shortlinks-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: shortlinks-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.2 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0f91a83a6a98a767a2068558ddda47a39e90e21c0544aefe5a733108c8091fa |
|
MD5 | f71debf597e39f453075150a6a5bee3b |
|
BLAKE2b-256 | b6eef84bae0739790d175b0c19461d921968a7710ef627a7699dda961d9a69e8 |