Skip to main content

No project description provided

Project description

fast-xid

xid implemenetation in python without rust atomic integer. Lock free.

Install

pip install fast-xid

Usage

from fast_xid import XID

guid = XID()

print(guid.string())
# Output: bsqo1inf38q5alkk85a0

print(guid.machine())
# Output:  b'\xef\x1a4'

print(guid.pid())
# Output: 21846

print(guid.time())
# Output: 1597341898

print(guid.counter())
# Output: 9716052

print(guid.bytes())
# Output: b'_5\x80\xca\xef\x1a4UV\x94AT'

print(XID("bsqo1inf38q5alkk85a0"))
# Output: XID('bsqo1inf38q5alkk85a0')

print(XID(b"_5\x80\xca\xef\x1a4UV\x94AT"))
# Output: XID('bsqo1inf38q5alkk85a0')

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

fast_xid-0.1.0.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

fast_xid-0.1.0-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

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