File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ A ``ULID`` is a *universally unique lexicographically sortable identifier*. It i
42
42
* Uses Crockford's base32 for better efficiency and readability (5 bits per character)
43
43
* Case insensitive
44
44
* No special characters (URL safe)
45
+ * Monotonic sort order (correctly detects and handles the same millisecond)
45
46
46
47
In general the structure of a ULID is as follows:
47
48
@@ -150,6 +151,20 @@ The ``ULID`` class can be directly used for the popular data validation library
150
151
151
152
.. pydantic-end
152
153
154
+ .. monotonic-begin
155
+
156
+ Monotonic Support
157
+ -----------------
158
+
159
+ This library by default supports the implementation for monotonic sort order suggested by the
160
+ official ULID specification.
161
+
162
+ This means that ULID values generated in the same millisecond will have linear increasing randomness
163
+ values. If :math: `r_1 ` and :math: `r_2 ` are the randomness values of two ULIDs with the same
164
+ timestamp, then :math: `r_2 = r_1 + 1 `.
165
+
166
+ .. monotonic-end
167
+
153
168
.. cli-begin
154
169
155
170
Command line interface
@@ -207,3 +222,9 @@ Other implementations
207
222
* `ulid/javascript <https://github.com/ulid/javascript >`_
208
223
* `RobThree/NUlid <https://github.com/RobThree/NUlid >`_
209
224
* `imdario/go-ulid <https://github.com/imdario/go-ulid >`_
225
+
226
+ Contributions
227
+ -------------
228
+
229
+ Contributions are welcome! Feel free to create pull-requests for issues or feature requests.
230
+ It might be worth creating an issue upfront to discuss the matter.
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ Release v\ |release| (:ref:`What's new <changelog>`)
20
20
:start-after: pydantic-begin
21
21
:end-before: pydantic-end
22
22
23
+ .. include :: ../../README.rst
24
+ :start-after: monotonic-begin
25
+ :end-before: monotonic-end
26
+
23
27
.. include :: ../../README.rst
24
28
:start-after: cli-begin
25
29
:end-before: cli-end
You can’t perform that action at this time.
0 commit comments