Project description
Sure, here's a README file for your Python package:
# Code Navigation Python Package
This Python package provides functionality for indexing and searching code repositories using Rust and PyO3. The package supports text search, fuzzy search, and retrieving token information and hoverable ranges from the code.
## Installation
To install the package, use the following command:
```sh
pip install code_nav_devon
Usage
Import the Package
import code_nav_devon
Functions
go_to
Retrieves token information for a given position in a file.
Parameters
root_path_str (str): The root path of the repository.
index_path_str (str): The path where the index is stored.
relative_path (str): The relative path of the file.
line (int): The line number.
start_index (int): The start index in the line.
end_index (int): The end index in the line.
Returns
Example
result = code_nav_devon . go_to ( "/path/to/repo" , "/path/to/index" , "src/main.rs" , 10 , 0 , 5 )
print ( result )
text_search
Performs a text search in the code repository.
Parameters
root_path_str (str): The root path of the repository.
index_path_str (str): The path where the index is stored.
query (str): The search query.
case_sensitive (bool): Whether the search should be case sensitive.
Returns
Example
result = code_nav_devon . text_search ( "/path/to/repo" , "/path/to/index" , "search term" , True )
print ( result )
get_hoverable_ranges
Retrieves the hoverable ranges for a given file.
Parameters
root_path_str (str): The root path of the repository.
index_path_str (str): The path where the index is stored.
relative_path (str): The relative path of the file.
Returns
str: Hoverable ranges in JSON format.
Example
result = code_nav_devon . get_hoverable_ranges ( "/path/to/repo" , "/path/to/index" , "src/main.rs" )
print ( result )
License
This project is licensed under the MIT License.
### Notes:
1. This README assumes the package name is `code_nav_devon` as per your `lib.rs` module name. If your package name is different, make sure to replace it accordingly.
2. The usage examples should be adjusted based on the actual paths and use cases.
3. Ensure that your package is properly configured for distribution if you plan to publish it to PyPI or any other repository.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages .
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names .
The dropdown lists show the available interpreters, ABIs, and platforms.
Enable javascript to be able to filter the list of wheel files.
Copy a direct link to the current filters
Copy
File name
Interpreter
Interpreter
cp37
ABI
ABI
abi3
Platform
Platform
macosx_10_12_x86_64
macosx_11_0_arm64
manylinux2014_aarch64
manylinux2014_armv7l
manylinux2014_i686
manylinux2014_ppc64le
manylinux2014_x86_64
manylinux_2_17_aarch64
manylinux_2_17_armv7l
manylinux_2_17_i686
manylinux_2_17_ppc64le
manylinux_2_17_x86_64
File details
Details for the file code_nav_devon-0.1.1.tar.gz.
File metadata
Download URL: code_nav_devon-0.1.1.tar.gz
Upload date:
Jul 7, 2024
Size: 87.0 kB
Tags: Source
Uploaded using Trusted Publishing? No
Uploaded via: maturin/1.7.0
File hashes
Hashes for code_nav_devon-0.1.1.tar.gz
Algorithm
Hash digest
SHA256
658f815a8511822d312337df646e865f66f5fe3232108e5c40a413a1f3c0489b
Copy
MD5
146316bad1251e78ec436b7666cb0ac8
Copy
BLAKE2b-256
dd584cecd9fc36580556e08e17dee018296e051376187ff8746da739988cecb8
Copy
See more details on using hashes here.
File details
Details for the file code_nav_devon-0.1.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
File hashes
Hashes for code_nav_devon-0.1.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm
Hash digest
SHA256
9c20df63725cdb4b31408f2389007025825a857b499d6590fbdec0f9db5c1fe1
Copy
MD5
55d66b801911ba223a1f38de96eee566
Copy
BLAKE2b-256
d9aee37010131bbe1ed9e2c2a2cb2af2d411840489fabe12b1384133ff63c488
Copy
See more details on using hashes here.
File details
Details for the file code_nav_devon-0.1.1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.
File metadata
File hashes
Hashes for code_nav_devon-0.1.1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm
Hash digest
SHA256
39a41dc8d8ccaf35e8a3dc98f84120325c8bbb46d04712e86e27e64c036a25f4
Copy
MD5
b0a081d5dff7b4de685aafc394678a31
Copy
BLAKE2b-256
8fd25e92f8134bf4fe88f6723bc71fbf460ad4c9cf176d98d27c72a3585ab2f4
Copy
See more details on using hashes here.
File details
Details for the file code_nav_devon-0.1.1-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
File hashes
Hashes for code_nav_devon-0.1.1-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm
Hash digest
SHA256
3536a35e3eb6de496eb55c364aeccb564fa5a477c8892ba3e9133a6cefea2707
Copy
MD5
6f1e1e57e1656ff5cc7c1c40dbb97cec
Copy
BLAKE2b-256
d043a732aa8045a463ee581d68f90235cdffd833b3bb646abedcabe22d24376b
Copy
See more details on using hashes here.
File details
Details for the file code_nav_devon-0.1.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
File hashes
Hashes for code_nav_devon-0.1.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm
Hash digest
SHA256
f988a54718192a4a0c4ce6076127d9cb264fc14ad6d130b1b1ca3ebe92124bf0
Copy
MD5
3ee43a8156024f652bbb76094633152f
Copy
BLAKE2b-256
eaab8dd5b04adf2a17ed8bfb207dd2e877cfd3ca3aa38c0c63b4f0e9f450ba10
Copy
See more details on using hashes here.
File details
Details for the file code_nav_devon-0.1.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
File hashes
Hashes for code_nav_devon-0.1.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm
Hash digest
SHA256
d71fcbe2d5ec71d8f6b453ec31e9a1e291e98d1d12604ba54a9860e69da73804
Copy
MD5
46dceed65983505fa4ef34ce831f4548
Copy
BLAKE2b-256
d9b404bd10c1429fc4e635404b9295f2e0daa7fd7f4254edd872b73ca613d22e
Copy
See more details on using hashes here.
File details
Details for the file code_nav_devon-0.1.1-cp37-abi3-macosx_11_0_arm64.whl.
File metadata
File hashes
Hashes for code_nav_devon-0.1.1-cp37-abi3-macosx_11_0_arm64.whl
Algorithm
Hash digest
SHA256
4313317d98684189cc70fff3ef55ebb32d58697f26f933e83bcb11a881b89705
Copy
MD5
b034b22f5214b9dc0940c6cc863e4c36
Copy
BLAKE2b-256
7be069dad2e34b1712f9e391a521de1c3628f8e788f4228f93e689f31ab6d62a
Copy
See more details on using hashes here.
File details
Details for the file code_nav_devon-0.1.1-cp37-abi3-macosx_10_12_x86_64.whl.
File metadata
File hashes
Hashes for code_nav_devon-0.1.1-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm
Hash digest
SHA256
609abbd1149e09cb1384ecc02dd91869864f2ed2b21f4ee9a6af14570b1a0100
Copy
MD5
3d35ef12e436c0b5b150f009db62713b
Copy
BLAKE2b-256
98e8cbc906c4dad9cde1b3d57cf8e1f54a0f3451c4c7006cfc7870147a696ba7
Copy
See more details on using hashes here.