ReducePy logo

ReducePy

  •  0 ratings
In category: URL Shorteners

About ReducePy

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

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

Self-host this app for $0.99/mo only!

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

RackNerd Medium Rectangle Banner

Popular Projects

FluxBB

in Social Networks and Forums
 47k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 41k    1    1    0  

Teddit

in Social Networks and Forums
 26k    0    0    0  

Libre Translate

in Miscellaneous
 17k    0    0    0  

Dashboard

in Personal Dashboards
 15k    0    0    0  

Audiobookshelf

in Audio Streaming
 14k    0    1    0  

Libreddit

in Social Networks and Forums
 13k    0    1    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 41k    1    1    0  

Tube Archivist

in Automation
 7k    0    1    0  

OneDev

in Project Management
 5k    0    0    0  

iodine

in Proxy
 4k    0    0    0  

Alf.io

in Booking and Scheduling
 4k    0    0    0  

sysPass

in Password Managers
 2k    0    0    0  

Misskey

in Social Networks and Forums
 5k    0    0    0  
pCloud Lifetime

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

Shlink logo
Shlink cover

Shlink

URL shortener with REST API and command line interface. Inc…

Lstu logo
Lstu cover

Lstu

Lightweight URL shortener.

Clink logo
Clink cover

Clink

Dead-simple, super minimal URL shortener in C.