Make link shorter using cutt.ly API
Project description
Link cutter (via cutt.ly API)
Make your link shorter!
requires Redis server on the local machine! (read more below)
linkcutter
shortens links using services Cutt.ly API
Search parameters:
- link - original link (
http://example.com
) - key - API service key from cutt.ly (
8c20a834fa0982f435f85d937a9628da47e8f
)
Returned attributes for each link:
- status - status code (
7
) - fullLink - original link (
http://example.com
) - date - date of shortening the link (
18.07.2020
) - shortLink - shortened link (
https://cutt.ly/Pah5izz
) - title - website title (
Example Domain
)
Installation
pip3 install linkcutter
Usage
>>> import linkcutter
>>> link = linkcutter.get_link("http://example.com")
>>> link.status
7
>>> link.title
'Example Domain'
>>> link.shortLink
'https://cutt.ly/Pah5izz'
Redis server use!
This packet requires launched Redis server!
This is necessary to remember all the links that you shortened using this package. They can be obtained via redis-cli
using a short link as a key (via get
).
> get https://cutt.ly/Pah5izz
"http://example.com"
This function hasn't been finalized, I will try to finish it as soon as possible.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
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
linkcutter-0.0.1a2.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for linkcutter-0.0.1a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f62cebbc32a97bd5ab340b3c9bfde57b1cfb7c9d29c31cc480cba09c23038fe9 |
|
MD5 | 40a47aee5199761dc7cc11d4ec14614e |
|
BLAKE2b-256 | 8d5dd252aeacedd642f77aebee570c030beb8068590ac37502ba0075e493fdd1 |