All Projects → kpdemetriou → fuuid

kpdemetriou / fuuid

Licence: BSD-3-Clause license
Functional UUIDs for Python.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to fuuid

uid
Provides an object-oriented API to generate and represent UIDs.
Stars: ✭ 315 (+117.24%)
Mutual labels:  uuid, uid
Butterfly
分布式ID生成器框架:超高性能的发号器框架。通过引入多种新的方案,彻底解决雪花算法的时间回拨等问题,并将雪花算法原生QPS提高最少十几~二十倍
Stars: ✭ 111 (-23.45%)
Mutual labels:  uuid, unique-id
friendly-id
Java Friendly Id for UUID
Stars: ✭ 173 (+19.31%)
Mutual labels:  uuid, unique-id
ulid-creator
A Java library for generating Universally Unique Lexicographically Sortable Identifiers (ULID)
Stars: ✭ 38 (-73.79%)
Mutual labels:  uuid, unique-id
Ksuid
K-Sortable Globally Unique IDs
Stars: ✭ 3,202 (+2108.28%)
Mutual labels:  uuid, unique-id
python-ulid
ULID implementation for Python
Stars: ✭ 177 (+22.07%)
Mutual labels:  uuid, unique-id
sno
Compact, sortable and fast unique IDs with embedded metadata.
Stars: ✭ 77 (-46.9%)
Mutual labels:  uuid, unique-id
uuid-generator-plugin
An IntelliJ Idea plugin to generate UUID (Universally Unique Identifier), ULID (Universally Unique Lexicographically Sortable Identifier) and CUID (Collision Resistant Unique Identifier)
Stars: ✭ 30 (-79.31%)
Mutual labels:  uuid
colossal-squuid
Library for generating sequential UUIDs, or SQUUIDs
Stars: ✭ 52 (-64.14%)
Mutual labels:  uuid
react-native-uuid-generator
UUID generator for React Native utilizing native iOS and Android UUID classes
Stars: ✭ 88 (-39.31%)
Mutual labels:  uuid
uuid
Go package for UUIDs based on RFC 4122 Time-Based UUID
Stars: ✭ 38 (-73.79%)
Mutual labels:  uuid
pure-uuid
Pure JavaScript Based Universally Unique Identifiers (UUID)
Stars: ✭ 60 (-58.62%)
Mutual labels:  uuid
uuids
UUID library for Nim
Stars: ✭ 28 (-80.69%)
Mutual labels:  uuid
php-uuid
RFC 4122 compliant UUID generator and parser for PHP.
Stars: ✭ 13 (-91.03%)
Mutual labels:  uuid
fastuuid
FastUUID is a library which provides CPython bindings to Rust's UUID library
Stars: ✭ 83 (-42.76%)
Mutual labels:  uuid
ulid
Haskell implementation of ULIDs (Unique Lexicographically Sortable Identifiers)
Stars: ✭ 22 (-84.83%)
Mutual labels:  uuid
uuid-mongodb
📇 Generates and parses MongoDB BSON UUIDs
Stars: ✭ 94 (-35.17%)
Mutual labels:  uuid
ruuid
A fast uuid generator in Python using Rust
Stars: ✭ 19 (-86.9%)
Mutual labels:  uuid
rs-nuid
NATS unique identifiers
Stars: ✭ 19 (-86.9%)
Mutual labels:  uuid
go-ulid
Universally Unique Lexicographically Sortable Identifier (ULID) in Go - Please use https://github.com/oklog/ulid
Stars: ✭ 31 (-78.62%)
Mutual labels:  uuid

🏷️ fuuid

FUUID stands for Functional Universally Unique IDentifier. FUUIDs are compatible with regular UUIDs but are naturally ordered by generation time, collision-free and support succinct representations such as raw binary and base58-encoded strings.

In short, running FUUIDs through the UNIX sort command will result in a list ordered by generation time.

Installation

You can install this package using pip or build it from source using poetry:

# Using pip
pip install fuuid

# Using poetry
pip install poetry
poetry build

Example

from fuuid import fuuid, fuuid_ns, raw_fuuid, raw_fuuid_ns, b58_fuuid, b58_fuuid_ns, b64_fuuid, b64_fuuid_ns

fuuid()
# UUID('01324332-f66a-054a-76e4-fbdc7f772cd1')

fuuid_ns()
# UUID('00474eaa-b5d8-3844-338c-e77ecd424b06')

raw_fuuid()
# b'\x012C2\xc5\xfc\x18\xca\x96N\xe5_\xaaU86'

raw_fuuid_ns()
# b'\x00GN\xaa\xb5\xd88D\xfb\xfe%\xcf_\x90\xb8\xa8'

b58_fuuid()
# 9ZxgTVssa99BdQF3n5tSj

b58_fuuid_ns()
# 12zi36Vm1zaBQmpmpZ2xXk

b64_fuuid()
# ATJDMhbpQxNUfC7BL3F3kQ==

b64_fuuid_ns()
# AEdOqrXYOES+VjlfTHElKw==

License

BSD 3-Clause License

Copyright (c) 2021, Phil Demetriou
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].