skillfed

findlibs

A package to search for shared libraries on various platforms

findlibs v0.1.3 1.2M downloads/30d#4,274 on PyPI2
Permissive license Apache License Version 2.0 Active released

What it is and what it does

findlibs is a utility for locating shared libraries (like .so, .dylib, or .dll files) across different operating systems and installation contexts. It wraps a multi-stage search strategy that checks Python package installations, conda/virtualenv prefixes, environment variables (including custom HOME/DIR variables), user configuration files, standard system paths, and finally falls back to ctypes.util.find_library. This is useful when your Python code needs to call native libraries via ctypes or similar mechanisms but doesn't know where the system has installed them—common in scientific computing and data processing workflows where libraries like eccodes or odc may be installed in non-standard locations.

The package has no runtime dependencies and installs cleanly. It supports Python 3.10+ and is maintained actively, though it remains in Alpha status. The search behavior can be fine-tuned via environment variables to disable specific search stages, and users can define custom search paths in a configuration file.

Use it for:

  • Locate native libraries installed via conda or system package managers when calling them from ctypes or cffi.
  • Build Python bindings that need to find platform-specific compiled libraries without hardcoding paths.
  • Support multiple installation contexts (system, conda, custom HOME directories) in a single codebase.
  • Resolve library paths in scientific Python packages that wrap Fortran or C libraries like eccodes.
  • Debug library discovery issues by testing search paths in a controlled, configurable way.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Locates shared libraries on the system by searching Python packages, environment variables, standard system paths, and platform-specific library directories.

Yes, if you need to locate native shared libraries from Python and want to avoid hardcoding paths or writing platform-specific search logic. The permissive license, zero runtime dependencies, and active maintenance make it low-risk. The Alpha status and small user base mean edge cases may not be well-tested—verify behavior on your target platforms before relying on it in production.

Install

findlibs on PyPI

pip

pip install findlibs

uv

uv add findlibs

poetry

poetry add findlibs

Installing findlibs

Before you install

Low friction install with no runtime dependencies. Active maintenance as of July 2026, though early-stage (Alpha) with minimal download volume relative to its top-5000 tier position.

License in practice

Apache License 2.0 (permissive) allows commercial use, modification, and redistribution with minimal restrictions—suitable for most projects.

Quickstart

pip install findlibs

import findlibs
lib_path = findlibs.find("eccodes")
# or with explicit package name:
lib_path = findlibs.find(lib_name="odccore", pkg_name="odc")

Requires Python 3.10 or later.

Verify before relying

  • Whether the library search succeeds reliably on Windows (classifier says OS Independent, but most examples reference Unix-like platforms).
  • Performance characteristics when searching across many paths or large directory trees.
  • Stability of the Alpha API—whether the find() signature or behavior may change in future releases.

Package facts

License Apache License Version 2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 31 days since the last release
Last repo commit
First released
Downloads 1,168,521/month — #4,274 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: findlibs-0.1.3-py3-none-any.whl

Keywords: tool

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

find shared libraries pythonlocate .so .dylib fileslibrary path resolutioncross-platform library finderctypes library discoverysystem library locator
ctypeslibrary-discoverycross-platform

More Software Development packages