Skip to main content

Short URL generaotr for Flask

Project description

https://travis-ci.org/lepture/flask-shorturl.png?branch=master https://coveralls.io/repos/lepture/flask-shorturl/badge.png?branch=master

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.

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

Flask-ShortUrl-0.1.1.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file Flask-ShortUrl-0.1.1.tar.gz.

File metadata

File hashes

Hashes for Flask-ShortUrl-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d5aba2fa19ae8d2dfc649cbf26b06e06504e74e51a6568a27c1c4e4ad21295b4
MD5 c20aea1604631f927e2403b79a65bbc1
BLAKE2b-256 5fb1f60ec8bd728b0b7446f3df28a3d97eff5ad59d2d695d02db352ecb065e49

See more details on using hashes here.

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