Skip to content

jasoncartercs/URLShortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URLShortener

This is a URL Shortener written as a Flask App.

It takes a post request on the route shorten_url.

The json should look like this: { "url": "abc.com" }

It returns a json string that contains the response code the the shortened url: { "code": 200, "data": "https://r.com/ON0Euc" }

This code stores information in one table using a SQLite database.

The structure is: CREATE TABLE IF NOT EXISTS url( id integer PRIMARY KEY, long_url text NOT NULL, short_url text NOT NULL, );

I have included the SQLite database to make it easy to run the project. Typically, I would not include this in the repo.

About

This project is a code sample for a URL Shortener API in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages