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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file linkcutter-0.0.1a2.tar.gz.

File metadata

  • Download URL: linkcutter-0.0.1a2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for linkcutter-0.0.1a2.tar.gz
Algorithm Hash digest
SHA256 f221540c469b7e603b76b1ae38c9e45be9544b1aee94f76684a96aaf5c747c3e
MD5 c28c14c9a10d2c09946a129c30eb19a3
BLAKE2b-256 ba4c6f7a79fd642f7788a1e973918032976ae2285fccbd41963d17e786836503

See more details on using hashes here.

File details

Details for the file linkcutter-0.0.1a2-py3-none-any.whl.

File metadata

  • Download URL: linkcutter-0.0.1a2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for linkcutter-0.0.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 f62cebbc32a97bd5ab340b3c9bfde57b1cfb7c9d29c31cc480cba09c23038fe9
MD5 40a47aee5199761dc7cc11d4ec14614e
BLAKE2b-256 8d5dd252aeacedd642f77aebee570c030beb8068590ac37502ba0075e493fdd1

See more details on using hashes here.

Supported by

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