Shorter
Simple flask app to create a short url service.
Creates a robust url shorten service with zero config.
Usage
Use pip to install shorter:
$ pip install shorter
Run with ‘shorter’:
$ shorter
Simple test:
$ curl --form "url=http://google.com" localhost:5000
cpYNkF
$ curl localhost:5000/cpYNkF
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to target URL: <a href="http://google.com">http://google.com</a>. If not click the link.
You may also try visit it using a browser.
Deploy
Deploy with gunicorn is easy:
$ gunicorn -w 4 -b 127.0.0.1:5000 shorter:app
Customize
Use a shorter_config.py to customize database uri:
# shorter_config.py example
SQLALCHEMY_DATABASE_URI = "sqlite:///shorter.db"
Metadata
Release files for shorter 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| shorter-0.1.2.tar.gz | 2.8 kB | Without provenance | Details |
Release files / shorter-0.1.2.tar.gz
| Download URL | shorter-0.1.2.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7629a8f9dbea08130659998b5bb9c55385a49fbfedc7438cf10c4c8fba9ec183
|
|
BLAKE2b-256 checksum How to use checksums |
aec2e5ccd844c3de0d538f6f7562fb870db880b584fdc3d77b8b1877b9c57905
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for shorter 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.