Skip to content

Releases: mdomke/python-ulid

3.2.0

Choose a tag to compare

@mdomke mdomke released this 17 Jul 12:42
3.2.0
7226f71

Added

  • Added transparent bidirectional UUIDv7 conversion methods (ULID.to_uuid7 and ULID.from_uuidv7) @pirate.
  • Added a --uuid7 option to the CLI's show command to convert and output a ULID as an RFC 4122 compliant UUIDv7.

Changed

  • Dropped support for Python 3.9 and added support for Python 3.14 @Avihais12344.
  • Depend on typing-extensions only when running on Python < 3.11 @musicinmybrain.
  • Migrated package and development workflow from Hatch to uv and poethepoet.
  • Configured Flox for bootstrapping the development environment.

Fixed

  • Fixed a clock-skew bug where non-monotonic ULIDs could be generated when crossing a millisecond boundary between timestamp and randomness sampling @gaoflow.
  • Fixed warning from uv during synchronization @jaseemabid.
  • Resolved various Ruff linter warnings and Pyrefly type checker issues.

3.1.0

Choose a tag to compare

@mdomke mdomke released this 18 Aug 16:26
3.1.0
1227759

Changed

  • Added Python 3.13 to the trove classifiers.
  • Optimze @property to @cached_property @WH-2099
  • When generating ULIDs within the same millisecond, the library will ensure monotonic sort order by incrementing the randomness component by 1 bit. This process is described in the spec.

Fixed

  • Sharpen regular expression for Pydantic @aplhk.
  • Fix Sphinx warnings when referencing ULID from an external project. @BoboTiG .

3.0.0

Choose a tag to compare

@mdomke mdomke released this 11 Oct 15:34
3.0.0
1f1a9e1

Changed

  • Raise TypeError instead of ValueError if constructor is called with value of wrong type.
  • Update ruff linter rules and switch to hatch fmt.

Added

Fixed

2.7.0

Choose a tag to compare

@mdomke mdomke released this 11 Oct 15:29
2.7.0
0804c91

Changed

  • Ensure that the validation of ULID's timestamp component aligns more closely with the ULID specification. #27 @somnam

2.6.0

Choose a tag to compare

@mdomke mdomke released this 25 May 22:54
2.6.0
e25f438

Changed

  • Use stricter validation when a ULID value from user input. When using ULID.from_str() we will check if the characters match the base32 alphabet. In general, it is ensured that the timestamp part of the ULID is not out of range.

2.5.0

Choose a tag to compare

@mdomke mdomke released this 25 May 22:49
2.5.0
76d5740

Changed

  • Generate a more accurate JSON schema with Pydantic’s BaseModel.model_json_schema(). This includes a specification for string and byte representations.

2.4.0

Choose a tag to compare

@mdomke mdomke released this 02 Apr 15:53
2.4.0
2a249fc

Added

Internal

2.3.0

Choose a tag to compare

@mdomke mdomke released this 21 Mar 13:08
2.3.0
76f9741

Added

  • ULID objects can now be converted to bytes with bytes(ulid).
  • The Pydantic v2 protocol is now supported, so that the ULID class can be directly used as type annotations in Pydantic models

Changed

  • The type annotations have been adapted, so that the classmethod constructors properly reflect the type for ULID subclasses. Thanks to @johnpaulett #9
  • Use time.time_ns() when generating ULIDs for improved performance #16 #12

2.2.0

Choose a tag to compare

@mdomke mdomke released this 21 Sep 20:26
2.2.0
13c1bc0

Added

  • Added a new flag --uuid4 to the CLI show command, that converts the provided ULID
    into an RFC 4122 compliant UUID.
  • The ulid build command allows the use of the special value - for all options to read its
    inputs from stdin. E.g.
  $ date --iso-8601 | python -m ulid build --from-datetime -
  01HAT9PVR02T3S13XB48S7GEHE

2.1.0

Choose a tag to compare

@mdomke mdomke released this 21 Sep 19:34
2.1.0
cfc4184

Added

  • The new method ULID.to_uuid4 can be used to create an RFC 4122 compliant UUID from
    an existing ULID #5.

Changed

  • The validate_types-decorator that is used for all ULID.from_*-methods to check type
    correctness at runtime has now better support for type hints.
    Thanks to @johnpaulett