brk-code

logfire の API リファレンス

logfire (pydantic/logfire) の公開 API 239 件 —— クラス 81、関数 64、メソッド 94。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: pydantic/logfire

種別件数
クラス81
関数64
メソッド94

API 一覧

funclogfire-api.logfire_api.logfire_info() -> str
Show versions of logfire, OS and related packages.
classlogfire._internal.auth.NewDeviceFlow
Matches model of the same name in the backend.
classlogfire._internal.auth.UserToken
A user token.
methodlogfire._internal.auth.UserToken.is_expired() -> bool
Whether the token is expired.
classlogfire._internal.auth.UserTokenCollection
A collection of user tokens, read from a user tokens file.
methodlogfire._internal.auth.UserTokenCollection.add_token(base_url:str, token:UserTokenData) -> UserToken
Add a user token to the collection.
methodlogfire._internal.auth.UserTokenCollection.get_token(base_url:str | None=None) -> UserToken
Get a user token from the collection.
methodlogfire._internal.auth.UserTokenCollection.logout(base_url:str | None=None) -> list[str]
Remove user token(s) from the collection.
classlogfire._internal.auth.UserTokenData
User token data.
classlogfire._internal.auth.UserTokensFileData
Content of the file containing the user tokens.
funclogfire._internal.auth.poll_for_token(session:requests.Session, device_code:str, base_api_url:str) -> UserTokenData
Poll the Logfire API for the user token.
funclogfire._internal.auth.request_device_code(session:requests.Session, base_api_url:str) -> tuple[str, str]
Request a device code from the Logfire API.
funclogfire._internal.auto_trace.install_auto_tracing(logfire:Logfire, modules:Sequence[str] | Callable[[AutoTraceModule], bool], *min_duration:float, *check_imported_modules:Literal['error', 'warn', 'ignore']='error') -> None
Install automatic tracing.
funclogfire._internal.cli.auth.parse_auth(args:argparse.Namespace) -> None
Authenticate with Logfire.
funclogfire._internal.cli.auth.parse_logout(args:argparse.Namespace) -> None
Log out from Logfire.
funclogfire._internal.cli.gateway.parse_gateway(args:argparse.Namespace) -> None
Run a local OAuth proxy for the Logfire AI Gateway.
classlogfire._internal.cli.gateway_auth.CimdOAuthClient
Public OAuth client identified by a CIMD URL.
classlogfire._internal.cli.gateway_auth.OAuthSession
In-memory OAuth token state for the local gateway proxy.
funclogfire._internal.cli.gateway_auth.discover_oauth_metadata(http:Any, backend:str) -> OAuthMetadata
Fetch the backend's OAuth authorization server metadata.
funclogfire._internal.cli.logfire_info() -> str
Show versions of logfire, OS and related packages.
funclogfire._internal.cli.main(args:list[str] | None=None) -> None
Run the CLI.
funclogfire._internal.cli.parse_clean(args:argparse.Namespace) -> None
Remove the contents of the Logfire data directory.
funclogfire._internal.cli.parse_create_new_project(args:argparse.Namespace) -> None
Create a new project.
funclogfire._internal.cli.parse_create_read_token(args:argparse.Namespace) -> None
Create a read token for a project.
funclogfire._internal.cli.parse_info(_args:argparse.Namespace) -> None
Show versions of logfire, OS and related packages.
funclogfire._internal.cli.parse_list_projects(args:argparse.Namespace) -> None
List user projects.
funclogfire._internal.cli.parse_use_project(args:argparse.Namespace) -> None
Use an existing project.
funclogfire._internal.cli.prompt.parse_prompt(args:argparse.Namespace) -> None
Creates a prompt to be used with your favorite LLM.
funclogfire._internal.cli.run.installed_packages() -> set[str]
Get a set of all installed packages.
funclogfire._internal.cli.version_callback() -> None
Show the version and exit.
classlogfire._internal.client.LogfireClient
A Logfire HTTP client to interact with the API.
methodlogfire._internal.client.LogfireClient.create_new_project(organization:str, project_name:str)
Create a new project.
methodlogfire._internal.client.LogfireClient.from_url(base_url:str | None, server_response_hook:ServerResponseCallback | None=None) -> Self
Create a client from the provided base URL.
methodlogfire._internal.client.LogfireClient.get_prompt(organization:str, project_name:str, issue:str) -> dict[str, Any]
Get a prompt to be used with your favorite LLM.
methodlogfire._internal.client.LogfireClient.get_user_information() -> dict[str, Any]
Get information about the logged-in user.
methodlogfire._internal.client.LogfireClient.get_user_organizations() -> list[dict[str, Any]]
Get the organizations of the logged-in user.
methodlogfire._internal.client.LogfireClient.get_user_projects() -> list[dict[str, Any]]
Get the projects of the logged-in user.
classlogfire._internal.config.AdvancedOptions
Options primarily used for testing by Logfire developers.
classlogfire._internal.config.CodeSource
Settings for the source code of the project.
classlogfire._internal.config.ConsoleOptions
Options for controlling console output.
classlogfire._internal.config.LogfireCredentials
Credentials for logfire.dev.
methodlogfire._internal.config.LogfireCredentials.from_token(token:str, session:requests.Session, base_url:str) -> Self | None
Check that the token is valid.
methodlogfire._internal.config.LogfireCredentials.load_creds_file(creds_dir:Path) -> Self | None
Check if a credentials file exists and if so load it.
methodlogfire._internal.config.LogfireCredentials.print_token_summary() -> None
Print a summary of the existing project.
methodlogfire._internal.config.LogfireCredentials.write_creds_file(creds_dir:Path) -> None
Write a credentials file to the given path.
classlogfire._internal.config.MetricsOptions
Configuration of metrics.
classlogfire._internal.config.PydanticPlugin
Options for the Pydantic plugin.
funclogfire._internal.config.get_base_url_from_token(token:str) -> str
Get the base API URL from the token's region.
funclogfire._internal.config.get_git_revision_hash() -> str
Get the current git commit hash.
classlogfire._internal.config_params.ParamManager
Manage parameters for a Logfire instance.
methodlogfire._internal.config_params.ParamManager.load_param(name:str, runtime:Any=None) -> Any
Load a parameter given its name.
funclogfire._internal.db_statement_summary.summarize_query(db_statement:str) -> str | None
Summarize a database statement, specifically SQL queries.
methodlogfire._internal.exporters.console.SimpleConsoleSpanExporter.export(spans:Sequence[ReadableSpan]) -> SpanExportResult
Export the spans to the console.
methodlogfire._internal.exporters.console.SimpleConsoleSpanExporter.force_flush(timeout_millis:int=0) -> bool
Force flush all spans, does nothing for this exporter.
funclogfire._internal.integrations.llm_providers.anthropic.make_tool_call_part(tool_call_id:str, name:str, arguments:Any) -> ToolCallPart
Helper function to create a ToolCallPart.
funclogfire._internal.integrations.llm_providers.openai.make_tool_call_part(tool_call_id:str, name:str, arguments:Any) -> ToolCallPart
Helper function to create a ToolCallPart.
classlogfire._internal.integrations.llm_providers.semconv.BlobPart
Binary data part.
classlogfire._internal.integrations.llm_providers.semconv.FilePart
Provider file reference part.
classlogfire._internal.integrations.llm_providers.semconv.OutputMessage
An output message with optional finish reason.
classlogfire._internal.integrations.llm_providers.semconv.ReasoningPart
Reasoning/thinking content part.
classlogfire._internal.integrations.llm_providers.semconv.TextPart
Text content part.
classlogfire._internal.integrations.llm_providers.semconv.ToolCallPart
Tool call part.
classlogfire._internal.integrations.llm_providers.semconv.ToolCallResponsePart
Tool call response part.
classlogfire._internal.integrations.llm_providers.types.StreamState
Keeps track of the state of a streamed response.
methodlogfire._internal.integrations.llm_providers.types.StreamState.get_attributes(span_data:dict[str, Any]) -> dict[str, Any]
Attributes to include in the log.
classlogfire._internal.integrations.pytest.LogfirePluginConfig
Configuration for the Logfire pytest plugin.
funclogfire._internal.integrations.pytest.pytest_addoption(parser:pytest.Parser) -> None
Add Logfire options to pytest.
funclogfire._internal.integrations.pytest.pytest_configure(config:pytest.Config) -> None
Configure Logfire when the plugin is enabled.
funclogfire._internal.integrations.pytest.pytest_runtest_makereport(item:pytest.Item, call:pytest.CallInfo[Any]) -> Generator[None, pytest.TestReport, None]
Record test outcomes and exceptions.
funclogfire._internal.integrations.pytest.pytest_runtest_protocol(item:pytest.Item, nextitem:pytest.Item | None) -> Generator[None]
Create a span for each test.
funclogfire._internal.integrations.pytest.pytest_sessionfinish(session:pytest.Session, exitstatus:int) -> None
End the session span and flush traces.
funclogfire._internal.integrations.pytest.pytest_sessionstart(session:pytest.Session) -> None
Create a session span when the test session starts.
funclogfire._internal.integrations.pytest.pytest_xdist_setupnodes(config:Any, specs:Any) -> None
Inject TRACEPARENT into env before xdist spawns workers.
funclogfire._internal.json_schema.create_json_schema(obj:Any, seen:set[int]) -> JsonDict
Create a JSON Schema from the given object.
classlogfire._internal.main.Logfire
The main logfire class.
methodlogfire._internal.main.Logfire.debug(msg_template:str, *_tags:Sequence[str] | None=None, *_exc_info:ExcInfo=False, **attributes:Any) -> None
Log a debug message.
methodlogfire._internal.main.Logfire.error(msg_template:str, *_tags:Sequence[str] | None=None, *_exc_info:ExcInfo=False, **attributes:Any) -> None
Log an error message.
methodlogfire._internal.main.Logfire.fatal(msg_template:str, *_tags:Sequence[str] | None=None, *_exc_info:ExcInfo=False, **attributes:Any) -> None
Log a fatal message.
methodlogfire._internal.main.Logfire.force_flush(timeout_millis:int=3000) -> bool
Force flush all spans and metrics.
methodlogfire._internal.main.Logfire.info(msg_template:str, *_tags:Sequence[str] | None=None, *_exc_info:ExcInfo=False, **attributes:Any) -> None
Log an info message.
methodlogfire._internal.main.Logfire.install_auto_tracing(modules:Sequence[str] | Callable[[AutoTraceModule], bool], *min_duration:float, *check_imported_modules:Literal['error', 'warn', 'ignore']='error') -> None
Install automatic tracing.
methodlogfire._internal.main.Logfire.instrument_dspy(**kwargs:Any)
Instrument [DSPy](https://dspy.ai/).
methodlogfire._internal.main.Logfire.instrument_pydantic(record:PydanticPluginRecordValues='all', include:Iterable[str]=(), exclude:Iterable[str]=()) -> None
Instrument Pydantic model validations.
methodlogfire._internal.main.Logfire.instrument_system_metrics(config:SystemMetricsConfig | None=None, base:SystemMetricsBase='basic') -> None
Collect system metrics.
methodlogfire._internal.main.Logfire.log(level:LevelName | int, msg_template:str, attributes:dict[str, Any] | None=None, tags:Sequence[str] | None=None, exc_info:ExcInfo=False, console_log:bool | None=None) -> None
Log a message.
methodlogfire._internal.main.Logfire.metric_counter(name:str, *unit:str='', *description:str='') -> Counter
Create a counter metric.
methodlogfire._internal.main.Logfire.metric_gauge(name:str, *unit:str='', *description:str='') -> Gauge
Create a gauge metric.
methodlogfire._internal.main.Logfire.metric_histogram(name:str, *unit:str='', *description:str='') -> Histogram
Create a histogram metric.
methodlogfire._internal.main.Logfire.metric_up_down_counter(name:str, *unit:str='', *description:str='') -> UpDownCounter
Create an up-down counter metric.
methodlogfire._internal.main.Logfire.notice(msg_template:str, *_tags:Sequence[str] | None=None, *_exc_info:ExcInfo=False, **attributes:Any) -> None
Log a notice message.
methodlogfire._internal.main.Logfire.shutdown(timeout_millis:int=30000, flush:bool=True) -> bool
Shut down all tracers and meters.
methodlogfire._internal.main.Logfire.trace(msg_template:str, *_tags:Sequence[str] | None=None, *_exc_info:ExcInfo=False, **attributes:Any) -> None
Log a trace message.
methodlogfire._internal.main.Logfire.url_from_eval(report:EvaluationReport[Any, Any, Any]) -> str | None
Generate a Logfire URL to view an evaluation report.
methodlogfire._internal.main.Logfire.warning(msg_template:str, *_tags:Sequence[str] | None=None, *_exc_info:ExcInfo=False, **attributes:Any) -> None
Log a warning message.
methodlogfire._internal.main.Logfire.with_settings(*tags:Sequence[str]=(), *console_log:bool | None=None, *custom_scope_suffix:str | None=None) -> Logfire
A new Logfire instance which uses the given settings.
methodlogfire._internal.main.Logfire.with_tags(*tags:str) -> Logfire
A new Logfire instance which always uses the given tags.
methodlogfire._internal.main.Logfire.with_trace_sample_rate(sample_rate:float) -> Logfire
A new Logfire instance with the given sampling ratio applied.
classlogfire._internal.main.NoopSpan
Implements the same methods as `LogfireSpan` but does nothing.
funclogfire._internal.main.prepare_otlp_attribute(value:Any) -> otel_types.AttributeValue
Convert a user attribute to an OpenTelemetry compatible type.
funclogfire._internal.main.prepare_otlp_attributes(attributes:dict[str, Any]) -> dict[str, otel_types.AttributeValue]
Prepare attributes for sending to OpenTelemetry.
classlogfire._internal.scrubbing.Scrubber
Redacts potentially sensitive data.
classlogfire._internal.scrubbing.ScrubbingOptions
Options for redacting sensitive data.
classlogfire._internal.scrubbing.SpanScrubber
Does the actual scrubbing work.
funclogfire._internal.stack_info.is_user_code(code:CodeType) -> bool
Check if the code object is from user code.
funclogfire._internal.tracer.should_sample(span_context:SpanContext, attributes:Mapping[str, otel_types.AttributeValue]) -> bool
Determine if a span should be sampled.
funclogfire._internal.ulid.ulid(random:Random, ms_timestamp_generator:Callable[[], int]) -> int
Generate an integer ULID compatible with UUID v4.
classlogfire._internal.utils.BaseExceptionGroup
Stub for BaseExceptionGroup for Python < 3.11.
classlogfire._internal.utils.ReadableSpanDict
A dictionary representation of a ReadableSpan.
classlogfire._internal.utils.UnexpectedResponse
An unexpected response was received from the server.
methodlogfire._internal.utils.UnexpectedResponse.raise_for_status(response:Response) -> None
Like the requests method, but raises a more informative exception.
funclogfire._internal.utils.get_version(version:str) -> Version
Return a packaging.version.Version object from a version string.
funclogfire._internal.utils.platform_is_emscripten() -> bool
Return True if the platform is Emscripten, e.g.
funclogfire._internal.utils.read_toml_file(path:Path) -> dict[str, Any]
Read a TOML file and return the parsed data.
funclogfire._internal.utils.span_to_dict(span:ReadableSpan) -> ReadableSpanDict
See ReadableSpanDict.
funclogfire._internal.utils.uniquify_sequence(seq:Sequence[T]) -> tuple[T, ...]
Remove duplicates from a sequence preserving order.
classlogfire.db_api.Connection
PEP 249 Connection wrapping a `LogfireQueryClient`.
methodlogfire.db_api.Connection.close() -> None
Close the connection and the underlying HTTP client.
methodlogfire.db_api.Connection.commit() -> None
No-op (read-only connection).
methodlogfire.db_api.Connection.cursor() -> Cursor
Create a new cursor associated with this connection.
methodlogfire.db_api.Connection.rollback() -> None
No-op (read-only connection).
methodlogfire.db_api.Cursor.close() -> None
Mark the cursor as closed.
methodlogfire.db_api.Cursor.execute(operation:str, parameters:dict[str, Any] | Sequence[Any] | None=None) -> None
Execute a SQL query.
methodlogfire.db_api.Cursor.executemany(operation:str, seq_of_parameters:Sequence[dict[str, Any] | Sequence[Any]]) -> None
Execute the same query with each set of parameters.
methodlogfire.db_api.Cursor.fetchall() -> list[tuple[Any, ...]]
Fetch all remaining rows.
methodlogfire.db_api.Cursor.fetchmany(size:int | None=None) -> list[tuple[Any, ...]]
Fetch the next `size` rows (default: `arraysize`).
methodlogfire.db_api.Cursor.setinputsizes(_sizes:Any) -> None
No-op (PEP 249 optional).
methodlogfire.db_api.Cursor.setoutputsize(_size:Any, _column:Any=None) -> None
No-op (PEP 249 optional).
classlogfire.db_api.DatabaseError
Exception raised for errors related to the database.
classlogfire.db_api.Error
Base class for all DB API errors.
classlogfire.db_api.InterfaceError
Exception raised for errors related to the database interface.
classlogfire.db_api.NotSupportedError
Exception raised when an unsupported operation is attempted.
classlogfire.db_api.ProgrammingError
Exception raised for programming errors, e.g.
classlogfire.db_api.Warning
Exception raised for important warnings, e.g.
classlogfire.exceptions.LogfireConfigError
Error raised when there is a problem with the Logfire configuration.
funclogfire.experimental.annotations.record_feedback(traceparent:str, name:str, value:int | float | bool | str, comment:str | None=None, extra:dict[str, Any] | None=None) -> None
Attach feedback to a span.
classlogfire.experimental.api_client.AsyncLogfireAPIClient
Asynchronous client for managing Logfire datasets.
methodlogfire.experimental.api_client.AsyncLogfireAPIClient.add_cases(dataset_id_or_name:str, cases:Sequence[Case[InputsT, OutputT, MetadataT]] | Sequence[CaseData], *on_conflict:str='update') -> list[CaseDetail]
Add cases to a dataset.
methodlogfire.experimental.api_client.AsyncLogfireAPIClient.delete_case(dataset_id_or_name:str, case_id:str) -> None
Delete a case from a dataset.
methodlogfire.experimental.api_client.AsyncLogfireAPIClient.delete_dataset(id_or_name:str) -> None
Delete a dataset.
methodlogfire.experimental.api_client.AsyncLogfireAPIClient.get_case(dataset_id_or_name:str, case_id:str) -> CaseDetail
Get a specific case from a dataset.
methodlogfire.experimental.api_client.AsyncLogfireAPIClient.list_cases(dataset_id_or_name:str) -> list[CaseDetail]
List all cases in a dataset.
methodlogfire.experimental.api_client.AsyncLogfireAPIClient.list_datasets() -> list[DatasetSummary]
List all datasets.
classlogfire.experimental.api_client.CaseData
Data for creating a case via `LogfireAPIClient.add_cases`.
classlogfire.experimental.api_client.CaseNotFoundError
Raised when a case is not found.
classlogfire.experimental.api_client.DatasetApiError
Raised when the API returns an error.
classlogfire.experimental.api_client.DatasetDetail
Full dataset metadata.
classlogfire.experimental.api_client.DatasetNotFoundError
Raised when a dataset is not found.
classlogfire.experimental.api_client.ExportedDataset
Dataset export in pydantic-evals-compatible format.
classlogfire.experimental.api_client.LogfireAPIClient
Synchronous client for managing Logfire datasets.
methodlogfire.experimental.api_client.LogfireAPIClient.add_cases(dataset_id_or_name:str, cases:Sequence[Case[InputsT, OutputT, MetadataT]] | Sequence[CaseData], *on_conflict:str='update') -> list[CaseDetail]
Add cases to a dataset.
methodlogfire.experimental.api_client.LogfireAPIClient.delete_case(dataset_id_or_name:str, case_id:str) -> None
Delete a case from a dataset.
methodlogfire.experimental.api_client.LogfireAPIClient.delete_dataset(id_or_name:str) -> None
Delete a dataset and all its cases.
methodlogfire.experimental.api_client.LogfireAPIClient.get_case(dataset_id_or_name:str, case_id:str) -> CaseDetail
Get a specific case from a dataset.
methodlogfire.experimental.api_client.LogfireAPIClient.list_cases(dataset_id_or_name:str) -> list[CaseDetail]
List all cases in a dataset.
methodlogfire.experimental.api_client.LogfireAPIClient.list_datasets() -> list[DatasetSummary]
List all datasets in the project.
classlogfire.experimental.query_client.AsyncLogfireQueryClient
An asynchronous client for querying Logfire data.
methodlogfire.experimental.query_client.AsyncLogfireQueryClient.info() -> ReadTokenInfo
Get information about the read token.
classlogfire.experimental.query_client.LogfireQueryClient
A synchronous client for querying Logfire data.
methodlogfire.experimental.query_client.LogfireQueryClient.info() -> ReadTokenInfo
Get information about the read token.
classlogfire.experimental.query_client.QueryExecutionError
Raised when the query execution fails on the server.
classlogfire.experimental.query_client.QueryRequestError
Raised when the query request is invalid.
classlogfire.experimental.query_client.QueryResults
The (column-oriented) results of a JSON-format query.
classlogfire.experimental.query_client.ReadTokenInfo
Information about the read token.
classlogfire.experimental.query_client.RowQueryResults
The row-oriented results of a JSON-format query.
classlogfire.integrations.flask.CommenterOptions
The `commenter_options` parameter for `instrument_flask`.
classlogfire.integrations.httpx.RequestInfo
Information about an HTTP request.
classlogfire.integrations.httpx.ResponseInfo
Information about an HTTP response.
classlogfire.integrations.loguru.LogfireHandler
A loguru handler that sends logs to **Logfire**.
methodlogfire.integrations.loguru.LogfireHandler.fill_attributes(record:LogRecord) -> dict[str, Any]
Fill attributes from a log record.
classlogfire.integrations.pydantic.LogfirePydanticPlugin
Implements a new API for pydantic plugins.
classlogfire.integrations.pydantic.LogfireSettings
Settings for the logfire integration.
classlogfire.integrations.pydantic.PluginSettings
A typed dict for the Pydantic plugin settings.
funclogfire.integrations.pydantic.get_pydantic_plugin_config() -> PydanticPlugin
Get the Pydantic plugin config.
funclogfire.integrations.pydantic.get_schema_name(schema:CoreSchema) -> str
Find the best name to use for a schema.
funclogfire.integrations.pydantic.set_pydantic_plugin_config(plugin_config:PydanticPlugin | None) -> None
Set the pydantic plugin config.
classlogfire.integrations.redis.RequestHook
A hook that is called before the request is sent.
classlogfire.integrations.redis.ResponseHook
A hook that is called after the response is received.
funclogfire.loguru_handler() -> Any
Create a **Logfire** handler for Loguru.
classlogfire.propagate.WrapperPropagator
Helper base class to wrap another propagator.
methodlogfire.testing.IncrementalIdGenerator.generate_span_id() -> int
Generates a span id.
methodlogfire.testing.IncrementalIdGenerator.generate_trace_id() -> int
Generates a trace id.
methodlogfire.testing.IncrementalIdGenerator.reset_trace_span_ids() -> None
Resets the trace and span ids.
classlogfire.testing.TimeGenerator
Generate incrementing timestamps for testing.
funclogfire.testing.capfire() -> CaptureLogfire
A fixture that returns a CaptureLogfire instance.
funclogfire.testing.get_collected_metrics(metrics_reader:InMemoryMetricReader) -> list[dict[str, Any]]
Get the collected metrics as a list of dictionaries.
classlogfire.types.ExceptionCallbackHelper
Helper object passed to the exception callback.
methodlogfire.types.ExceptionCallbackHelper.create_issue() -> bool
Whether to create an issue for this exception.
classlogfire.types.ServerResponseCallbackHelper
Helper object passed to the server response callback.
classlogfire.types.SpanLevel
A convenience class for comparing span/log levels.
methodlogfire.types.SpanLevel.from_span(span:ReadableSpan) -> SpanLevel
Create a SpanLevel from an OpenTelemetry span.
funclogfire.variables._handlebars.extract_composition_dependencies(template:str) -> frozenset[str]
Return the top-level `@{name}@` references in *template*.
classlogfire.variables.abstract.ValidationReport
Report of variable validation results.
methodlogfire.variables.abstract.ValidationReport.format(*colors:bool=True) -> str
Format the validation report for human-readable output.
methodlogfire.variables.abstract.ValidationReport.has_errors() -> bool
Return True if there are any validation errors.
classlogfire.variables.abstract.VariableChange
Represents a change to be made to a variable.
classlogfire.variables.abstract.VariableDiff
Represents the diff between local and server variables.
methodlogfire.variables.abstract.VariableDiff.has_changes() -> bool
Return True if there are any changes to apply.
classlogfire.variables.abstract.VariableNotFoundError
Raised when a variable is not found.
classlogfire.variables.abstract.VariableProvider
Abstract base class for variable value providers.
methodlogfire.variables.abstract.VariableProvider.batch_update(updates:dict[str, VariableConfig | None]) -> None
Update multiple variables atomically.
methodlogfire.variables.abstract.VariableProvider.create_variable(config:VariableConfig) -> VariableConfig
Create a new variable configuration.
methodlogfire.variables.abstract.VariableProvider.delete_variable(name:str) -> None
Delete a variable configuration.
methodlogfire.variables.abstract.VariableProvider.get_all_variables_config() -> VariablesConfig
Retrieve all variable configurations.
methodlogfire.variables.abstract.VariableProvider.get_variable_config(name:str) -> VariableConfig | None
Retrieve the full configuration for a variable.
methodlogfire.variables.abstract.VariableProvider.get_variable_type(name:str) -> VariableTypeConfig | None
Get a variable type by name.
methodlogfire.variables.abstract.VariableProvider.list_variable_types() -> dict[str, VariableTypeConfig]
List all variable types from the provider.
methodlogfire.variables.abstract.VariableProvider.push_config(config:VariablesConfig, *mode:SyncMode='merge', *dry_run:bool=False, *yes:bool=False) -> bool
Push a VariablesConfig to this provider.
methodlogfire.variables.abstract.VariableProvider.push_variables(variables:Sequence[Variable[object]], *dry_run:bool=False, *yes:bool=False, *strict:bool=False) -> bool
Push variable definitions to this provider.
methodlogfire.variables.abstract.VariableProvider.refresh(force:bool=False)
Refresh the value provider.
methodlogfire.variables.abstract.VariableProvider.start(logfire_instance:logfire.Logfire | None) -> None
Start any background tasks for this provider.
methodlogfire.variables.abstract.VariableProvider.update_variable(name:str, config:VariableConfig) -> VariableConfig
Update an existing variable configuration.
methodlogfire.variables.abstract.VariableProvider.upsert_variable_type(config:VariableTypeConfig) -> VariableTypeConfig
Create or update a variable type.
classlogfire.variables.abstract.VariableWriteError
Base exception for variable write operation failures.
funclogfire.variables.abstract.render_serialized_string(serialized_json:str, inputs:Any) -> str
Render Handlebars templates in a serialized JSON string.
funclogfire.variables.composition.has_references(serialized_value:str) -> bool
Quick check for any `@{` in a serialized value.
methodlogfire.variables.config.KeyIsNotPresent.matches(attributes:Mapping[str, Any]) -> bool
Check if the attribute key does not exist in the attributes.
classlogfire.variables.config.KeyIsPresent
Condition that matches when an attribute key is present.
methodlogfire.variables.config.KeyIsPresent.matches(attributes:Mapping[str, Any]) -> bool
Check if the attribute key exists in the attributes.
classlogfire.variables.config.LatestVersion
The latest (highest) version of the variable.
classlogfire.variables.config.Rollout
Configuration for label selection with weighted probabilities.
classlogfire.variables.config.VariablesConfig
Container for all managed variable configurations.
methodlogfire.variables.config.VariablesConfig.merge(other:VariablesConfig) -> VariablesConfig
Merge another VariablesConfig into this one.
funclogfire.variables.config.get_default_type_name(t:Any) -> str
Get the default name for a Python type.
funclogfire.variables.config.get_source_hint(t:Any) -> str | None
Get a source hint for a type based on its module and qualname.
classlogfire.variables.template_validation.TemplateValidationResult
Result of template composition validation.
classlogfire.variables.variable.TemplateVariable
A managed variable with integrated template rendering.
methodlogfire.variables.variable.Variable.refresh(force:bool=False)
Asynchronously refresh the variable.
methodlogfire.variables.variable.Variable.refresh_sync(force:bool=False)
Synchronously refresh the variable.
methodlogfire.variables.variable.Variable.to_config() -> VariableConfig
Create a VariableConfig from this Variable instance.
funclogfire.variables.variable.is_resolve_function(f:Any) -> TypeIs[ResolveFunction[Any]]
Check if a callable matches the ResolveFunction signature.
funcrelease.prepare.generate_stubs() -> None
Run make logic to generate stubs and update __init__.pyi.
funcrelease.prepare.get_last_tag() -> str
Get the latest tag from the Git repository.
funcrelease.prepare.get_notes(new_version:str) -> str
Generate release notes from GitHub's release notes generator.
funcrelease.prepare.update_history(new_version:str, notes:str) -> None
Update CHANGELOG.md with the new release notes.
funcrelease.prepare.update_version(pyproject_file:str, new_version:str) -> None
Update the version in a given pyproject.toml.
funcrelease.push.commit_and_push_changes(version:str) -> None
Commit and push changes to a new branch.
funcrelease.push.create_github_release_draft(version:str, release_notes:str)
Create a GitHub release draft.
funcrelease.push.open_pull_request(version:str)
Open a pull request on GitHub.
funcrelease.shared.run_command(*args:str) -> str
Run a shell command and return the output.

この情報について

掲載しているシグネチャは pydantic/logfire の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る