Skip to main content
# tinyurls

URL shortening service to be used in a microservices environment.

This service does the following:
1. Takes a long url and stores an md5 key and the url in a database table.
The md5 key is used to lookup the long url. This step returns a short link
with md5.
2. Takes a short link and redirects you to the long link.





## Installation
Clone code
```bash
git clone git@github.com:rangertaha/tinyurls.git
```
Use virtual environment
```bash
virtualenv env
source env/bin/activate

```
Change into tinyurls directory and install
```
cd tinyurls
python setup.py install

or

pip install tinyurls

```

## Execute
```bash
tinyurls -h
usage: tinyurls [-h] [-p PORT] [-d DATABASE]

optional arguments:
-h, --help show this help message and exit
-p PORT, --port PORT Port used for this service
-d DATABASE, --database DATABASE Database to use


tinyurls -p 9999

```

In a new terminal post the link to shorten
```bash
curl -X POST -H "Content-Type: text/plain" --data "https://www.google.com/search?q=tornado+logging+to+ELK&rlz=1C5CHFA_enUS752US752&oq=tornado+logging+to+ELK&aqs=chrome..69i57.9210j1j4&sourceid=chrome&ie=UTF-8" http://127.0.0.1:9999
http://127.0.0.1:9999/284380fea5eaf2464e06a3873647d324
```

In the browser go to `http://127.0.0.1:9999/284380fea5eaf2464e06a3873647d324`



Metadata

Release files for tinyurls 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for tinyurls 0.0.3
File Interpreter ABI Platform Actions
tinyurls-0.0.3-py3-none-any.whl Python 3 none any Details for tinyurls-0.0.3-py3-none-any.whl

Release files / tinyurls-0.0.3-py3-none-any.whl

Download URL tinyurls-0.0.3-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30bbf2e9d43222bfb6559b3e5bc93c6f6d9bb11e3f7d200fcf1a937d3841c7fe
BLAKE2b-256 checksum
How to use checksums
7a4e4700df096214e107df02dfc63887c620032e860e8a4a26795f391c1b1250
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.4

Security for tinyurls 0.0.3

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page