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.
Metadata
Release files for binaryninja-finder 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| binaryninja_finder-0.2.0.tar.gz | 2.7 kB | With provenance | Details for binaryninja_finder-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| binaryninja_finder-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for binaryninja_finder-0.2.0-py3-none-any.whl |
Total release size: 7.0 kB
Release files / binaryninja_finder-0.2.0.tar.gz
| Download URL | binaryninja_finder-0.2.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c52262a4950ab54c743f9a8968190e97c036154fd1d9dfdd4c82c4b81ad7164
|
|
BLAKE2b-256 checksum How to use checksums |
3a5d810a2d0cae7d029235a351ab5f9ea61458c5ca4197c37159f773d6c747ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency logRelease files / binaryninja_finder-0.2.0-py3-none-any.whl
| Download URL | binaryninja_finder-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5c8f27a707e42982ac12afc96dc4ebf9d5f916d596bdb3efc3e017c9c375275
|
|
BLAKE2b-256 checksum How to use checksums |
d7f4a22bb803acfb07771b468133437b7d47309013a110f53289f0749ff6a5b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency logSecurity for binaryninja-finder 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for binaryninja_finder-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.