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

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

  • cd into it: cd pylibfinder

  • install with pip: pip install . (on macOS and Linux)

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}]
>>>

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.1.tar.gz (6.2 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.1-cp314-cp314t-musllinux_1_2_x86_64.whl (23.5 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

pylibfinder-0.2.1-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (24.5 kB view details)

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

pylibfinder-0.2.1-cp314-cp314t-macosx_11_0_arm64.whl (8.9 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

pylibfinder-0.2.1-cp314-cp314-musllinux_1_2_x86_64.whl (21.3 kB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

pylibfinder-0.2.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (22.3 kB view details)

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

pylibfinder-0.2.1-cp314-cp314-macosx_11_0_arm64.whl (8.8 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

pylibfinder-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl (21.2 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

pylibfinder-0.2.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (22.1 kB view details)

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

pylibfinder-0.2.1-cp313-cp313-macosx_11_0_arm64.whl (8.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pylibfinder-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl (21.1 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

pylibfinder-0.2.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (21.7 kB view details)

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

pylibfinder-0.2.1-cp312-cp312-macosx_11_0_arm64.whl (8.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pylibfinder-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl (20.5 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

pylibfinder-0.2.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (20.9 kB view details)

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

pylibfinder-0.2.1-cp311-cp311-macosx_11_0_arm64.whl (8.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pylibfinder-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl (19.4 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

pylibfinder-0.2.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (20.5 kB view details)

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

pylibfinder-0.2.1-cp310-cp310-macosx_11_0_arm64.whl (8.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: pylibfinder-0.2.1.tar.gz
  • Upload date:
  • Size: 6.2 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.1.tar.gz
Algorithm Hash digest
SHA256 866945529c40214ea25004f38ca47ea7c8e854ee421f9e93f4f115eb31aae9e9
MD5 815b7bbabed7db352adbb88817f9ba51
BLAKE2b-256 24bc628c4f25d18a719710191026f0ae039d5e9b352b90d5495e478147b9ff15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.1-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8c1d8f94f1b2836f726333c848d4058f01c29856c16127d34d477ce40642d76e
MD5 b4d476525ae7ce87f3c3fa148736f5f5
BLAKE2b-256 ba62147e5428663015a422be6e9f8377f26f028138c81eae582e50e82eaf8033

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.1-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.1-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4b2902370cc0fc318e565433d12a432de27fcb59edf0d7065273bdbb8336be8c
MD5 aa558d23fde9eb96f5631e7be8a197ff
BLAKE2b-256 b18522f5f20785e10386b6cd494709a825ef0339695bc8381541ed7d937b6752

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.1-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e9a67f64f95dc9f1ac9fa842faada2e8d1a830e05a00dd10571ffb0b932a7701
MD5 ac10537e689f19e847d235968a52ead9
BLAKE2b-256 8d1ebf42a6308b1decb90c3be1e1e2c62a0fe8af69ecc52ed167e2973c258912

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bb68ade69e3731884d807128825df704126eaa59a4f7078bb3cd47c53e1b2700
MD5 ec2046579d5303cc1f5fff565c87197b
BLAKE2b-256 6883122aa3239d809e9d82c8df2f50b6d0d26539af69f5846cf74945a2cc52c6

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.1-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.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c8890a7464edbd74301a83411b67a31ffd483d6d1bcd6b55c3299772b24784b4
MD5 ee3ff0686f3ddcb83ec8f4a19a25d7f1
BLAKE2b-256 1bd9298d562222ba19c617af8cfe24c3edcb332c2468f65310df63f8c60d5163

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ce7b127a59d70dc73621f136493c026c17ea62e0b83f4707ee0d42d44f5084a1
MD5 7721e4091c6b25e859cb6d9983944089
BLAKE2b-256 48fb7ed54218373c3738f79058135a37064f54ebaaef43d2942320b488362c07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3409c2a9ddd9d68900ba5b8c220b9e0fe4b98f6139683b7813c5f40f537f6356
MD5 9e33ef13849b89effca29d4abde31b26
BLAKE2b-256 1af2d5594974dbb33d47de85087351cd70e656b581dc04b3cda2c087587db3fb

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.1-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.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2400ebd38aec78ee3af7b919fc477ae39171bff3e17118f4d0f32b41d5416297
MD5 53198ae1d15089a206d551f1a3ac815d
BLAKE2b-256 767976315e56c2fdf157f68897ff5a750f2b407feb927b8383d586c23162ce4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa36ef01433d9ec15d6ab774380a8210bf85067a4f243fa871d51ae43059976b
MD5 1bee6c96a045cc1eb0e6d77f68d4482d
BLAKE2b-256 1b7ab761aa68dd347aebc3795af981d8e7d7728ea49d3ca239ede7a44d6bc9d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 09bece78fb1259c3b928577527a53426d698d3aff06ac30778b5f91a2d62b805
MD5 c429edc2b07154d279d49370be77ef22
BLAKE2b-256 f58c115ee83de15008d31e04ced8b986ff68f9dace1a09b3188e6311652732f8

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.1-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.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 51c7c26ab91785b8497b69a3644888b1f687e312a1f420795ea70a2a00f95e53
MD5 042897fa8555f6f3753deaf172a804d0
BLAKE2b-256 daa5091982608e09c51801149acbf96b9bfd7a1a720197c57532b1b5ca2b65e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b529ceefad1514efe6aad777b0b645559c249ddb3693547d46c069dbe9bfa698
MD5 c0678ff6696f32f9c7789479699a7878
BLAKE2b-256 5bd894300aceaa26b6cedee0f6b69a64369d23c51b94ffde599198161fdd7d20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c9e2913e78860ce1885ade72159cb68517fbde42a2f2a808cf9a84a36d5c28fa
MD5 a679475ec8e0e841a56cee9c8cb1d082
BLAKE2b-256 2c405fc501fed27acf02e13b49c9ab39a4a2f634a6798fb9146ed0493160bb32

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.1-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.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0c75a6ee9312369234df1ddb81bccc3661217a20756aa0903f1f492f2f016f6a
MD5 8d4bcf07f9f8469fd78cc35dcc62e2b9
BLAKE2b-256 83c69e00e5b1fb366396c9afe4124035b6cd0a533963d1556f53ca224708ed73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 06c07b5cf7831476b6c18c9ba22d134bfae8ec9757d71c1f6a655b9514ac5456
MD5 d3011ab76fb0386f569f5c866c7ce5f6
BLAKE2b-256 58ea559702d1d4a1063cbe5e33c20a75f9f375e280e48d394c04774842a154b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 536d3a51a30efe20bb3335bc07de67dbcee5fa93068ea3b760e6df7d41a8942d
MD5 d36b053a4f9e53037c2058bd793bb507
BLAKE2b-256 9468c1dac85ed036f9331c27ac5cb22f0054c87123ba8f471dfafd9b13d2ab4e

See more details on using hashes here.

File details

Details for the file pylibfinder-0.2.1-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.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2cd8197e57e902e14bc70473288a9b1c1f124f26fbad3047186cb9869734f7fd
MD5 beaa5ddc73c8ed17469e2459931a032d
BLAKE2b-256 91212eb2caec5561a2527a193e0aa10dfd4d89cf92dd572391f1a88e07071ada

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibfinder-0.2.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 022a359df0f43cf123ff9b0b57a8b0e840d7679cb72ae4b021253ad4dbf8199f
MD5 64121049b7591f13115c8fc03f94e8e2
BLAKE2b-256 a7edfdd470b18a4c9ef392150cfae91b8d87d932769bb8a2732f2bbd5a889f56

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