{"id":16652290,"url":"https://github.com/iandioch/flasknasc","last_synced_at":"2026-05-18T03:35:45.378Z","repository":{"id":82297115,"uuid":"135324333","full_name":"iandioch/flasknasc","owner":"iandioch","description":"Easy setup, minimal maintenance, no-db, multi-user URL shortener.","archived":false,"fork":false,"pushed_at":"2018-05-30T01:42:16.000Z","size":11,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T16:25:16.057Z","etag":null,"topics":["flask","lightweight","no-database","python","python36","shorten-urls","shorturl","url-shortener"],"latest_commit_sha":null,"homepage":"https://url.cpssd.net","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/iandioch.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":"2018-05-29T16:30:32.000Z","updated_at":"2018-05-30T02:21:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2bc256d-e9cc-46b6-af21-09e4c4b9f946","html_url":"https://github.com/iandioch/flasknasc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iandioch/flasknasc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iandioch%2Fflasknasc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iandioch%2Fflasknasc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iandioch%2Fflasknasc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iandioch%2Fflasknasc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iandioch","download_url":"https://codeload.github.com/iandioch/flasknasc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iandioch%2Fflasknasc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269939913,"owners_count":24500362,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["flask","lightweight","no-database","python","python36","shorten-urls","shorturl","url-shortener"],"created_at":"2024-10-12T09:28:16.177Z","updated_at":"2026-05-18T03:35:40.342Z","avatar_url":"https://github.com/iandioch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flasknasc\n\nA lightweight minimal-dependency URL shortener in Python. The name comes from `Flask` (the Python microframework) and `nasc` (the Irish for a link).\n\n# Goals\n\n- Make it as easy as possible to setup.\n- Fire and forget; require as little maintenance as possible (by scaling to \u003e 1 million links).\n- It should be simple to use programmatically.\n\n# Non-Goals\n\n- Performance.\n- Ease of adding/onboarding new users.\n\n# Setup\n\nRequires Python3.6+.\n\n1. Install the dependencies (ie. Flask) by running `python3.6 -m pip install -r requirements.txt`.\n2. You should create a flasknasc configuration file at `.flasknasc/config.json`. See the \"User Configuration\" section of this document for an example.\n\n# Usage\n\nA URL mapping consists of a target address, a link ID, and a user prefix. An address like the following:\n\n```\nhttps://flasknasc-address.com/fwd/iandioch/homepage\n```\n\nwill direct the user to the target address, from the user prefix `iandioch` and the link ID `homepage`.\n\nEach user has a `key`. This is used to authenticate them, so that only they can make new URL mappings with their prefix. This is done by calling the following endpoint:\n\n```\nhttps://flasknasc-address.com/new/iandioch/homepage?key=iandioch_key\u0026address=http://noah.needs.money\n```\n\nThe key (here `iandioch_key`) will be compared to the stored one, and the mapping will fail if the key is incorrect.\n\nIf the key is correct, the link `flasknasc-address.com/fwd/iandioch/homepage` will now redirect visitors to the address `http://noah.needs.money`. The shortened address, relative to the flasknasc host (here the string `/fwd/iandioch/homepage`) will be returned by the endpoint.\n\nThe following endpoint can be used to create a new short link with a random ID:\n\n```\nhttps://flasknasc-address.com/new/iandioch?key=iandioch_key\u0026address=http://mycode.doesnot.run\n```\n\nLike above, this will return the shortened address if the operation is successful. A shortened address consists of the prefix followed by 12 random alphanumeric characters (eg. `/fwd/iandioch/9ecoafufqmjo`).\n\n# User Configuration\n\nIn the flasknasc directory (`.flasknasc`) there should be a file called `config.json`. It should take the following format:\n\n```\n{\n    \"users\": [\n        {\n            \"prefix\": \"iandioch\",\n            \"key\": \"iandioch_key\"\n        }\n    ]\n}\n```\n\nTo add or remove a user, or to change a user's key, this file should be edited, and flasknasc restarted. Keys are not encrypted.\n\n# Storage\n\nThe URL mappings for all users are stored in the same flasknasc directory, with user `iandioch`'s mappings going in a file `.flasknasc/iandioch/links.json`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiandioch%2Fflasknasc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiandioch%2Fflasknasc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiandioch%2Fflasknasc/lists"}