{"id":29503694,"url":"https://github.com/avalos010/url_shortener","last_synced_at":"2026-05-18T00:31:20.605Z","repository":{"id":304575213,"uuid":"1019150016","full_name":"avalos010/url_shortener","owner":"avalos010","description":"Simple URL Shortener (FastAPI + SQLite)","archived":false,"fork":false,"pushed_at":"2025-07-13T23:59:49.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-14T01:34:10.659Z","etag":null,"topics":["fastapi","python","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avalos010.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,"zenodo":null}},"created_at":"2025-07-13T21:07:52.000Z","updated_at":"2025-07-13T23:59:52.000Z","dependencies_parsed_at":"2025-07-14T01:34:19.447Z","dependency_job_id":null,"html_url":"https://github.com/avalos010/url_shortener","commit_stats":null,"previous_names":["avalos010/url_shortener"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/avalos010/url_shortener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avalos010%2Furl_shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avalos010%2Furl_shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avalos010%2Furl_shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avalos010%2Furl_shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avalos010","download_url":"https://codeload.github.com/avalos010/url_shortener/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avalos010%2Furl_shortener/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265465888,"owners_count":23770452,"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":["fastapi","python","url-shortener"],"created_at":"2025-07-15T23:01:26.770Z","updated_at":"2026-05-18T00:31:20.574Z","avatar_url":"https://github.com/avalos010.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔗 Simple URL Shortener (FastAPI + SQLite)\n\nA simple and minimal URL shortener built with [FastAPI](https://fastapi.tiangolo.com/) and [SQLite](https://www.sqlite.org/index.html).\n\n## ✨ Features\n\n- Shorten long URLs into compact, shareable links\n- Store shortened URLs in a local SQLite database\n- Retrieve the original URL using the shortened link\n\n## 🚀 Getting Started\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/avalos010/url_shortener.git\ncd url_shortener\n```\n\n### 2. Create a Virtual Environment\n\n```bash\npython -m venv .venv\n```\n\n### 3. Activate the Virtual Environment\n\n#### On Linux/macOS\n\n```bash\nsource .venv/bin/activate\n```\n\n#### On Windows\n\n```bash\n.venv\\Scripts\\activate\n```\n\n### 4. Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### 5. Run the Application\n\n```bash\nuvicorn app.main:app --reload\n```\n\n## 📡 API Endpoints\n\n### POST `/shorten`\n\nShortens a long URL.\n\n**Request Body:**\n\n```json\n{\n  \"original_url\": \"https://www.example.com\"\n}\n```\n\n**Response:**\n\n```json\n{\n  \"shortened_url\": \"https://your-url-shortener.com/abc123\"\n}\n```\n\n---\n\n### GET `/redirect/{shortened_url}`\n\nRetrieves the original URL from a shortened one.\n\n**Example Request:**\n\n```\nGET https://your-url-shortener.com/abc123\n```\n\n**Response:**\n\n```json\n{\n  \"original_url\": \"https://www.example.com\"\n}\n```\n\n## 🗃️ Database\n\n- The application uses a SQLite database for storage.\n- The database file is named `urls.db` and is located in the project root directory.\n\n## 🪪 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## 🤝 Contributing\n\nContributions are welcome!\n\nIf you'd like to contribute:\n\n1. Fork the repository\n2. Create a feature or fix branch\n3. Submit a pull request\n\n## 🙏 Acknowledgments\n\n- Built using [FastAPI](https://fastapi.tiangolo.com/)\n- Project structure inspired by the official FastAPI documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favalos010%2Furl_shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favalos010%2Furl_shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favalos010%2Furl_shortener/lists"}