Skip to main content

buildlink

Last Update

Available on Pypi Awesome Badges

buildlink is a python program which helps you to shorten link with a single command without any registration or using any API Key. Its is capable of expanding any link available on internet. with support of wide range of domain names.

Features

buildlink has ability to shorten any long url into short url using 5 different service providers along with custom alias for shorten link


Note : alias for link shortening must be less than 30 characters.
i.e. shorten("url", alias="less than 30 char")

with the help of expand() , you can expand any shorten link available on internet to their long form without visiting really to that link.
This is helpful when you get malicious short link and you want to know actual URL behind the shorten one, without clicking on the Link.

Functions

  • expand(url)

This function takes one input as a parameter and return the Long URL associated with the short link.
Return Type : string

expand("https://tinyurl.com/yuxh3b37")

# Output : https://github.com/TechUX/buildlink

See Examples

  • shorten(url, service, alias)

This function takes three parameters as a input, url, service for shortening, and alias .
Return Type : list - list of shortened URL , if no service is privided

shorten("https://github.com/TechUX/buildlink", service="tinyurl")

# Output : https://tinyurl.com/yuxh3b37

See Examples

  • help()

This function display a basic help page of the package.

Options

There are 5 options which is available for service.
These are as follow :

Service Domain
tinyurl tinyurl.com
isgd is.gd
clckru clck.ru
chilpit chilp.it
daga da.gd

Note : length of alias must be less than 30 characters.

Examples

import buildlink as link

long_url = "https://github.com/TechUX/buildlink/blob/main/README.md"

shorten_url = link.shorten(long_url)

print(shorten_url)

# Output : ['https://tinyurl.com/2mksjsq7', 'https://is.gd/e8tsIB', 'https://clck.ru/33GnAf', 'http://chilp.it/6c70182\n', 'https://da.gd/tsttQ\n']

Shortening with service specified

for this, just add the service="<service_value> parameter.

import buildlink as link

long_url = "https://github.com/TechUX/buildlink/blob/main/README.md"

shorten_url = link.shorten(long_url, service="tinyurl")

print(shorten_url)

# Output : https://tinyurl.com/2mksjsq7

Shortening with alias

import buildlink as link

long_url = "https://github.com/TechUX/buildlink/blob/main/README.md"

shorten_url = link.shorten(long_url, alias="pylink")

print(shorten_url)

# Output : https://is.gd/pylink
import buildlink as link

short_url = "https://is.gd/pylink"

long_url = link.expand(short_url)

print(longurl)

# Output : https://github.com/TechUX/buildlink/blob/main/README.md

Supported Domain for link shortening

this package is currently using 5 domains to short link : These are as follow

Supported Domain for link expanding

Almost all the shorten domains are supported for expansion. buildlink supports a wide range of URL shortening services, including t.co, goo.gl, bit.ly, amzn.to, tinyurl.com, ow.ly, youtu.be, rg.gy, adf.ly and many others.

Issues & Pull Requests

If you find any issue or bug in the package, kindly post it on Issue page . Go to Issue page

New Ideas and Innovations are always welcomed. Create a pull request if you want to add something new or have a fix of any bug.
Click here for Pull Request

About

A simple , lghtweight python package which have ability of shortening and expanding links.
You can shorten a long URL with 5 different services and also expand any shorten URL of internet to its original Long form in a single Click.
Try this package now. Its available on pypi.

Author & License

Awesome Badges
Author : Devesh Singh [ GitHub: @TechUX | Instagram : @devesh92744 : @code.radius ]

License This project is under MIT License.
Click Here for detailed License

Metadata

Release files for buildlink 1.0.0

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

Source distribution (sdist)

Source distribution for buildlink 1.0.0
File Size Uploaded Provenance Actions
buildlink-1.0.0.tar.gz 5.2 kB Without provenance Details for buildlink-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 11.0 kB

Security for buildlink 1.0.0

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

1.0.0 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