Skip to main content

Library to spot a keyword as a function inside python stdlib

Project description

pylibfinder (supports Python 3.10 to 3.14 on POSIX)

  • pylibfinder is a Python library that allows you to spot a keyword as a python object inside the Python standard library.

  • It provides a convenient way to search for objects that match a given keyword within the standard library modules.

  • With pylibfinder, you can easily identify the modules and objects that are available in Python and gain insights into their usage and availability.

  • This library is designed to assist developers in finding relevant objects and understanding the Python standard library better.

https://img.shields.io/pypi/v/pylibfinder CI Tests https://img.shields.io/pypi/pyversions/pylibfinder.svg https://img.shields.io/pypi/wheel/pylibfinder.svg https://img.shields.io/badge/C%20Extension-yes-brightgreen.svg https://img.shields.io/badge/platform-macOS-blue.svg https://img.shields.io/badge/platform-Linux-blue.svg https://img.shields.io/badge/License-MIT-blue.svg https://pepy.tech/badge/pylibfinder

Installation

For stable version

  • pip install pylibfinder

For development

Recommended (Easy setup):

  • git clone https://github.com/Agent-Hellboy/pylibfinder

  • cd pylibfinder

  • pip install -e . (installs in editable mode with proper Python headers detection)

  • make changes to src/pylibfinder.c

  • reinstall with pip install -e . to rebuild

  • open repl and test

Manual compilation:

macOS:

  • Install Homebrew Python: brew install python@3.13

  • Find Python include path: python3.13 -c "import sysconfig; print(sysconfig.get_path('include'))"

  • Compile: gcc -shared -o pylibfinder.so -fPIC -I /opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 src/pylibfinder.c src/module_scanner.c -lpython3.13

  • It will generate pylibfinder.so

  • Test in Python REPL: python3.13 -c "import pylibfinder; print(pylibfinder.find_similar('power'))

Linux:

  • Install Python dev package: sudo apt-get install python3.13-dev

  • Compile: gcc -shared -o pylibfinder.so -fPIC -I /usr/include/python3.13 src/pylibfinder.c src/module_scanner.c

  • It will generate pylibfinder.so

  • Test in Python REPL: python3.13 -c "import pylibfinder; print(pylibfinder.find_similar('power'))

Example

Semantic similarity search - Find similar functions:

>>> import pylibfinder
>>>
>>> # Search for 'power' to find math functions (default threshold 0.5)
>>> pylibfinder.find_similar('power')
[{'Module': 'builtins', 'Function': 'pow', 'Similarity': 0.6}, ...]
>>>
>>> # Search for 'print' with custom threshold
>>> result = pylibfinder.find_similar('print', 0.5)
>>> result[0]
{'Module': 'builtins', 'Function': 'print', 'Similarity': 1.0}
>>>
>>> # Find functions similar to 'parseInt' (Java function) with higher threshold
>>> pylibfinder.find_similar('parseInt', 0.6)
[{'Module': 're._parser', 'Function': '_parse_sub', 'Similarity': 0.6}]
>>>
>>> # Include private APIs (functions starting with _) in search results
>>> pylibfinder.find_similar('parse', 0.5, include_private=True)
[{'Module': 'builtins', 'Function': 'compile', 'Similarity': 0.5}, {'Module': 're._parser', 'Function': '_parse_sub', 'Similarity': 0.8}, ...]
>>>

Terminal User Interface (TUI)

Interactive Search with Beautiful UI:

pylibfinder TUI Demo

To use the interactive terminal interface, install with the TUI extra:

pip install pylibfinder[tui]

Then launch the interactive TUI:

pylibfinder-tui

Features:

  • Beautiful Interactive Interface - Built with Textual for a modern TUI experience

  • Keyboard Navigation - Smooth and responsive controls

  • Color-Coded Results - Visual indicators for match quality:

    • Green: Excellent match (90%+)

    • Cyan: Good match (70%+)

    • Yellow: Fair match (50%+)

    • Red: Low match (<50%)

  • Progress Bars - Visual representation of similarity scores

  • Real-time Search - Search directly in the TUI interface

Usage:

  1. Start the TUI: pylibfinder-tui

  2. Type your keyword in the search box (e.g., power, print, parseInt)

  3. Every keyword event sends request to the backend

  4. View results in the formatted table

  5. Press Ctrl+L to clear results or Ctrl+C to exit

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylibfinder-0.2.3.tar.gz (9.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pylibfinder-0.2.3-cp314-cp314t-musllinux_1_2_x86_64.whl (27.8 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

pylibfinder-0.2.3-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (28.7 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

pylibfinder-0.2.3-cp314-cp314t-macosx_11_0_arm64.whl (11.8 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

pylibfinder-0.2.3-cp314-cp314-musllinux_1_2_x86_64.whl (25.7 kB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

pylibfinder-0.2.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (26.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

pylibfinder-0.2.3-cp314-cp314-macosx_11_0_arm64.whl (11.6 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

pylibfinder-0.2.3-cp313-cp313-musllinux_1_2_x86_64.whl (25.5 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

pylibfinder-0.2.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (26.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

pylibfinder-0.2.3-cp313-cp313-macosx_11_0_arm64.whl (11.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pylibfinder-0.2.3-cp312-cp312-musllinux_1_2_x86_64.whl (25.4 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

pylibfinder-0.2.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (26.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

pylibfinder-0.2.3-cp312-cp312-macosx_11_0_arm64.whl (11.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pylibfinder-0.2.3-cp311-cp311-musllinux_1_2_x86_64.whl (24.5 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

pylibfinder-0.2.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (25.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

pylibfinder-0.2.3-cp311-cp311-macosx_11_0_arm64.whl (11.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pylibfinder-0.2.3-cp310-cp310-musllinux_1_2_x86_64.whl (24.3 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

pylibfinder-0.2.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (25.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

pylibfinder-0.2.3-cp310-cp310-macosx_11_0_arm64.whl (11.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file pylibfinder-0.2.3.tar.gz.

File metadata

  • Download URL: pylibfinder-0.2.3.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.24

File hashes

Hashes for pylibfinder-0.2.3.tar.gz
Algorithm Hash digest
SHA256 8f1d35d487a17e6da5408d53872618e7f201e06ff7e579ed1346f03ce1d47140
MD5 5e1078a86723510a115e58689715a49d
BLAKE2b-256 303596fb5daf73e9c27097d171d6829f1d4e9eb0239166a1024fb73bbd3ef729

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 dc97b18388412c0884edd2865650079765c5804e885bf87df07fbe2b3468f954
MD5 7ccb4140d9e44815f6b7d9f7caefef23
BLAKE2b-256 8fcab529927910a169c8db35d086847742b9de9d5f0d5b1b6827fdee1ae39c13

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 402bad22a4919a62142d095112558d0d0d968c67f3991f10cb4a03aa9323a9b7
MD5 1517fc93f2f786bdd2b0909fd1d92af1
BLAKE2b-256 3a465c0116b9cc7177aa95c5a9cba312d17fe0d7c9f107c84c26eb9066417945

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ac844ddcf60fef5a15a749e4e83683dd968757bb2b3efb0e00dddaa5d5e67fcb
MD5 301cb4689abbbdf958af38b19cecf5a4
BLAKE2b-256 06e64c784d12b0916ece4f4df08b99c8c31d4f4ad5f7fef66c06c0344f43b5fb

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bd7224be7f8e096225a9098518bf2de9205f6e22f06d43bcb7fafa52fe059798
MD5 ea3f542b0645a8fb79c09b801dc79fdd
BLAKE2b-256 d6334cd79eba08e6967090e2f8889326eaa676ae6013822ae74453174e0b72ee

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d58e4c9d709dee6457dd5cc62ecf5a5c19bf40931034937ab1c215bbb8ec6a3e
MD5 5d775e22237a5f3a8d3b5f17e3ecaffa
BLAKE2b-256 59daf543b721d2b6f44e4f1c2607d273e57a9d015f864faee1eb7b44b88e82db

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d815fe7d0ed69eae5a54edd5a1a4d78c2c401f7e6c5cf9efad17d2fd9f6d8056
MD5 c88bb5c876420c1eca23b82904c6f1b7
BLAKE2b-256 c589a3d21a7c78663786d8b9080cd6b37bd47e8db23c45d59a773250fc6ed6f2

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 879da0ddd597bb3801e144d874c1ecbab4134c7e80b28c6b76ddd8e151d94473
MD5 129bbf680f19ef2ba0883eba00f94689
BLAKE2b-256 2e2e96c4d202cafb0dd4edafe0b47abbffa99f4322efe3b7d8c7c1e9b668c7fe

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 920d6155b6548f4b3a55ee7a6bda01982761edb0211ef926331dc57272a3e9cb
MD5 accae0438f0d9ee69222875a870a2e64
BLAKE2b-256 e444c0f36059aec4b07be62c22397a985fa223a6f341289a4f9eed998f5a9e1b

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 230a20e30568071de5be09e55f8b624e9fe061f345f9a6b253474df42ad59823
MD5 15a6212f0489dad203d6b694cb08d94e
BLAKE2b-256 c36cc1b5289a46d2140a16a9c89da2a28726748e1333b59406d67948b240e0ab

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 94ebc717694e777e8084d124d98026600222547b2d54c491a945d68aade06c3a
MD5 21cbc7128e552e5e2c038912cefd9073
BLAKE2b-256 4fe12e4a96d2453cda707206b08656ba1dff3646e29e999b91b871b21b62587b

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5c608b07a50a410a3c71cbaebfb6022e152d0685840819c08812a64105a419d7
MD5 dc5ab394657f898e8e12ae2dd447c492
BLAKE2b-256 ce58e1c52503351bbdf869a606d7b033e0807c9fa6b1e765d5affa8ddf92b539

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 48eca4a2283073e7a7b971ca5888a251ad524bc9f66bd090eb4ed81a7a3cd813
MD5 062df0ec1d48f0bcdedfb61264d57664
BLAKE2b-256 08169cf11acb9681db6595b1b4524e5615a92134ea07c5b94c50e14485d4e368

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3b1da93fa0912e968b311d11772d2719c789e669451200e12d28121c622c4cb1
MD5 2a447a1389996b473de2dd92cde80734
BLAKE2b-256 ffd7d05835550fe1c1d03fc6bd9f77d4c7255a9ba7f9ffac608f8f4da85632a3

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7e9abe7bb463a9be4293d52f0c56daad5f2b6c3e74cae591a53d9bc45e8b30c8
MD5 450fa3452ed2cb84546bb07fb155838f
BLAKE2b-256 834a73ccc114d845e2abe5a91838aa7de7ccaf41a9501207ca82cffc9ea39aa3

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 996c88c84b6a6b4b6379672f74ed0a4ca047d5895737ef65a4da2fa995b7806e
MD5 d5604eca5256de47c7b43650d10069bb
BLAKE2b-256 0920dda172c8990dc582e34765fb8789b94f7d31801d981ee504a8f4c8299651

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f275191d18dba077a7df629ba17232b581ffb87aefe2065b950a36da1e957f59
MD5 e10c96d1121a38c1c4543bd6dc34c26c
BLAKE2b-256 47feb7718ebbc69652bafa98e52dc35946626c2b74e5b1da5ce7227a0d6f1167

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0e6ae201afcd7d3f623aeaacff45696cd7d6a8a43536f41b3a49e785e4664b96
MD5 b1eb0a2789776f6259c45402b4dbf548
BLAKE2b-256 e58053dfe48f9207684a7606977196f1111457cccd4f5c6852c66fb85989b747

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylibfinder-0.2.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bad643e5e3345d928822b53dadbec0a41ff35b2958dbd226291287aec12299a5
MD5 8bdea68ad9bfb20bd79bb058b741e440
BLAKE2b-256 b0cbe0ae5a3c75375fdb03dae9b415841a3a02094b03937aecb720d8c7505df9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page