Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
code-navigation-python
Advanced tools
A python package written in rust for code navigation features like text search, fuzzy search and go to definition/references
# 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_navigation_python
import code_navigation_python
go_to
Retrieves token information for a given position in a file.
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.str
: Token information.result = code_navigation_python.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.
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.str
: Search results.result = code_navigation_python.text_search("/path/to/repo", "/path/to/index", "search term", True)
print(result)
get_hoverable_ranges
Retrieves the hoverable ranges for a given file.
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.str
: Hoverable ranges in JSON format.result = code_navigation_python.get_hoverable_ranges("/path/to/repo", "/path/to/index", "src/main.rs")
print(result)
This project is licensed under the Apache License.
FAQs
A python package written in rust for code navigation features like text search, fuzzy search and go to definition/references
We found that code-navigation-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.