Skip to main content

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)

PyPI GitHub issues Maintainability GitHub

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

MIT

Project details


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)

Uploaded Source

Built Distribution

linkcutter-0.0.1a2-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page