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 runcommand. - 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.
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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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
Release files / shortlinks-0.1.1.tar.gz
| Download URL | shortlinks-0.1.1.tar.gz |
|---|---|
| Size | 6.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ec663ba2fbdceb96a1a0018418f4c5f84d034114bb04ed4ce631f2cbdeb9aed
|
|
BLAKE2b-256 checksum How to use checksums |
dcd74ba3ad87c001129e2ff0c2824463736c266c579198bbdabfaf8442fa0e27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.2 Darwin/23.5.0
|
Release files / shortlinks-0.1.1-py3-none-any.whl
| Download URL | shortlinks-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0f91a83a6a98a767a2068558ddda47a39e90e21c0544aefe5a733108c8091fa
|
|
BLAKE2b-256 checksum How to use checksums |
b6eef84bae0739790d175b0c19461d921968a7710ef627a7699dda961d9a69e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.2 Darwin/23.5.0
|
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.