{"id":22363,"library":"shortid","title":"shortid","description":"A short id generator for Python, producing compact, URL-friendly unique identifiers. Version 0.1.2 is the latest release; the library appears to be in maintenance mode with no recent updates.","status":"active","version":"0.1.2","language":"python","source_language":"en","source_url":"https://github.com/corpix/shortid","tags":["id-generator","short-id","unique-id"],"install":[{"cmd":"pip install shortid","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Direct module import does not provide the class; you must import ShortId explicitly.","wrong":"import shortid","symbol":"ShortId","correct":"from shortid import ShortId"}],"quickstart":{"code":"from shortid import ShortId\n\nsid = ShortId()\nshort_id = sid.generate()\nprint(short_id)  # e.g., 'B1rH9k'","lang":"python","description":"Generate a short, URL-friendly unique identifier."},"warnings":[{"fix":"If you need secure IDs, consider a different library or use secrets.token_urlsafe()","message":"ShortId() without arguments uses default alphabet (case-sensitive alphanumeric). Generated IDs are not cryptographically random; use secrets module if you need stronger uniqueness.","severity":"gotcha","affected_versions":"all"},{"fix":"Test with your Python version; if broken, consider alternatives like shortuuid or pyshorteners.","message":"The library has not been updated since 2017 and may not support modern Python versions (3.10+). Build failures possible.","severity":"deprecated","affected_versions":"0.1.2"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run: pip install shortid","cause":"The package is not installed.","error":"ModuleNotFoundError: No module named 'shortid'"},{"fix":"Use: from shortid import ShortId","cause":"Incorrect import path.","error":"ImportError: cannot import name 'ShortId' from 'shortid'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}