Skip to main content

Create and transform ULIDs

Project description

Fast ULID transformations

CI Status Test coverage percentage

Poetry black pre-commit

PyPI Version Supported Python versions License

Create and transform ULIDs

This library will use the CPP implementation from https://github.com/suyash/ulid if cython is available, and will fallback to pure python if it is not.

Example

>>> import ulid_transform
>>> ulid_transform.ulid_hex()
'01869a2ea5fb0b43aa056293e47c0a35'
>>> ulid_transform.ulid_now()
'0001HZX0NW00GW0X476W5TVBFE'
>>> ulid_transform.ulid_at_time(1234)
'000000016JC62D620DGYNG2R8H'
>>> ulid_transform.ulid_to_bytes('0001HZX0NW00GW0X476W5TVBFE')
b'\x00\x00c\xfe\x82\xbc\x00!\xc0t\x877\x0b\xad\xad\xee'
>> ulid_transform.bytes_to_ulid(b"\x01\x86\x99?\xe8\xf3\x11\xbc\xed\xef\x86U.9\x03z")
'01GTCKZT7K26YEVVW6AMQ3J0VT'
>>> ulid_transform.ulid_to_bytes_or_none('0001HZX0NW00GW0X476W5TVBFE')
b'\x00\x00c\xfe\x82\xbc\x00!\xc0t\x877\x0b\xad\xad\xee'
>>> ulid_transform.ulid_to_bytes_or_none(None)
>>> ulid_transform.bytes_to_ulid_or_none(b'\x00\x00c\xfe\x82\xbc\x00!\xc0t\x877\x0b\xad\xad\xee')
'0001HZX0NW00GW0X476W5TVBFE'
>>> ulid_transform.bytes_to_ulid_or_none(None)

Installation

Install this via pip (or your favourite package manager):

pip install ulid-transform

Contributors ✨

Thanks to https://github.com/suyash/ulid which provides the cython implementation guts.

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

This package was created with Copier and the browniebroke/pypackage-template project template.

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

ulid_transform-1.0.2.tar.gz (15.7 kB view details)

Uploaded Source

Built Distributions

ulid_transform-1.0.2-cp313-cp313-win_amd64.whl (40.3 kB view details)

Uploaded CPython 3.13 Windows x86-64

ulid_transform-1.0.2-cp313-cp313-win32.whl (38.3 kB view details)

Uploaded CPython 3.13 Windows x86

ulid_transform-1.0.2-cp313-cp313-musllinux_1_2_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13 musllinux: musl 1.2+ x86-64

ulid_transform-1.0.2-cp313-cp313-musllinux_1_2_i686.whl (1.2 MB view details)

Uploaded CPython 3.13 musllinux: musl 1.2+ i686

ulid_transform-1.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (166.6 kB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

ulid_transform-1.0.2-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl (158.9 kB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ i686

ulid_transform-1.0.2-cp313-cp313-macosx_14_0_arm64.whl (40.5 kB view details)

Uploaded CPython 3.13 macOS 14.0+ ARM64

ulid_transform-1.0.2-cp312-cp312-win_amd64.whl (41.0 kB view details)

Uploaded CPython 3.12 Windows x86-64

ulid_transform-1.0.2-cp312-cp312-win32.whl (38.7 kB view details)

Uploaded CPython 3.12 Windows x86

ulid_transform-1.0.2-cp312-cp312-musllinux_1_2_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12 musllinux: musl 1.2+ x86-64

ulid_transform-1.0.2-cp312-cp312-musllinux_1_2_i686.whl (1.2 MB view details)

Uploaded CPython 3.12 musllinux: musl 1.2+ i686

ulid_transform-1.0.2-cp312-cp312-manylinux_2_36_x86_64.whl (170.1 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.36+ x86-64

ulid_transform-1.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (172.6 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ulid_transform-1.0.2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (164.9 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ i686

ulid_transform-1.0.2-cp312-cp312-macosx_14_0_arm64.whl (41.2 kB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

ulid_transform-1.0.2-cp311-cp311-win_amd64.whl (40.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

ulid_transform-1.0.2-cp311-cp311-win32.whl (38.6 kB view details)

Uploaded CPython 3.11 Windows x86

ulid_transform-1.0.2-cp311-cp311-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

ulid_transform-1.0.2-cp311-cp311-musllinux_1_2_i686.whl (1.2 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ i686

ulid_transform-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (166.2 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ulid_transform-1.0.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (159.7 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ i686

ulid_transform-1.0.2-cp311-cp311-macosx_14_0_arm64.whl (41.1 kB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

File details

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

File metadata

  • Download URL: ulid_transform-1.0.2.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for ulid_transform-1.0.2.tar.gz
Algorithm Hash digest
SHA256 9b710f6adb93a7620910bce385c7e977a234ab321443ec3bc1e48ae931f1e5d4
MD5 09e13d34f0a92ca296af1e9d02578d9c
BLAKE2b-256 645ed48740b5aa3f1135c3c76f4bffaa7bddb209807d6ac11ad79666d451641b

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0d5bc5f3392b78ba9225dbb919b05fed7d62cff77f8674cc1389c01d3ae9a947
MD5 c270f9bfded39e6d350a540818cc67e3
BLAKE2b-256 5888bdb72f143c76aabe2f5169a441f8d28973ed4e6fb598c4b3acdd77b379a0

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp313-cp313-win32.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 2231ca1d83f5964a7cdf353f9d7cbc16a2e51eb8c9d5a9c743fe3aa0d17c6b3e
MD5 3c5f2916699909c7700be7de81608043
BLAKE2b-256 e09247c5c4f09da84e6f73bf4b984a757a53086a8216b0c0ee4ccdb5a3f3c0e9

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 71c71a436f5e2c0a1580ad5269b1e7ad8193c1cbb69463342261e46f0f722f4d
MD5 ea85ffcec5f9fd3b5eefa2788c205c1b
BLAKE2b-256 3107398dd416d45b0f7d497486c67d080bc113d1b0aefdeab85d16a12d2f852f

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp313-cp313-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 bd972e8c1695ad3e24b5d9eaa5ad352ff9237f58186d182f4ef48a1f7d352b1d
MD5 a74645c2da268721f05f42615657d005
BLAKE2b-256 56a078b2f37777ef89c335a86f6803dd68d60fd0f700aa2c30990a4cb064aa4e

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 da3887088b3a3bc4a98bcd65274a0324c50dfd6d56305434ddcc25024a1ed98b
MD5 3614f2a6e4911d2cb8274604a5130230
BLAKE2b-256 becc5b06e4bce8b0b6b1d4334ad83e6224684eac1744fcff0e9e4d215165af33

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 96c3c2423972cae3f26ef564c79507da49558553fb13e605dcf9395fab2924e4
MD5 faa87f40282756d322a9ec2337cc4044
BLAKE2b-256 e848323ed2ae0c80a875793115ae97fab331b9785b96d56064096011f31758e3

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 76563b84d0852a2861cdd22fb082ae1f7a88f038c078be4ad716610eeea421a6
MD5 06f7aad951ab3a4df09c606e1fc83d01
BLAKE2b-256 2bff3dba6de60c854b9baa56aaff114f1a8f34327ea6bdceb7a76647dbf4b408

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 943aaa6c6888f93e4718bcd1cc852db5ee0b2694a1107dcf411bfa2b5e3eb3bd
MD5 fa46f6df0a3a87eced30d5d6c5fdbb10
BLAKE2b-256 02bedcb545a55247636bbbf642d0a61c3db3106aab9fccd59f799630e3203478

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp312-cp312-win32.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 72f719c10b3e9135a09c8d38182e4afacb2c8908ea566257c037b3a4a62f9b91
MD5 d14241de4be137b1cb98e839b6c12a91
BLAKE2b-256 7232ca24bafa285d37fef4edda165c9893cc23977ba7309cf1cbbf9347dd5de7

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9e8b7ac6d9273bac1c1a242bbc6c3d9c3018bff8e00501293a8cf7493bff7190
MD5 6b308e3b9efe67b40520198d2ebefdd7
BLAKE2b-256 8078768b512c3870d512692ec108b430debdcdaa5fa1cbb5d9411253f37747e8

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 a95449d9343ee6cfae49ace10b7ed094acbfcb19c4d56a5ba06874507e1e550f
MD5 080dfcbea1622cc75c076df1374161d1
BLAKE2b-256 1e36736752356192f19d0b65fc1da68b616ac185a6ee960b8c9f69df4d5d8622

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp312-cp312-manylinux_2_36_x86_64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp312-cp312-manylinux_2_36_x86_64.whl
Algorithm Hash digest
SHA256 55812ff17d265a1318c16b2af3349bdd893f0c5ca4352ea429d82ea8a7ab36ac
MD5 54c5cd0ddb9d44d81f09b1dc0e12f9f5
BLAKE2b-256 055e2e326e349ce3da7667817e12de333a5aaa18d904d8ee75122bb17dbdf61c

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bc58deae5c2a3868824f3ce8e103845a600b6420fab88c4b6f1cab8a45c657f4
MD5 7250d9fe5d11ed4030cc4aa4bbf508c4
BLAKE2b-256 b70817391871f8585a0d3321a96f57ce27225d1c15d8497881935f180e668ab7

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 1b39b0188c788dac1338e3e217fc83728189f1e4a91ff75afd5152ddb7a41fe9
MD5 213e5ea2e7cf89347ef3e72ac7f9cc6b
BLAKE2b-256 742eb5e0afc1f9a19eefb293c55d8c6444c9132b8c026006e2b3f1e3848ce2a9

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 eb88626b68fa34883722ade34df0fd3b51f55ab6730e8bda6532a087568bbb54
MD5 56ec53e1d93349720c8e753e4208f41f
BLAKE2b-256 836163d342c76937a4422ec0c581bf976717e243ae0f84d53592a00a78d18aaa

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e286a3aa354b3a67e36f20307884a023db4a86f481dacfbbb56e79f1748a80a4
MD5 f4ee87faedb19a951bed2db8a7d858eb
BLAKE2b-256 d3a7dff9c1d06a287b95a86bddb0245d6e6a5c9ce1e641548bee84ecb0d7e88d

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp311-cp311-win32.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 28cb2722f5659ac417701d7181b0573158ee3554131816ca1e07b062c280ef67
MD5 bdd25d6cba2ab358d0180daf230a543d
BLAKE2b-256 5ccd4ac9a740332e4ab1919b7bde62c8bfd5c735fc3b5dd6208b25904aa2b07f

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8c5056d08d065ae60ea53cf717be84b6f94b018df93ac8ecdba2569007ba4f0f
MD5 d47991e284e8c1eb4f47d2db835c5fb5
BLAKE2b-256 e75bc241e81b20b0e61ea1c94032da8686a00d16967acd3018a2cdee0c490a28

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp311-cp311-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 861c0b7645f87f1a4ae81d8d5a6e2e22f877ed1f3e71af0589c4b533774df0d9
MD5 ca9b25f1d0d8c77fdac7aa72993c86b3
BLAKE2b-256 f08fde801bd5efe60b7c4214a26be9b665fe0bee2c41c0bd6c6c7af417bd3fa0

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a6714a1df32d9d9a7dfddd9ed2a299ef7c36575c34f17149c96c8a577cb70c0e
MD5 dc0054923796ccff84ba0f6201fcca52
BLAKE2b-256 844bbaf832b628c7945710b6fcf6eaa27abe037b4fe311971611c594c15c239f

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 45f14d0a24d03fec4185db7894e7f30a9762d9b7fe0f5a2344c67698a03185e0
MD5 077901bd2bb89ddae098264e29630636
BLAKE2b-256 2be679c9821ef316eb20b9887fe97e4facadfe20223343b0eb71feb20e06a0e5

See more details on using hashes here.

Provenance

File details

Details for the file ulid_transform-1.0.2-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for ulid_transform-1.0.2-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 2e19ab8bcf68bf16c012bbed75590ed9d73dce0dc494066c004b68feffa731c7
MD5 d259a273ef687b452d763fcabe08bf4f
BLAKE2b-256 921cc797146e3c7a1dec5296c09eab7072f4489a18a6343e8bb164b67b753859

See more details on using hashes here.

Provenance

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