All Projects → lepture → flask-shorturl

lepture / flask-shorturl

Licence: BSD-3-Clause license
Short URL generator for Flask.

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Flask-ShortUrl

Donate lepture Wheel Status Latest Version Travis CI Status Coverage Status

Short URL generator for Flask Project.

Installation

To install Flask-Shorturl, simply:

$ pip install Flask-ShortUrl

Or alternatively if you don't have pip:

$ easy_install Flask-ShortUrl

Usage

You can initialize the app:

from flask_shorturl import ShortUrl

su = ShortUrl(app)

url = su.encode_url(12)
uid = su.decode_url(url)

You may also init the app later:

su = ShortUrl()
su.init_app(app)

Configuration

Configurations for Flask project:

SHORT_URL_ALPHABET The alphabet to be used by Encoder, default value: mn6j2c4rv8bpygw95z7hsdaetxuk3fq
SHORT_URL_MIN_LENGTH default value: 5
SHORT_URL_BLOCK_SIZE default value: 24

Thanks

UrlEncoder from by Michael Fogleman.

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].