sonyflake-py
Sonyflake is a distributed unique ID generator inspired by Twitter's Snowflake.
This is a python rewrite of the original sony/sonyflake project, written in Go.
A Sonyflake ID is composed of
39 bits for time in units of 10 msec
8 bits for a sequence number
16 bits for a machine id
Installation
pip install sonyflake-py
Quickstart
from sonyflake import SonyFlake
sf = SonyFlake()
next_id = sf.next_id()
print(next_id)
The generator can be configured with variety of options, such as
custom machine_id, start_time etc.
start_timeshould be an instance ofdatetime.datetime.machine_idshould be a callable which returns an integer value upto 16-bits.
License
The MIT License (MIT).
Metadata
Release files for sonyflake-py 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sonyflake-py-1.3.0.tar.gz | 4.9 kB | Without provenance | Details for sonyflake-py-1.3.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sonyflake_py-1.3.0-py3.9.egg | Legacy Egg format | - | - | Details for sonyflake_py-1.3.0-py3.9.egg |
| sonyflake_py-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for sonyflake_py-1.3.0-py3-none-any.whl |
Total release size: 14.6 kB
Release files / sonyflake-py-1.3.0.tar.gz
| Download URL | sonyflake-py-1.3.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1445245f89fa18f25506ab1ff03c49835d9ec3eadb34adf1e5e2894e52202777
|
|
BLAKE2b-256 checksum How to use checksums |
4c6dfe8202f8c3c9a1b3fe10d0b5b6bfaf809a71e5fc52af1c09e0c2e6995be5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
|
Release files / sonyflake_py-1.3.0-py3.9.egg
| Download URL | sonyflake_py-1.3.0-py3.9.egg |
|---|---|
| Size | 4.3 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
89a479385fa42b9f4234e2afc1e677c866aa7700b204b1ec85c0be35dc2a4ae6
|
|
BLAKE2b-256 checksum How to use checksums |
f34285ddcdb32ef61822a0964c948b7306783cd066704c154ff5c16ffc86fa94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
|
Release files / sonyflake_py-1.3.0-py3-none-any.whl
| Download URL | sonyflake_py-1.3.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5433acfcd8177effa79511246a52f30b37ec773d9e2cec1a4733c57a45a18820
|
|
BLAKE2b-256 checksum How to use checksums |
a98f2fa1e7c00a14f0b66bdd2403b7d902676a91f0ddc13e2e7f66ea55f725c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
|
Security for sonyflake-py 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.