Skip to main content

A tool for analyzing Python code

Project description

biston

A structural clone detector for Python code. Written in Rust.

It parses Python files with tree-sitter, normalizes the AST, and finds functions that are structurally similar to each other.

Install

pip install biston

Or build from source:

cargo build --release

Usage

biston scan [path]

Options:

  • --threshold <0.0-1.0> — similarity threshold (higher = stricter)
  • --min-lines <n> — minimum function length to consider
  • --format <text|json|sarif> — output format
  • --suggest — show abstraction suggestions for similar pairs
  • --config <dir> — directory containing biston.toml or pyproject.toml

Configuration

Settings can go in biston.toml or under [tool.biston] in pyproject.toml.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biston-0.2.0.tar.gz (57.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

biston-0.2.0-py3-none-win_amd64.whl (1.4 MB view details)

Uploaded Python 3Windows x86-64

biston-0.2.0-py3-none-manylinux_2_28_x86_64.whl (1.6 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

biston-0.2.0-py3-none-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file biston-0.2.0.tar.gz.

File metadata

  • Download URL: biston-0.2.0.tar.gz
  • Upload date:
  • Size: 57.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for biston-0.2.0.tar.gz
Algorithm Hash digest
SHA256 eb94afab8236e14ee4244fb92a99998e2d0f4e03b66efaeab45cd02485333975
MD5 ee295998466f524df565481f17d6d420
BLAKE2b-256 87abbcde560071a5668515966994b8b16397d300b0c199f79d126ce657cede95

See more details on using hashes here.

Provenance

The following attestation bundles were made for biston-0.2.0.tar.gz:

Publisher: release.yml on mojzis/biston

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file biston-0.2.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: biston-0.2.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for biston-0.2.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0bb2739d277f90c35c45b236bc3ecffd655fc71e06b1f7323150721937359bcb
MD5 df940f4701fea3f0ed5b9e57287de91a
BLAKE2b-256 023106a37e481a1c6815b391fcc4c066485549f55fdcf7b6007454d21e80b757

See more details on using hashes here.

Provenance

The following attestation bundles were made for biston-0.2.0-py3-none-win_amd64.whl:

Publisher: release.yml on mojzis/biston

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file biston-0.2.0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for biston-0.2.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4384b74c80d92c5e6ffa8a27864337754a2b8dd7b0592bde14df050edf15f2ad
MD5 5a3b3c21a15c2018b266e736c860da6c
BLAKE2b-256 cb4d2f97d57aab7b64261e9f8aec779944dd3a23373823c12c1021c74cf4bbf8

See more details on using hashes here.

Provenance

The following attestation bundles were made for biston-0.2.0-py3-none-manylinux_2_28_x86_64.whl:

Publisher: release.yml on mojzis/biston

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file biston-0.2.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for biston-0.2.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2ce87b8616251417d3da7470965a677bf3f07bcb31ef9ea412f2a23bda955d3a
MD5 8fc66a59c20de036890c3f21aca7b6c3
BLAKE2b-256 6a8665cb42d3675978f395e480c923610e48494576d0b87d4905245ed9e5ba50

See more details on using hashes here.

Provenance

The following attestation bundles were made for biston-0.2.0-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on mojzis/biston

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page