ulid-transform 1.0.1__cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ulid_transform/__init__.py +41 -0
- ulid_transform/__init__.pyi +10 -0
- ulid_transform/_py_ulid_impl.py +454 -0
- ulid_transform/_ulid_impl.cpython-313-i386-linux-gnu.so +0 -0
- ulid_transform/_ulid_impl.pyx +136 -0
- ulid_transform/py.typed +0 -0
- ulid_transform/ulid.hh +17 -0
- ulid_transform/ulid_struct.hh +716 -0
- ulid_transform/ulid_uint128.hh +555 -0
- ulid_transform/ulid_wrapper.cpp +94 -0
- ulid_transform/ulid_wrapper.h +13 -0
- ulid_transform-1.0.1.dist-info/LICENSE +22 -0
- ulid_transform-1.0.1.dist-info/METADATA +107 -0
- ulid_transform-1.0.1.dist-info/RECORD +15 -0
- ulid_transform-1.0.1.dist-info/WHEEL +6 -0
@@ -0,0 +1,107 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: ulid-transform
|
3
|
+
Version: 1.0.1
|
4
|
+
Summary: Create and transform ULIDs
|
5
|
+
Home-page: https://github.com/bdraco/ulid-transform
|
6
|
+
License: MIT
|
7
|
+
Author: J. Nick Koston
|
8
|
+
Author-email: nick@koston.org
|
9
|
+
Requires-Python: >=3.11,<4.0
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
11
|
+
Classifier: Intended Audience :: Developers
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
13
|
+
Classifier: Natural Language :: English
|
14
|
+
Classifier: Operating System :: OS Independent
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
19
|
+
Classifier: Topic :: Software Development :: Libraries
|
20
|
+
Project-URL: Bug Tracker, https://github.com/bdraco/ulid-transform/issues
|
21
|
+
Project-URL: Changelog, https://github.com/bdraco/ulid-transform/blob/main/CHANGELOG.md
|
22
|
+
Project-URL: Repository, https://github.com/bdraco/ulid-transform
|
23
|
+
Description-Content-Type: text/markdown
|
24
|
+
|
25
|
+
# Fast ULID transformations
|
26
|
+
|
27
|
+
<p align="center">
|
28
|
+
<a href="https://github.com/bdraco/ulid-transform/actions/workflows/ci.yml?query=branch%3Amain">
|
29
|
+
<img src="https://img.shields.io/github/actions/workflow/status/bdraco/ulid-transform/ci.yml?branch=main&label=CI&logo=github&style=flat-square" alt="CI Status" >
|
30
|
+
</a>
|
31
|
+
<a href="https://codecov.io/gh/bdraco/ulid-transform">
|
32
|
+
<img src="https://img.shields.io/codecov/c/github/bdraco/ulid-transform.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
|
33
|
+
</a>
|
34
|
+
</p>
|
35
|
+
<p align="center">
|
36
|
+
<a href="https://python-poetry.org/">
|
37
|
+
<img src="https://img.shields.io/badge/packaging-poetry-299bd7?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJJSURBVHgBfZLPa1NBEMe/s7tNXoxW1KJQKaUHkXhQvHgW6UHQQ09CBS/6V3hKc/AP8CqCrUcpmop3Cx48eDB4yEECjVQrlZb80CRN8t6OM/teagVxYZi38+Yz853dJbzoMV3MM8cJUcLMSUKIE8AzQ2PieZzFxEJOHMOgMQQ+dUgSAckNXhapU/NMhDSWLs1B24A8sO1xrN4NECkcAC9ASkiIJc6k5TRiUDPhnyMMdhKc+Zx19l6SgyeW76BEONY9exVQMzKExGKwwPsCzza7KGSSWRWEQhyEaDXp6ZHEr416ygbiKYOd7TEWvvcQIeusHYMJGhTwF9y7sGnSwaWyFAiyoxzqW0PM/RjghPxF2pWReAowTEXnDh0xgcLs8l2YQmOrj3N7ByiqEoH0cARs4u78WgAVkoEDIDoOi3AkcLOHU60RIg5wC4ZuTC7FaHKQm8Hq1fQuSOBvX/sodmNJSB5geaF5CPIkUeecdMxieoRO5jz9bheL6/tXjrwCyX/UYBUcjCaWHljx1xiX6z9xEjkYAzbGVnB8pvLmyXm9ep+W8CmsSHQQY77Zx1zboxAV0w7ybMhQmfqdmmw3nEp1I0Z+FGO6M8LZdoyZnuzzBdjISicKRnpxzI9fPb+0oYXsNdyi+d3h9bm9MWYHFtPeIZfLwzmFDKy1ai3p+PDls1Llz4yyFpferxjnyjJDSEy9CaCx5m2cJPerq6Xm34eTrZt3PqxYO1XOwDYZrFlH1fWnpU38Y9HRze3lj0vOujZcXKuuXm3jP+s3KbZVra7y2EAAAAAASUVORK5CYII=" alt="Poetry">
|
38
|
+
</a>
|
39
|
+
<a href="https://github.com/ambv/black">
|
40
|
+
<img src="https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square" alt="black">
|
41
|
+
</a>
|
42
|
+
<a href="https://github.com/pre-commit/pre-commit">
|
43
|
+
<img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" alt="pre-commit">
|
44
|
+
</a>
|
45
|
+
</p>
|
46
|
+
<p align="center">
|
47
|
+
<a href="https://pypi.org/project/ulid-transform/">
|
48
|
+
<img src="https://img.shields.io/pypi/v/ulid-transform.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
|
49
|
+
</a>
|
50
|
+
<img src="https://img.shields.io/pypi/pyversions/ulid-transform.svg?style=flat-square&logo=python&logoColor=fff" alt="Supported Python versions">
|
51
|
+
<img src="https://img.shields.io/pypi/l/ulid-transform.svg?style=flat-square" alt="License">
|
52
|
+
</p>
|
53
|
+
|
54
|
+
Create and transform ULIDs
|
55
|
+
|
56
|
+
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.
|
57
|
+
|
58
|
+
## Example
|
59
|
+
|
60
|
+
```python
|
61
|
+
>>> import ulid_transform
|
62
|
+
>>> ulid_transform.ulid_hex()
|
63
|
+
'01869a2ea5fb0b43aa056293e47c0a35'
|
64
|
+
>>> ulid_transform.ulid_now()
|
65
|
+
'0001HZX0NW00GW0X476W5TVBFE'
|
66
|
+
>>> ulid_transform.ulid_at_time(1234)
|
67
|
+
'000000016JC62D620DGYNG2R8H'
|
68
|
+
>>> ulid_transform.ulid_to_bytes('0001HZX0NW00GW0X476W5TVBFE')
|
69
|
+
b'\x00\x00c\xfe\x82\xbc\x00!\xc0t\x877\x0b\xad\xad\xee'
|
70
|
+
>> ulid_transform.bytes_to_ulid(b"\x01\x86\x99?\xe8\xf3\x11\xbc\xed\xef\x86U.9\x03z")
|
71
|
+
'01GTCKZT7K26YEVVW6AMQ3J0VT'
|
72
|
+
>>> ulid_transform.ulid_to_bytes_or_none('0001HZX0NW00GW0X476W5TVBFE')
|
73
|
+
b'\x00\x00c\xfe\x82\xbc\x00!\xc0t\x877\x0b\xad\xad\xee'
|
74
|
+
>>> ulid_transform.ulid_to_bytes_or_none(None)
|
75
|
+
>>> ulid_transform.bytes_to_ulid_or_none(b'\x00\x00c\xfe\x82\xbc\x00!\xc0t\x877\x0b\xad\xad\xee')
|
76
|
+
'0001HZX0NW00GW0X476W5TVBFE'
|
77
|
+
>>> ulid_transform.bytes_to_ulid_or_none(None)
|
78
|
+
```
|
79
|
+
|
80
|
+
## Installation
|
81
|
+
|
82
|
+
Install this via pip (or your favourite package manager):
|
83
|
+
|
84
|
+
`pip install ulid-transform`
|
85
|
+
|
86
|
+
## Contributors ✨
|
87
|
+
|
88
|
+
Thanks to https://github.com/suyash/ulid which provides the cython implementation guts.
|
89
|
+
|
90
|
+
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
91
|
+
|
92
|
+
<!-- prettier-ignore-start -->
|
93
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
94
|
+
<!-- markdownlint-disable -->
|
95
|
+
<!-- markdownlint-enable -->
|
96
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
97
|
+
<!-- prettier-ignore-end -->
|
98
|
+
|
99
|
+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
100
|
+
|
101
|
+
## Credits
|
102
|
+
|
103
|
+
This package was created with
|
104
|
+
[Copier](https://copier.readthedocs.io/) and the
|
105
|
+
[browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)
|
106
|
+
project template.
|
107
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
ulid_transform-1.0.1.dist-info/RECORD,,
|
2
|
+
ulid_transform-1.0.1.dist-info/WHEEL,sha256=FJ2Hq62F2pHIgOJslhxnddvRN6-Z3GOXwAAVRZEAcRc,145
|
3
|
+
ulid_transform-1.0.1.dist-info/LICENSE,sha256=gieJjxNidEKH1VXLqbV9tuqnmcnqvMqt5xcmktkn5I4,1072
|
4
|
+
ulid_transform-1.0.1.dist-info/METADATA,sha256=lv-kg7hRy3nMs2CrSEkLzLT5N_MtIdHw8q5_IfxRFII,5396
|
5
|
+
ulid_transform/ulid_wrapper.h,sha256=uDDC1AY2BkyHRkXoKso_qHK7IVrmkyZwqE2g7JtYdRQ,506
|
6
|
+
ulid_transform/_py_ulid_impl.py,sha256=4fiV3uTS9JI8mTKPGJDKaBQIB4R9jYRjTSSCmYID_5I,10224
|
7
|
+
ulid_transform/__init__.pyi,sha256=eRmwQvXnwgj1mhdVokznDZVwOl2Xr_5tEAertTjkI5s,468
|
8
|
+
ulid_transform/_ulid_impl.pyx,sha256=C64Ca_ydLglYYadIVgrQvMMVKPbpc6nfaOHTFK66ORU,4441
|
9
|
+
ulid_transform/ulid_uint128.hh,sha256=W_EkG8AmjhKdzkl6Wz3t5XY11sE7LgCqKBmhdxjjQ90,14815
|
10
|
+
ulid_transform/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
|
+
ulid_transform/ulid_wrapper.cpp,sha256=om3LXOJRI1zksRm3p03hFecssOdHlW0GGo8VJ9j3fIE,2798
|
12
|
+
ulid_transform/__init__.py,sha256=QSKRP2q8vaSd4YSrhKjgGEP4i5SiFnmdckcs8xZQ25Q,853
|
13
|
+
ulid_transform/ulid.hh,sha256=cCMqxiPh9iw5hOxvu4czd2I6Rgnl7z9hc9c5a78qLLI,295
|
14
|
+
ulid_transform/ulid_struct.hh,sha256=vPUTL0wOvm0YRtLbuVZCYLyDaFmTA_WdLASQ786n4FQ,19309
|
15
|
+
ulid_transform/_ulid_impl.cpython-313-i386-linux-gnu.so,sha256=ambqp24JSuLuc6RrV-BhOya_86NLRk42YmoJS41N974,375304
|