{"id":24680587,"url":"https://github.com/fantaso/url-shortener-api","last_synced_at":"2026-04-17T01:31:14.796Z","repository":{"id":104579955,"uuid":"223085769","full_name":"Fantaso/url-shortener-api","owner":"Fantaso","description":"Url shortener API with Django and django rest framework. Project consists to allow a user to transform a long web url into a pattern-consistent (encoded) small url easy to share and remember.","archived":false,"fork":false,"pushed_at":"2019-11-25T18:17:10.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T19:45:25.717Z","etag":null,"topics":["django","django-rest-framework","postman","python3","sqlite3"],"latest_commit_sha":null,"homepage":"https://github.com/Fantaso/url-shortener-api","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fantaso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-21T04:08:56.000Z","updated_at":"2019-12-05T20:44:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"56bad4fa-bf70-4807-a309-4d0dd361f721","html_url":"https://github.com/Fantaso/url-shortener-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Fantaso/url-shortener-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fantaso%2Furl-shortener-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fantaso%2Furl-shortener-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fantaso%2Furl-shortener-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fantaso%2Furl-shortener-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fantaso","download_url":"https://codeload.github.com/Fantaso/url-shortener-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fantaso%2Furl-shortener-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31911428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["django","django-rest-framework","postman","python3","sqlite3"],"created_at":"2025-01-26T14:13:55.982Z","updated_at":"2026-04-17T01:31:14.788Z","avatar_url":"https://github.com/Fantaso.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- logo --\u003e\n\u003ca href=\"https://github.io/fantaso\"\u003e\n\u003cimg src=\"/readme/fantaso.png\" align=\"right\" /\u003e\n\u003c/a\u003e\n\n\u003c!-- header --\u003e\n\u003ch1 style=\"text-align: left; margin-top:0px;\"\u003e\n  Url Shortener API\n\u003c/h1\u003e\n\n\u003e Url shortener API with Django and django rest framework.\n\n\u003c!-- build --\u003e\n\u003c!-- [![Build Status][travis-image]][travis-link] --\u003e\n\n\n\n\nProject consists to allow a user to transform a long web url into a\npattern-consistent (encoded) small url easy to share and remember.\n\nAt the same time the user is allowed to transform back (decode)\nthe small url into the original url \n\nIt is partly tested as only and was developed as showcase only.\n\n\n\n\nHow Url Shortener API Works:\n- You can send (POST) a full url and retrieve a small encoded one with tier.app as the base web service url.\n\n    Eg. POST http://localhost:8000/shorten-url\n        with https://python.org/long-url\n        result: https://tier.app/sY6f3J (6 digits id)\n    \n- You can get the original url with the encoded url on a GET request (done in previous step)\n\n    Eg. GET https://tier.app/sY6f3J\n        result: https://python.org/long-url\n        \n\n\u003cbr\u003e\u003cbr\u003e\n\n## Index:\n- #### Installation\n    1. Installing Django API App\n\n- #### Usage:\n    1. Available Endpoints\n    2. Tests INFO \u0026 GUI testing\n\n- #### What's Next:\n    1. thoughts on improving it.\n        - Testing\n        - API\n        - Database\n        - DevOps\n\n- #### Information:\n- #### Maintainer\n\n\n\u003cbr\u003e\u003cbr\u003e\n\n\n## Installation:\n#### 1.Installing Django API App\n\n1. Clone repository and go inside the repository folder \"url-shortener-api\"\n```sh\ngit clone https://github.com/Fantaso/url-shortener-api.git\n```\n\n2. Create you virtualenv and install the packages\n```sh\npip install -r requirements.txt\n```\n\n3. Initialize database and create the database mapping used for persistance in the url shortener API.\n```sh\npython manage.py makemigrations\n```\n\n4. Apply the database mapping from the app to the database; migrate the database.\n```sh\npython manage.py migrate\n```\n\n5. Run the application.\n```sh\npython manage.py runserver\n```\n\n\n\u003cbr\u003e\n\n## USAGE\n#### 1. Endpoint List\nURI Example: `http://localhost:8000/shorten-url/`\n\n\n| | Available Methods | URI | Example URL |\n| -: | :- | :- | -: |\n| | | | |\n| | **Project Endpoints** | | |\n| 1. | `POST` | `shorten-url/` | `http://localhost:8000/shorten-url` |\n| 2. | `GET`  | `/\u003cshort_id\u003e` | `http://localhost:8000/\u003cshort_id\u003e` |\n\n\n\u003cbr\u003e\n\n\n#### 2. Tests INFO\n\n1. Run the Url Shortener API app tests locally with:\n```sh\npython manage.py test\n```\n\n###### Access and Interact with a GUI app (Postman)\nTo interact and start using the API, you will need a tool send HTTP requests to your api. I have develop a list of request to test and interact with the api with Postman. You will need to download the Postman Desktop app or the Web Browser plug in for Chrome. Click on the button below to guide you to download the app with the list of request I have developed to test the api fast.\n\n[![Run in Postman][postman-button-svg]][postman-button-link]\n\n\u003cbr\u003e\n\n\n## WHATS NEXT\n#### 1. Thoughts on improving it.\n\n###### Testing\n- integrate functional testing into the django app\n- finish testing and refactor repetitive code\n- set up test coverage for reporting\n- set up linting flake8 to check for styling and consistency\n- add personalized assert messages and setup error message separated structure\n###### API\n- set up error handling and eliminate chunks of ugly try:\n- set up rest full service (if required (del, list, ...))\n- do short url should expire set up?\n- refactor\n###### Database\n- set up a second db for stats\n- set up and split stats and ShortUrl models\n###### DevOps\n- set up automated testing pipeline\n\n\n## Information:\n| Technology Stack |  |  |\n| :- | :-: | :- |\n| Python                    | ![back-end][python]                   | Back-End |\n| Django                    | ![django][django]                     | Web Framework |\n| Django Rest Extension     | ![api-extension][django-rest-extension]| API Django Extension |\n| SQLite                    | ![database][sqlite]                   | Database |\n| Postman                   | ![http request app][postman]          | HTTP requests app |\n\n\u003cbr\u003e\u003cbr\u003e\n\n\n## Maintainer\nGet in touch -–\u003e [Github][github-profile]\n\n\n\n\u003c!-- Links --\u003e\n\u003c!-- Profiles --\u003e\n[github-profile]: https://github.com/fantaso/\n[linkedin-profile]: https://www.linkedin.com/\n[fantaso]: https://www.fantaso.de/\n\u003c!-- Extra --\u003e\n[postman-button-svg]:https://run.pstmn.io/button.svg\n[postman-button-link]:https://app.getpostman.com/run-collection/62ef5e078ec400e93201\n\n\n\u003c!-- Repos --\u003e\n[github-repo]: https://github.com/Fantaso/url-shortener-api\n\n\u003c!-- Builds --\u003e\n[travis-link]: https://travis-ci.org/\n[travis-image]: https://travis-ci.org/\n\n\u003c!-- images --\u003e\n[python]: readme/python.png\n[django]: readme/django.png\n[django-rest-extension]: readme/django-rest-extension.png\n[sqlite]: readme/sqlite.jpeg\n[postman]: readme/postman.png","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantaso%2Furl-shortener-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffantaso%2Furl-shortener-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantaso%2Furl-shortener-api/lists"}