
    i{                    b    d Z ddlmZ ddlZddlmc mZ ddl	Z
ddlZddlmZ d
dZddZdd	gZy)ziPublic UUID v7 helpers.

These helpers expose utilities for generating UUID v7 identifiers in user code.
    )annotationsN   )uuid7c                     t               S )zfGenerate a random UUID v7.

    Returns:
        uuid.UUID: A random, RFC 9562-compliant UUID v7.
    )_uuid7     V/home/jang/Projects/ai-researcher/.venv/lib/python3.12/site-packages/langsmith/uuid.pyr   r      s     8Or	   c                    | j                   *| j                  t        j                  j                        } t        | j                         dz        }t        |      S )zGenerate a UUID v7 from a datetime.

    Args:
        dt: A timezone-aware datetime. If naive, it is treated as UTC.

    Returns:
        uuid.UUID: A UUID v7 whose timestamp corresponds to the provided time.
    )tzinfoi ʚ;)r   replace_dttimezoneutcint	timestampr   )dtnanosecondss     r
   uuid7_from_datetimer      sH     
yyZZs||//Z0blln}45K+r	   r   r   )return
_uuid.UUID)r   z_dt.datetimer   r   )__doc__
__future__r   builtins@py_builtins_pytest.assertion.rewrite	assertionrewrite
@pytest_ardatetimer   uuid_uuid_internal._uuidr   r   r   __all__r   r	   r
   <module>r%      s4   
 #      , )
*r	   