
    a
i{                    J    d Z ddl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dS )ziPublic UUID v7 helpers.

These helpers expose utilities for generating UUID v7 identifiers in user code.
    )annotationsN   )uuid7return
_uuid.UUIDc                     t                      S )zfGenerate a random UUID v7.

    Returns:
        uuid.UUID: A random, RFC 9562-compliant UUID v7.
    )_uuid7     C:\Users\Dell Inspiron 16\Desktop\tws\AgrotaPowerBi\back-agrota-powerbi\mcp-client-agrota\venv\Lib\site-packages\langsmith/uuid.pyr   r      s     88Or   dt_dt.datetimec                    | j         %|                     t          j        j                  } t          |                                 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.
    N)tzinfoi ʚ;)r   replace_dttimezoneutcint	timestampr	   )r   nanosecondss     r   uuid7_from_datetimer      sL     
yZZs|/Z00bllnn}455K+r   r   r   )r   r   )r   r   r   r   )__doc__
__future__r   datetimer   uuid_uuid_internal._uuidr   r	   r   __all__r
   r   r   <module>r       s    
 # " " " " "         , , , , , ,       )
*r   