This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

python library for url minification.

Features

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

Installation

Install microurl via pip

$ pip install microurl

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

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

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

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

its as simple as that.

QR Generator

qr_url = qrcode(url)

Authentication for bitly

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.

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

Authentication using username and password

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

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.

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.

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.

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

bitly.user_info()

To get user link history in reverse chronological order.

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

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/

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

Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
microurl-0.1.1.tar.gz (13.1 kB) Copy SHA256 Checksum SHA256 Source Nov 11, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting