{"id":18603758,"url":"https://github.com/abdullahselek/reducepy","last_synced_at":"2025-04-11T05:37:00.340Z","repository":{"id":71933184,"uuid":"112369804","full_name":"abdullahselek/ReducePy","owner":"abdullahselek","description":"URL shortener service using Tornado and Redis runs on Docker and Kubernetes.","archived":false,"fork":false,"pushed_at":"2022-04-03T19:39:46.000Z","size":81,"stargazers_count":33,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T03:34:58.385Z","etag":null,"topics":["docker","kubernetes","microservice","python","redis","tornado","url-shortener"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abdullahselek.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-11-28T17:58:04.000Z","updated_at":"2025-03-23T14:16:27.000Z","dependencies_parsed_at":"2023-05-29T08:00:25.007Z","dependency_job_id":null,"html_url":"https://github.com/abdullahselek/ReducePy","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahselek%2FReducePy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahselek%2FReducePy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahselek%2FReducePy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahselek%2FReducePy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdullahselek","download_url":"https://codeload.github.com/abdullahselek/ReducePy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248349615,"owners_count":21089085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","kubernetes","microservice","python","redis","tornado","url-shortener"],"created_at":"2024-11-07T02:15:24.313Z","updated_at":"2025-04-11T05:37:00.319Z","avatar_url":"https://github.com/abdullahselek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"========\nReducePy\n========\n\n.. image:: https://github.com/abdullahselek/ReducePy/workflows/ReducePy%20CI/badge.svg\n    :target: https://github.com/abdullahselek/ReducePy/actions\n\n.. image:: https://codecov.io/gh/abdullahselek/ReducePy/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/abdullahselek/ReducePy\n    :alt: Codecov\n\n============\nIntroduction\n============\n\nUrl shortener service using `Tornado` and `Redis` runs on `Docker` and `Kubernetes`.\n\n================\nGetting the code\n================\n\nThe code is hosted at https://github.com/abdullahselek/ReducePy\n\nCheck out the latest development version anonymously with::\n\n    $ git clone git://github.com/abdullahselek/ReducePy.git\n    $ cd ReducePy\n\nTo install dependencies, run either::\n\n    $ pip install -Ur requirements.testing.txt\n    $ pip install -Ur requirements.txt\n\nTo install the minimal dependencies for production use run::\n\n    $ pip install -Ur requirements.txt\n\n========================\nDownloading Docker Image\n========================\n\nYou can download docker image with::\n\n    docker pull abdullahselek/reducepy\n\nand the docker page for the image https://hub.docker.com/r/abdullahselek/reducepy/.\n\n=============\nRunning Tests\n=============\n\nThe 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``)\n\nTo run the unit tests with a single Python version::\n\n    $ py.test -v\n\nto also run code coverage::\n\n    $ py.test -v --cov-report xml --cov=reducepy\n\nTo run the unit tests against a set of Python versions::\n\n    $ tox\n\n========\nCommands\n========\n\n---\nRun\n---\n\nRunning up in Docker\n\n.. code::\n\n    docker-compose up\n\nRunning in Kubernetes\n\n- For testing you can run **reducepy** in **Kubernetes** with using **Docker**. Run docker and then the following\ncommands should work for you.\n\n.. code::\n\n    # Use Docker for minikube\n    eval $(minikube docker-env)\n\n    # Create developments and pods\n    kubectl create -f deployment-redis.yml\n    kubectl create -f deployment-reducepy.yml\n\n    # Create services\n    kubectl create -f service-redis.yml\n    kubectl create -f service-reducepy.yml\n\n    # Get url for **reducepy**\n    minikube service reducepy --url\n\n------------\nSample Usage\n------------\n\n.. code::\n\n    # Shorten url with POST\n    curl -i http://127.0.0.1 -F \"url=https://github.com\"\n\n    # Response\n    {\n        \"error\": false,\n        \"shortened_url\": \"http://127.0.0.1/YjUwYQ\"\n    }\n\n    # Redirect to original url\n    http://127.0.0.1/YjUwYQ\n\n    # Error case with invalid url\n    curl -i http://127.0.0.1 -F \"url=github\"\n\n    # Response\n    {\n        \"error\": true,\n        \"message\": \"Please post a valid url\"\n    }\n\n    # Error case with null url\n    curl -i http://127.0.0.1 -F \"url=\"\n\n    # Response\n    {\n        \"error\": true,\n        \"message\": \"Please post a url\"\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahselek%2Freducepy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdullahselek%2Freducepy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahselek%2Freducepy/lists"}