Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

codenav-python

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codenav-python

Python bindings for CodeNav.

  • 0.0.2
  • PyPI
  • Socket score

Maintainers
1

CodeNav Python Bindings

Python bindings for CodeNav.

Installation

pip install codenav-python

Quick Start

import codenav
nav = codenav.Navigator(codenav.Language.Python, './test.sqlite')
nav.index(['<YOUR_LOCAL_PATH>/codenav/examples/python'])
reference = codenav.Reference('<YOUR_LOCAL_PATH>/codenav/examples/python/chef.py', 2, 0, 'broil')
definitions = nav.resolve(reference)
for d in definitions:
    print(f'{d.path}:{d.span.start.line}:{d.span.start.column}')
    print(d.text())
nav.clean(True)

Examples

Development

Install maturin:

pip install maturin

Build and install the module:

maturin develop

Run the examples:

python examples/resolve_python_reference.py
python examples/resolve_python_snippet.py
python examples/resolve_javascript_reference.py
python examples/resolve_javascript_snippet.py
python examples/resolve_typescript_reference.py
python examples/resolve_typescript_snippet.py

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc