dlinfo
Python wrapper for libc's dlinfo and dyld_find on Mac
What it is and what it does
dlinfo is a thin Python wrapper around libc's dlinfo function (and macOS's dyld_find), enabling you to inspect runtime properties of dynamically loaded libraries. It wraps low-level C library introspection behind a simple Python interface, so you can query things like the file path of a loaded shared library without calling dlinfo directly through ctypes.
The package has no runtime dependencies and installs as a pure Python wheel. It's intended for developers who need to examine loaded libraries at runtime—for example, to verify which version of a system library is in use, or to locate library files for further inspection. The interface is minimal: you create a DLInfo object from a ctypes library handle and access properties like path.
Use it for:
- Verify which version of libc or another system library is currently loaded in your Python process.
- Locate the file path of a dynamically loaded library for debugging or introspection purposes.
- Build tools or diagnostics that need to report on runtime library dependencies and their locations.
- Cross-platform library inspection on Linux and macOS without writing platform-specific C code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python access to libc's dlinfo function and macOS dyld_find, allowing you to query runtime information about loaded dynamic libraries.
Yes, if you need low-level library introspection on Linux or macOS. The package is lightweight, has no dependencies, and carries a permissive license. The aging maintenance is a minor concern—the last release was 575 days ago—but the code is stable and the repository is not archived. Install it if you have a specific need for dlinfo; otherwise, it's a niche tool.
Install
dlinfo on PyPI
pip
pip install dlinfouv
uv add dlinfopoetry
poetry add dlinfoInstalling dlinfo
Before you install
Low install friction with no runtime dependencies. Maintenance is aging—last release was 575 days ago, though the repository remains active and the package is marked Production/Stable.
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions.
Quickstart
pip install dlinfo
from dlinfo import DLInfo
import ctypes
import ctypes.util
lib = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))
dlinfo = DLInfo(lib)
print(dlinfo.path)
Requires Python 3.9 or later; only works on Linux and macOS systems where libc's dlinfo or dyld_find is available.
Verify before relying
- Whether the package works correctly with Python 3.12 despite the aging maintenance status.
- Current compatibility with recent macOS and Linux kernel versions.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 575 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,347,352/month — #4,019 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dlinfo-2.0.0-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
dllistLists the shared libraries (DLLs) currently…
permissive · top 15,000 on PyPI
findlibsLocates shared libraries on the system by…
permissive · top 5,000 on PyPI
find-libpythonLocates the libpython dynamic library path for…
permissive · top 5,000 on PyPI
delocateDelocate finds and relocates dynamic libraries…
permissive · top 15,000 on PyPI
appnopeDisables App Nap on macOS >= 10.9 to prevent…
permissive · top 5,000 on PyPI
pycrashreportParses Apple crash reports (iOS, macOS) into a…
copyleft · top 15,000 on PyPI
dbus-pythonProvides Python bindings to libdbus, allowing…
permissive · top 15,000 on PyPI
libarchive-clibarchive-c provides a Python interface to…
permissive · top 15,000 on PyPI
pyclibraryParses C header files and automates…
permissive · top 15,000 on PyPI
cleCLE loads binary executables and shared…
permissive · top 5,000 on PyPI