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.
Release files for Flask-ShortUrl 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Flask-ShortUrl-0.2.0.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Flask_ShortUrl-0.2.0-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 11.2 kB
Release files / Flask-ShortUrl-0.2.0.tar.gz
| Download URL | Flask-ShortUrl-0.2.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2c0b85396009d36a7ce13dc7be032f04e5c2fccaedf23f766c967faed07fa1e
|
|
BLAKE2b-256 checksum How to use checksums |
e6f1be75f7651b1f7b1d030794d84242242ee6577aec547154db9393fdbdd92c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / Flask_ShortUrl-0.2.0-py2-none-any.whl
| Download URL | Flask_ShortUrl-0.2.0-py2-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
a3e586e4faaa813b59aff00c3efd346c5b1e587947d343c72adaa1476ea83355
|
|
BLAKE2b-256 checksum How to use checksums |
8adc64a8cc2f9ba095f4dca35ca266d090084d5321864d2a348e501329d96501
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |