{"id":31776718,"url":"https://github.com/stabldev/django-shortuuid","last_synced_at":"2025-10-10T05:54:12.638Z","repository":{"id":317131329,"uuid":"1065693150","full_name":"stabldev/django-shortuuid","owner":"stabldev","description":"A modern, Django model field for generating short, unique, URL-safe UUIDs using the shortuuid lib.","archived":false,"fork":false,"pushed_at":"2025-09-29T03:07:20.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-29T04:16:31.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/stabldev.png","metadata":{"files":{"readme":"README.md","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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-28T08:34:32.000Z","updated_at":"2025-09-29T03:59:10.000Z","dependencies_parsed_at":"2025-09-29T04:16:34.023Z","dependency_job_id":"599a1569-ba29-4835-94ae-a49a45357f48","html_url":"https://github.com/stabldev/django-shortuuid","commit_stats":null,"previous_names":["stabldev/django-shortuuid"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/stabldev/django-shortuuid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stabldev%2Fdjango-shortuuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stabldev%2Fdjango-shortuuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stabldev%2Fdjango-shortuuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stabldev%2Fdjango-shortuuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stabldev","download_url":"https://codeload.github.com/stabldev/django-shortuuid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stabldev%2Fdjango-shortuuid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278262441,"owners_count":25957937,"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-10-04T02:00:05.491Z","response_time":63,"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":[],"created_at":"2025-10-10T05:54:05.081Z","updated_at":"2025-10-10T05:54:12.634Z","avatar_url":"https://github.com/stabldev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-shortuuid\n\n![PyPI](https://img.shields.io/pypi/v/django-shortuuid?style=flat-square)\n![PyPI - Implementation](https://img.shields.io/pypi/implementation/django-shortuuid?style=flat-square)\n![GitHub License](https://img.shields.io/github/license/stabldev/django-shortuuid?style=flat-square)\n![Build](https://img.shields.io/github/actions/workflow/status/stabldev/django-shortuuid/release.yml?style=flat-square)\n\nA drop-in Django model field for generating short, URL-safe, and unique IDs using [shortuuid](https://github.com/skorokithakis/shortuuid).  \nCustomizable, migration-friendly, with optional collision detection and Django admin integration.\n\n## Features\n\n- Short, URL-safe unique IDs for Django models (default 22 characters, configurable)\n- Customizable alphabet, prefix, and length\n- Optional database collision detection and retry logic\n- Django admin: field is read-only but visible\n- Compatible with Django migrations\n- Python type hints\n\n## Installation\n\n```\npip install django-shortuuid\n```\n\n## Usage\n\n```py\nfrom django.db import models\nfrom django_shortuuid.fields import ShortUUIDField\n\nclass MyModel(models.Model):\n    id = ShortUUIDField(primary_key=True, prefix=\"id-\")\n    # ... other fields ...\n```\n\nBy default, `auto=True` generates a unique short UUID when each instance is saved, and makes the field read-only in forms/admin.\n\n## Example\n\nSee [django_example/](django_example/) for a full Django setup and admin usage.\n\n## Configuration\n\n- `auto`: Generate and set value automatically (`True` by default)\n- `length`: Length of the generated unique string (default `22`)\n- `prefix`: Optional string prefix for the field value\n- `alphabet`: Custom alphabet for uuid generation (default: `shortuuid`’s default)\n- `collision_check`: Enables collision checking in the database (`True` by default)\n- `max_retries`: Max attempts to generate unique value before error (`10` by default)\n\n## License\n\n[MIT](LICENSE) Copyright (c) [stabldev](https://github.com/stabldev)\n\n## Credits\n\nThis project was inspired by [benrobster/django-shortuuidfield](https://github.com/benrobster/django-shortuuidfield)  \nand builds on ideas from the original implementation.\n\nSpecial thanks to [shortuuid](https://github.com/skorokithakis/shortuuid) for the short, URL-safe UUID generation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstabldev%2Fdjango-shortuuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstabldev%2Fdjango-shortuuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstabldev%2Fdjango-shortuuid/lists"}