All Projects β†’ MicroPyramid β†’ Microurl

MicroPyramid / Microurl

Licence: gpl-2.0
python library for url minification.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Microurl

jlik.me
URL Shortener project.
Stars: ✭ 31 (-26.19%)
Mutual labels:  url-shortener
Polr
🚑 A modern, powerful, and robust URL shortener
Stars: ✭ 4,147 (+9773.81%)
Mutual labels:  url-shortener
Zws
Shorten URLs using invisible spaces.
Stars: ✭ 780 (+1757.14%)
Mutual labels:  url-shortener
elbo
Source code for elbo.in, an URL shortening service
Stars: ✭ 23 (-45.24%)
Mutual labels:  url-shortener
Shortme
Yet Another URL Shortening Service in Golang
Stars: ✭ 269 (+540.48%)
Mutual labels:  url-shortener
Urlhum
The modern, privacy-aware URL Shortener built in PHP.
Stars: ✭ 513 (+1121.43%)
Mutual labels:  url-shortener
shuri
Simple url shortener script
Stars: ✭ 15 (-64.29%)
Mutual labels:  url-shortener
Koochooloo
Make your URLs shorter (smaller) and more memorable in Go
Stars: ✭ 29 (-30.95%)
Mutual labels:  url-shortener
Mnmlurl
πŸ”— Minimal URL - Modern URL shortener with support for custom alias & can be hosted even in GitHub pages [DEPRECATED]
Stars: ✭ 311 (+640.48%)
Mutual labels:  url-shortener
Shlink
The definitive self-hosted URL shortener
Stars: ✭ 727 (+1630.95%)
Mutual labels:  url-shortener
djanurl
Django URL shortener project
Stars: ✭ 22 (-47.62%)
Mutual labels:  url-shortener
ShortLink
𝓒𝓱𝓸𝓻𝓽𝓛𝓲𝓷𝓴 is a simple (yet powerful) URL Shortening script πŸ”₯πŸ’₯⚑
Stars: ✭ 25 (-40.48%)
Mutual labels:  url-shortener
Kutt
Free Modern URL Shortener.
Stars: ✭ 5,480 (+12947.62%)
Mutual labels:  url-shortener
gitio
create short / vanity github urls from the terminal
Stars: ✭ 32 (-23.81%)
Mutual labels:  url-shortener
Gh Pages Url Shortener
Minimal URL shortener that can be entirely hosted on GitHub pages.
Stars: ✭ 924 (+2100%)
Mutual labels:  url-shortener
trym
πŸ”— A modern URL shortener
Stars: ✭ 29 (-30.95%)
Mutual labels:  url-shortener
Bitly
A Ruby wrapper for the bit.ly API
Stars: ✭ 435 (+935.71%)
Mutual labels:  url-shortener
Longurl
ℹ️ Small R package for no-API-required URL expansion
Stars: ✭ 30 (-28.57%)
Mutual labels:  url-shortener
Bloggerjs
Script para modificar el formato de las URL en un blog de Blogger.
Stars: ✭ 28 (-33.33%)
Mutual labels:  url-shortener
Pygmy
An open-source, feature rich & extensible url-shortener + analytics written in Python πŸͺ
Stars: ✭ 569 (+1254.76%)
Mutual labels:  url-shortener

.. image:: https://readthedocs.org/projects/microurl/badge/?version=latest :target: http://microurl.readthedocs.io/en/latest/?badge=latest .. image:: https://img.shields.io/pypi/v/microurl.svg :target: https://pypi.python.org/pypi/microurl .. image:: https://travis-ci.org/MicroPyramid/microurl.svg?branch=master :target: https://travis-ci.org/MicroPyramid/microurl .. image:: https://coveralls.io/repos/github/MicroPyramid/microurl/badge.svg?branch=master :target: https://coveralls.io/github/MicroPyramid/microurl?branch=master .. image:: https://img.shields.io/pypi/l/microurl.svg :target: https://pypi.python.org/pypi/microurl/

python library for url minification.

Features

  • Google
    • URL Minifier
    • QR Generator
  • Bitly
    • URL Minifier

Installation

Install microurl via pip <https://pypi.python.org/pypi/microurl/>_

.. code-block:: bash

$ pip install microurl

Or, if you want the code that is currently on GitHub

.. code-block:: bash

git clone git://github.com/micropyramid/microurl.git
cd microurl
python setup.py install

Starting Out

First, you'll want to head over to google or bily or supr and register an application!

After you register, grab your applications Consumer Key and Consumer Secret from the application details tab.

First, you'll want to import your desired minfier from microurl

.. code-block:: python

from microurl import google_mini

Basic Usage Of Google Mini

Function definitions (i.e. google_mini()) can be found by reading over microurl/google.py

.. code-block:: python

minified = google_mini('validurl', 'Google_API_KEY')

its as simple as that.

QR Generator

.. Code-block:: python

qr_url = qrcode(url)

Authentication for bitly

.. code-block:: python

from microurl import bitlyauthentication

authentication = bitlyauthentication(client_id, client_secret, redirect_uri)

auth_url=authentication.authorization_url()

open auth_url in your browser.After authorizing app, you will be redirected to redirect_url with code perameter.

.. code-block:: python

access_token=authentication.get_accesstoken_from_code(code) # code that you get to redirect_url in the above step

Authentication using username and password

.. code-block:: python

access_token=authentication.get_accesstoken_from_username_pwd(bitlyusername or login email,password)

Basic Usage of Bitly

Function definitions (i.e. shorturl()) can be found by reading over microurl/bitly.py

.. code-block:: python

from microurl import bitlyapi

bitly=bitlyapi(access_token) # access_token is getting from previous steps

minified=bitly.shorturl(longurl,domain)['url'] # domain is optional here

To get detail information of bitlylink.

.. code-block:: python

bitly.url_info(bitlylink,expand_user='True | False',hash='one or more bitly hashes') # expand_user,hash are optional here

To get the number of clicks on a single bitly link.

.. code-block:: python

bitly.link_clicks(bitlylink, unit="day", units=10, timezone=-4, limit=20, unit_reference_ts="now")

# here except bitlylink all are optional

To get the number of shares on a single bitly link.

.. code-block:: python

bitly.link_shares(bitlylink, unit="day", units=10, timezone=-4, limit=20, unit_reference_ts="now")

# here except bitlylink all are optional

To get loggedin user info

.. code-block:: python

bitly.user_info()

To get user link history in reverse chronological order.

.. code-block:: python

bitly.user_linkhistory(bitlylink, limit=20, offset=1, created_after='1381000000', created_before='1381844314', expand_client_id=True, archived="both", private="both")

# here all fields are optional

Questions, Comments, etc?

https://github.com/MicroPyramid/microurl/issues

Want to help?

microurl is useful, but ultimately only as useful as the people using it (say that ten times fast!). If you'd like to help, write example code, contribute patches, document things on the wiki, tweet about it. Your help is always appreciated!

For more Updates

https://micropyramid.com/oss/

Visit our Python Development page Here_

We welcome your feedback and support, raise github ticket if you want to report a bug. Need new features? Contact us here_

.. _contact us here: https://micropyramid.com/contact-us/ .. _Here: https://micropyramid.com/python-development-services/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].