LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
  • RemoteGraph
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDKRemoteGraph
Language
Theme
Pythonlangsmithuuiduuid7_from_datetime
Function●Since v0.4

uuid7_from_datetime

Generate a UUID v7 from a datetime.

Copy
uuid7_from_datetime(
    dt: _dt.datetime,
) -> _uuid.UUID

Parameters

NameTypeDescription
dt*_dt.datetime

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

View source on GitHub