URL Shortener using s.lain.la API.
Project description
lain.la-link-shortener
URL Shortener using s.lain.la API.
Installation
Via PyPI (Recommended)
# Basic installation
pip install lain-shorten
# With clipboard support (recommended for desktop)
pip install lain-shorten[clipboard]
From Source (Development)
git clone git@github.com:NecRaul/lain.la-link-shortener.git
cd lain.la-link-shortener
# You can skip the next two commands
# for installing it globally
python -m venv .venv
source .venv/bin/activate
pip install -e .[clipboard,dev,build]
Usage
Simply provide a URL, and the tool will automatically handle protocol validation and formatting.
# Shorten a URL
lain-shorten https://kuroneko.dev
# Protocol-less (automatically prepends https://)
lain-shorten kuroneko.dev
Dependencies
- requests: send the API request for shortening.
Optional
- pyperclip: copy the shortened URL to the clipboard.
How it works
The s.lain.la service allows shortening URLs via a POST request.
This tool automates the process to avoid typing long curl strings.
The Manual Way
curl -d "url=https://kuroneko.dev" https://s.lain.la
The lain-shorten way
- Validation: Uses
urllibto ensure the URL is formatted correctly. - API Request: Sends the
POSTrequest viarequests. - Normalization: Automatically adds
https://if missing. - Clipboard (Optional): If
pyperclipis installed, the result is instantly copied to your clipboard.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lain_shorten-1.15.tar.gz.
File metadata
- Download URL: lain_shorten-1.15.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72001f1288c07958e7c1a19b8473f074081a5b684f6fd54e7d82f5f74b1d092c
|
|
| MD5 |
91dff774b4cfc2da664d5f6ce17d4f1e
|
|
| BLAKE2b-256 |
9519c9a7becf941eec8779385f549be3b754cda982a10ed26786f5bfbb89009a
|
Provenance
The following attestation bundles were made for lain_shorten-1.15.tar.gz:
Publisher:
publish.yml on NecRaul/lain.la-link-shortener
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lain_shorten-1.15.tar.gz -
Subject digest:
72001f1288c07958e7c1a19b8473f074081a5b684f6fd54e7d82f5f74b1d092c - Sigstore transparency entry: 791049252
- Sigstore integration time:
-
Permalink:
NecRaul/lain.la-link-shortener@6d11dfaf6f0b50856224acc87158b72da2689013 -
Branch / Tag:
refs/heads/release - Owner: https://github.com/NecRaul
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6d11dfaf6f0b50856224acc87158b72da2689013 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lain_shorten-1.15-py3-none-any.whl.
File metadata
- Download URL: lain_shorten-1.15-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
654edb75cb4e3c3dc9ab3a4090e386a510ab2b4e4fe3d32f23b70c5176217b7a
|
|
| MD5 |
1747f6d85d9d9643bc508fe0f6ee7e9d
|
|
| BLAKE2b-256 |
345bc53c674d8ad625ba0bbf427e0d70520236575eaea43413d6d98408bb2592
|
Provenance
The following attestation bundles were made for lain_shorten-1.15-py3-none-any.whl:
Publisher:
publish.yml on NecRaul/lain.la-link-shortener
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lain_shorten-1.15-py3-none-any.whl -
Subject digest:
654edb75cb4e3c3dc9ab3a4090e386a510ab2b4e4fe3d32f23b70c5176217b7a - Sigstore transparency entry: 791049257
- Sigstore integration time:
-
Permalink:
NecRaul/lain.la-link-shortener@6d11dfaf6f0b50856224acc87158b72da2689013 -
Branch / Tag:
refs/heads/release - Owner: https://github.com/NecRaul
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6d11dfaf6f0b50856224acc87158b72da2689013 -
Trigger Event:
push
-
Statement type: