logfire-api
Shim for the Logfire SDK which does nothing unless Logfire is installed
Decision gist · record as of 2026-08-14
Yes, if you are a library author or framework maintainer who wants to offer Logfire integration without requiring it as a hard dependency. The low friction, no runtime dependencies, and permissive license make it a straightforward addition to any package's instrumentation layer. Not necessary for applications that already depend directly on logfire.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction with no runtime dependencies.
- Actively maintained as of 9 days ago with current Python version support (3.10+).
License · maintenance · safety
MIT (permissive) — MIT license permits use in both open-source and proprietary projects with minimal restrictions.
last release 2026-08-05 (9 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 26,858,631 downloads/mo, #871 on PyPI
Alternatives
Verify before relying
pip install logfire-api
import logfire
# Calls do nothing if logfire is not installed
logfire.info('message')- Whether the shim API surface fully mirrors the current logfire package API
- How version compatibility is managed between logfire-api and logfire releases
- Performance overhead of the no-op shim when logfire is not installed
What it is and what it does
logfire-api is a lightweight shim that mirrors the public API of the Logfire observability SDK. When Logfire is not installed, all API calls silently do nothing; when Logfire is installed, the shim delegates to the real implementation. This design lets library authors add Logfire instrumentation without forcing users to install Logfire as a dependency.
The package is intended for library maintainers who want to offer opt-in Logfire integration. By depending on logfire-api instead of logfire directly, a library can instrument its code and let end users decide whether to install Logfire. The shim ensures that the library works correctly whether Logfire is present or absent, eliminating the need for conditional imports or feature flags in library code.
Use it for
- Library author adding observability hooks that activate only if Logfire is installed by the end user
- Framework providing optional structured logging without making Logfire a required dependency
- Package wanting to instrument internal calls while keeping Logfire as an optional enhancement
- Distributed system component offering tracing integration that works standalone or with Logfire
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are a library author or framework maintainer who wants to offer Logfire integration without requiring it as a hard dependency.
The low friction, no runtime dependencies, and permissive license make it a straightforward addition to any package's instrumentation layer. Not necessary for applications that already depend directly on logfire.
Install
logfire-api on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained as of 9 days ago with current Python version support (3.10+).
Requires Python 3.10 or later.
License in practice
MIT license permits use in both open-source and proprietary projects with minimal restrictions.
Quickstart
pip install logfire-api
import logfire
# Calls do nothing if logfire is not installed
logfire.info('message')
Verify before relying
- Whether the shim API surface fully mirrors the current logfire package API
- How version compatibility is managed between logfire-api and logfire releases
- Performance overhead of the no-op shim when logfire is not installed
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 9 days since the last release |
| First released | |
| Downloads | 26,858,631 / month, #871 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: logfire_api-4.40.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “optional logfire integration”
- logfire-apilogfire-api provides a no-op shim of the Logfire SDK API that…
- logfireLogfire is a Python observability platform that captures traces,…
- pydantic-evalsPydantic Evals provides a framework for defining test cases, custom…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
Logfire is a Python observability platform that captures traces, metrics, and logs from your application and sends them to a hosted dashboard for analysis, with built-in instrumentation for popular frameworks and Pydantic models.
This package is a deprecated migration shim that depends solely on fastapi; it exists only to redirect old projects and should not be installed.
This package is a deprecated compatibility shim that redirects users to install the `modal` package instead; it is no longer functional.
Provides a pure-Python shim for the selinux module that works inside virtualenvs, allowing tools to import selinux without requiring system-level virtualenv configuration.
Install only if you encounter the virtualenv selinux import problem.
This package is a deprecated migration shim that exists only to redirect users to the main typer package; it has no independent functionality.
A pytest plugin that conditionally enables other pytest plugins based on configuration, activating them only if they are installed.
See also rpm · agent-framework-devui · resolvelib · logfury