{"id":22702263,"url":"https://github.com/hjpotter92/sonyflake-py","last_synced_at":"2025-04-11T04:41:06.558Z","repository":{"id":49186942,"uuid":"326478393","full_name":"hjpotter92/sonyflake-py","owner":"hjpotter92","description":"A distributed unique ID generator inspired by Twitter's Snowflake, rewritten in python","archived":false,"fork":false,"pushed_at":"2024-08-17T15:35:54.000Z","size":25,"stargazers_count":35,"open_issues_count":2,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T02:43:53.356Z","etag":null,"topics":["codecov","codecov-badge","id-generator","python","readthedocs","readthedocs-badge","snowflake","sonyflake","travis-ci","unique-id"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/sonyflake-py/","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/hjpotter92.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}},"created_at":"2021-01-03T18:51:11.000Z","updated_at":"2024-11-12T08:32:56.000Z","dependencies_parsed_at":"2024-12-31T10:09:41.138Z","dependency_job_id":"ca45966d-65d4-4450-b0ba-c4fd71973b20","html_url":"https://github.com/hjpotter92/sonyflake-py","commit_stats":{"total_commits":31,"total_committers":4,"mean_commits":7.75,"dds":"0.25806451612903225","last_synced_commit":"ec38079af8f9d240e0438ca89dc2acdc62f532a6"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjpotter92%2Fsonyflake-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjpotter92%2Fsonyflake-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjpotter92%2Fsonyflake-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjpotter92%2Fsonyflake-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hjpotter92","download_url":"https://codeload.github.com/hjpotter92/sonyflake-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248088509,"owners_count":21045726,"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":["codecov","codecov-badge","id-generator","python","readthedocs","readthedocs-badge","snowflake","sonyflake","travis-ci","unique-id"],"created_at":"2024-12-10T07:12:46.735Z","updated_at":"2025-04-11T04:41:06.536Z","avatar_url":"https://github.com/hjpotter92.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sonyflake-py\n\n[![codecov][codecov-badge]][codecov] [![Build Status][travis-ci-badge]][travis-ci] [![Documentation Status][readthedocs-badge]][readthedocs]\n\n\nSonyflake is a distributed unique ID generator inspired by [Twitter's\nSnowflake](https://blog.twitter.com/2010/announcing-snowflake).\n\nThis is a python rewrite of the original\n[sony/sonyflake](https://github.com/sony/sonyflake) project, written\nin Go.\n\nA Sonyflake ID is composed of\n\n    39 bits for time in units of 10 msec\n     8 bits for a sequence number\n    16 bits for a machine id\n\n## Installation\n\n``` shell\npip install sonyflake-py\n```\n\n## Quickstart\n\n``` python\nfrom sonyflake import SonyFlake\nsf = SonyFlake()\nnext_id = sf.next_id()\nprint(next_id)\n```\n\nThe generator can be configured with variety of options, such as\ncustom `machine_id`, `start_time` etc.\n\n- `start_time` should be an instance of `datetime.datetime`.\n- `machine_id` should be an integer value upto 16-bits, callable or\n  `None` (will be used random machine id).\n\n## License\n\nThe MIT License (MIT).\n\n\n  [codecov]: https://codecov.io/gh/hjpotter92/sonyflake-py\n  [codecov-badge]: https://codecov.io/gh/hjpotter92/sonyflake-py/branch/master/graph/badge.svg?token=XZCRNSSSQK\n  [readthedocs]: http://sonyflake-py.rtfd.io/\n  [readthedocs-badge]: https://readthedocs.org/projects/sonyflake-py/badge/?version=latest\n  [travis-ci]: https://travis-ci.com/hjpotter92/sonyflake-py\n  [travis-ci-badge]: https://travis-ci.com/hjpotter92/sonyflake-py.svg?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhjpotter92%2Fsonyflake-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhjpotter92%2Fsonyflake-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhjpotter92%2Fsonyflake-py/lists"}