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 function inside the Python standard library.

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

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

  • This library is designed to assist developers in finding relevant functions 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:

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. Optionally add a threshold: power 0.7 (default is 0.5)

  4. Press Enter to search

  5. View results in the formatted table

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

Example Searches:

  • power - Find power-related functions

  • print 0.8 - Find functions similar to “print” with high confidence

  • parseInt 0.6 - Find Java-style parseInt alternatives

  • parse 0.5 true - Find functions similar to “parse” including private APIs

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.2.tar.gz (9.6 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.2-cp314-cp314t-musllinux_1_2_x86_64.whl (28.3 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

pylibfinder-0.2.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (29.2 kB view details)

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

pylibfinder-0.2.2-cp314-cp314t-macosx_11_0_arm64.whl (12.3 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

pylibfinder-0.2.2-cp314-cp314-musllinux_1_2_x86_64.whl (26.1 kB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

pylibfinder-0.2.2-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (27.3 kB view details)

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

pylibfinder-0.2.2-cp314-cp314-macosx_11_0_arm64.whl (12.1 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

pylibfinder-0.2.2-cp313-cp313-musllinux_1_2_x86_64.whl (25.9 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

pylibfinder-0.2.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (27.0 kB view details)

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

pylibfinder-0.2.2-cp313-cp313-macosx_11_0_arm64.whl (12.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pylibfinder-0.2.2-cp312-cp312-musllinux_1_2_x86_64.whl (25.9 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

pylibfinder-0.2.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (26.6 kB view details)

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

pylibfinder-0.2.2-cp312-cp312-macosx_11_0_arm64.whl (12.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pylibfinder-0.2.2-cp311-cp311-musllinux_1_2_x86_64.whl (25.0 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

pylibfinder-0.2.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (25.7 kB view details)

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

pylibfinder-0.2.2-cp311-cp311-macosx_11_0_arm64.whl (12.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pylibfinder-0.2.2-cp310-cp310-musllinux_1_2_x86_64.whl (24.8 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

pylibfinder-0.2.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (25.6 kB view details)

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

pylibfinder-0.2.2-cp310-cp310-macosx_11_0_arm64.whl (12.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: pylibfinder-0.2.2.tar.gz
  • Upload date:
  • Size: 9.6 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.2.tar.gz
Algorithm Hash digest
SHA256 d8ff83ce09c971bba254a4a17bfb744f59e049a59e4bd876044f699d65105633
MD5 9339ef98696093703c8b3bcbc1ee5aec
BLAKE2b-256 77196e7fb2570d321acdebd73b2f5f4bab6479cad81e3503f6d746b9eef9976b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.2-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 19246db522494524fdcafddfb94d1dfe912d3fd93baea05640479ad9f77e2921
MD5 74c1fb6f104751b26c1d9f2b08af2b2f
BLAKE2b-256 88e859ae893b3b31002f9697137976f067054db4690b22e76f47ba79d4cee834

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.2-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.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 224a0fe30f9ec32594f1b03abb839cfac9254e90163926ab3b080e425aa6d572
MD5 cffba44e17a96b83ea32ffaf2c3153dc
BLAKE2b-256 dbecae2d428e2a39a6758a6d5792473e81fd71b6b8c280720e11f12d0a833693

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.2-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 70817e0bf5663f6dcebef6e0c37ce1f87a469c304d997c1d7c67421e5913b0e7
MD5 3e49ddae9cd50b973cca1a007adb99b6
BLAKE2b-256 f409cb31222c526f13da2a3cd27fb32915a8ebe6805f814d154d2f7bc48dd543

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.2-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3afcaac342a33cb78fa47ccd81f643c27a8448485213e2d4e1dd87b6537cf501
MD5 8ee8a5e03c719066d2d39afed8b3d372
BLAKE2b-256 28780bd1629308add9c1aff919a4b5788e88aa22f5d0bf1ef03041b540f418cc

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.2-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.2-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 132d8f4dc460d574b15e9c03c13d605a192937e263fd9d75f85ab8d5460f93d8
MD5 9afb292a69b583dc61dad706a6031e1d
BLAKE2b-256 2583de12d2a6ac2289e1728679e40cb686e93e026a2237e2689734c5df7577bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.2-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a5545072ec3e816b826c4785aad04332170571a867f122e0979a4a4eecacc0c9
MD5 cdb64800bb69cf722fa9662bb994c353
BLAKE2b-256 837eb3d94b9751c0a73b858d81969a53da8eedf0a9121bd38ce459163dbb666f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b92f49d4f51e76ec8b157c1ec5fd8d34c84788c5edc420583e636804f8002d35
MD5 7e89cbe999c63f7acb2f11794c29cc0a
BLAKE2b-256 4ffc8c3ce4567a90c998019392c423e1d5fa414687b79d475b0474a4b939b494

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.2-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.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c5183ee8990061dd291eecc8dff68a56ac3c9b7374f6c48e21f027da26ec090a
MD5 4e4deaaa59fb3d28ea889c6283fd8e52
BLAKE2b-256 66970f3a6b935efab853b1780ec6e40e5450fe963e723962c0814a14ba8ea37e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db4c98701705cfc987d6a7ca6c0e4e3bf29da4fb01a888220f5c5c1abd10a2cd
MD5 6658f007ff43e60507ae075acc7d100e
BLAKE2b-256 d66c0da6f93cdf397fd018f4996882d65ff3cefa2fb22c4d38943d51df3d178e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d8b09afb87368d3df4f5d1860c7f27b5b72b5d2966a7852123cc4f41ce94fb73
MD5 6a4328dfb12fd9e18e1678892f73d443
BLAKE2b-256 7f2a89c0457601c5b1e4284cf5c332422329ac2353f825d29909f31b3dbea579

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.2-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.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1aa7414b538a5fdb26f2e3013b50ed6467f91b225acb4e2d8c8845f2417e8b29
MD5 fc55a32a2370e1f4c354d696a2f70f17
BLAKE2b-256 87ce69b3d391a0f0f755031b1f69fc02af2e71804b4f69ef228357613cf0a43e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b0c79ffbe4d4b867667edcdf377c7a9d0506c11a5326ee3638c8885d322577b5
MD5 13add936de5df58bdd42f72084202038
BLAKE2b-256 1407395db4824c3047e3bbe76d9a94382d098dc26d71858e53f88c5b86880fa6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 93df98d5f0b822fc24eeb047e5f708ecc0dc34d86b3f30a4d643bc7e8acc94b4
MD5 9b3ecbcb6177c2b283a94f8adab6813e
BLAKE2b-256 dcd61f0fffd40d351f35780b78a6c81b445823a9d648e23711f681117312aaed

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.2-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.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 50726ff633bb7eecf9596067e8109290e0e54fe18915e0182c2ed1ea28eafce5
MD5 b4f7d7257540ba25d0181810146edbb4
BLAKE2b-256 92672fe49e50fa9cc8d7ee5b7bc57316029e9ef1fdc02022a2e8d8d3a402d737

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 01cc9b3b5ebe9f8d24882f6e454a45510b3bd31dc784ea21b7d153390eb477b7
MD5 f6bb91cdb2f359a4b1332ed8470d043f
BLAKE2b-256 f66d88dce85e9bed183632546e3368dc7e6ebacb1f1a9bc74306b79ed52e15bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.2-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 28bd39883e08fef77ff3ac08c789536da940858c4552545b40ac0a7b663f8257
MD5 22c197eb9413881e50ef14b1b1009b10
BLAKE2b-256 8fbadc063667f61242b1a4c3f94170cfb0a6bf4da118c9672a8a4815550655d9

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.2-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.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bd2e98fde3cb31e33f0dee43e096edf177430d334d7d5e1f85e8302145a6389d
MD5 4aea0755992857dbfcd0bd833a94f8cc
BLAKE2b-256 ecea8c4350272297ee8773e8b46e5d7214c31d2d7d37b8541670fff9150efac9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 158739e799ae9ed6f7569395d65286d16a6028d93247869e7995fca4c6149779
MD5 4900148b8f0c4f7c87b12092ea98cbd6
BLAKE2b-256 d22334c6e937fc3acced52a883be857ec05c075a529c95e9be2d59a81da3c7b0

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