ReducePy logo

ReducePy

  •  0 ratings
In category: URL Shorteners

About ReducePy

URL shortener service using Tornado and Redis runs on Docker and Kubernetes.

  •   352  
  •   0  
  •   0  
  •   0  
Github stats:
  •  Commits: N/A  
  •   N/A  
  •   N/A  
  •  Latest commit: N/A  

Deploy this app to Linode with a free $100 credit!

Languages/Platforms/Technologies:
Lincenses:

More about ReducePy

======== ReducePy ========

.. image:: https://github.com/abdullahselek/ReducePy/workflows/ReducePy%20CI/badge.svg :target: https://github.com/abdullahselek/ReducePy/actions

.. image:: https://codecov.io/gh/abdullahselek/ReducePy/branch/master/graph/badge.svg :target: https://codecov.io/gh/abdullahselek/ReducePy :alt: Codecov

============ Introduction ============

Url shortener service using Tornado and Redis runs on Docker and Kubernetes.

================ Getting the code ================

The code is hosted at https://github.com/abdullahselek/ReducePy

Check out the latest development version anonymously with::

$ git clone git://github.com/abdullahselek/ReducePy.git
$ cd ReducePy

To install dependencies, run either::

$ pip install -Ur requirements.testing.txt
$ pip install -Ur requirements.txt

To install the minimal dependencies for production use run::

$ pip install -Ur requirements.txt

======================== Downloading Docker Image ========================

You can download docker image with::

docker pull abdullahselek/reducepy

and the docker page for the image https://hub.docker.com/r/abdullahselek/reducepy/.

============= Running Tests =============

The test suite can be run against a single Python version which requires pip install pytest and optionally pip install pytest-cov (these are included if you have installed dependencies from requirements.testing.txt)

To run the unit tests with a single Python version::

$ py.test -v

to also run code coverage::

$ py.test -v --cov-report xml --cov=reducepy

To run the unit tests against a set of Python versions::

$ tox

======== Commands ========


Run

Running up in Docker

.. code::

docker-compose up

Running in Kubernetes

  • For testing you can run reducepy in Kubernetes with using Docker. Run docker and then the following commands should work for you.

.. code::

# Use Docker for minikube
eval $(minikube docker-env)

# Create developments and pods
kubectl create -f deployment-redis.yml
kubectl create -f deployment-reducepy.yml

# Create services
kubectl create -f service-redis.yml
kubectl create -f service-reducepy.yml

# Get url for **reducepy**
minikube service reducepy --url

Sample Usage

.. code::

# Shorten url with POST
curl -i http://127.0.0.1 -F "url=https://github.com"

# Response
{
    "error": false,
    "shortened_url": "http://127.0.0.1/YjUwYQ"
}

# Redirect to original url
http://127.0.0.1/YjUwYQ

# Error case with invalid url
curl -i http://127.0.0.1 -F "url=github"

# Response
{
    "error": true,
    "message": "Please post a valid url"
}

# Error case with null url
curl -i http://127.0.0.1 -F "url="

# Response
{
    "error": true,
    "message": "Please post a url"
}

Comments (0)

Please login to join the discussion on this project.

ReducePy Reviews (0)

Overall Rating

None

based on 0 ratings

Please login to review this project.

No reviews for this project yet.

↑ back to top

pCloud Lifetime

Popular Projects

FluxBB

in Social Networks and Forums
 33k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Libreddit

in Social Networks and Forums
 7k    0    1    0  

CasaOS

in Self-hosting Solutions
 5k    0    0    0  

Dashboard

in Personal Dashboards
 5k    0    0    0  

Audiobookshelf

in Audio Streaming
 5k    0    1    0  

Mediagoblin

in Photo and Video Galleries
 4k    0    0    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Tube Archivist

in Automation
 3k    0    1    0  

OneDev

in Project Management
 2k    0    0    0  

iodine

in Proxy
 2k    0    0    0  

Alf.io

in Booking and Scheduling
 2k    0    0    0  

sysPass

in Password Managers
 1k    0    0    0  

Misskey

in Social Networks and Forums
 2k    0    0    0  
Linux VPS from $11/yr.
RackNerd VPS for $11.38/mo

Top Rated Projects

Gitea

 1 rating
in Project Management

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Pydio

 1 rating
in File Transfer & Synchronization

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Seafile

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

YOURLS logo
YOURLS cover

YOURLS

YOURLS is a set of PHP scripts that will allow you to run Y…

Simple-URL-Shortener logo
Simple-URL-Shortener cover

Simple-URL-Shortener

KISS URL shortener, public or private (with account). Minim…

Blink logo
Blink cover

Blink

Easy-to-host, SSO-integrated, CDN-powered link shortener (+…