Find and install Binary Ninja's Python API
Project description
binaryninja-finder
Automatically finds and adds Binary Ninja's Python API to sys.path at interpreter startup.
Installation
pip install git+https://github.com/trailofbits/binaryninja-finder
Or with uv:
uv add git+https://github.com/trailofbits/binaryninja-finder
Once installed, import binaryninja will work in any script or REPL that uses the same Python environment.
How it works
The package installs a .pth file that runs automatically when Python starts. It checks whether binaryninja is already importable and, if not, searches for a local Binary Ninja installation and adds its python/ directory to sys.path.
The search order is:
BN_INSTALL_DIRenvironment variable — points to the BN installation rootlastrunfile — in the BN user config directory (written by Binary Ninja on launch)- Common platform paths — e.g.
/Applications/Binary Ninja.appon macOS,/opt/binaryninjaon Linux,C:\Program Files\Vector35\BinaryNinjaon Windows
Configuration
| Environment variable | Description |
|---|---|
BN_INSTALL_DIR |
Override the Binary Ninja installation directory |
BN_USER_DIRECTORY |
Override the Binary Ninja user config directory (where lastrun is stored) |
License
See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file binaryninja_finder-0.2.0.tar.gz.
File metadata
- Download URL: binaryninja_finder-0.2.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c52262a4950ab54c743f9a8968190e97c036154fd1d9dfdd4c82c4b81ad7164
|
|
| MD5 |
0981f6cb7823a6db7a8074f7b92f9bad
|
|
| BLAKE2b-256 |
3a5d810a2d0cae7d029235a351ab5f9ea61458c5ca4197c37159f773d6c747ff
|
Provenance
The following attestation bundles were made for binaryninja_finder-0.2.0.tar.gz:
Publisher:
release.yml on trailofbits/binaryninja-finder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binaryninja_finder-0.2.0.tar.gz -
Subject digest:
4c52262a4950ab54c743f9a8968190e97c036154fd1d9dfdd4c82c4b81ad7164 - Sigstore transparency entry: 2188280956
- Sigstore integration time:
-
Permalink:
trailofbits/binaryninja-finder@9e71fc9b1be773db2d1194d353dc70afde731a95 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/trailofbits
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9e71fc9b1be773db2d1194d353dc70afde731a95 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file binaryninja_finder-0.2.0-py3-none-any.whl.
File metadata
- Download URL: binaryninja_finder-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5c8f27a707e42982ac12afc96dc4ebf9d5f916d596bdb3efc3e017c9c375275
|
|
| MD5 |
dcc6c27edc4f7bac15895b0d801cc45b
|
|
| BLAKE2b-256 |
d7f4a22bb803acfb07771b468133437b7d47309013a110f53289f0749ff6a5b3
|
Provenance
The following attestation bundles were made for binaryninja_finder-0.2.0-py3-none-any.whl:
Publisher:
release.yml on trailofbits/binaryninja-finder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binaryninja_finder-0.2.0-py3-none-any.whl -
Subject digest:
f5c8f27a707e42982ac12afc96dc4ebf9d5f916d596bdb3efc3e017c9c375275 - Sigstore transparency entry: 2188280961
- Sigstore integration time:
-
Permalink:
trailofbits/binaryninja-finder@9e71fc9b1be773db2d1194d353dc70afde731a95 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/trailofbits
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9e71fc9b1be773db2d1194d353dc70afde731a95 -
Trigger Event:
workflow_dispatch
-
Statement type: