Skip to main content

雪花id生成器-解决时钟回拨问题

Project description

uidgenerator-snowflakeid

根据经典的雪花id算法,实现python的本地ip地址滚动映射到5+5位centerid和worerid,并解决时钟回拨问题。

[!IMPORTANT]

使用方法

from aimframe_uidgenerator.uidgenerator.usnowflake import USnowflake

def snowflakeid():
 snowflake = USnowflake.Default()
 return snowflake.NextId()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aimframe_uidgenerator-1.0.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aimframe_uidgenerator-1.0.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file aimframe_uidgenerator-1.0.2.tar.gz.

File metadata

  • Download URL: aimframe_uidgenerator-1.0.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for aimframe_uidgenerator-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6e443a32e1fa791dd8a69407adeaf0c10d588b3fcea4e2457e87f9292337697a
MD5 d03f99148a499dfdd11981fea1bebd8a
BLAKE2b-256 709ab1e67709ea1c4bcd145fafbd955a8b6d1df62cdb2c48eacf7f9327a86a4a

See more details on using hashes here.

File details

Details for the file aimframe_uidgenerator-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for aimframe_uidgenerator-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4eb11d4997a04fce2073b6bcb74f9b41683ed9b7de34d42cae038eb5720a51f0
MD5 2f6cf0bc383cba931b4b0732551f948f
BLAKE2b-256 93594b16839fc506c312c2331f887c545c082e17289016f76e353146d69cf10f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page