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.3.0.tar.gz (71.9 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.3.0-py3-none-win_amd64.whl (1.4 MB view details)

Uploaded Python 3Windows x86-64

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

Uploaded Python 3manylinux: glibc 2.28+ x86-64

biston-0.3.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.3.0.tar.gz.

File metadata

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

File hashes

Hashes for biston-0.3.0.tar.gz
Algorithm Hash digest
SHA256 eb234d8d94fb87c2e547895a25793f0a461bfa230108978ff7024cb4009c9c53
MD5 a8ebad215c3494c4793ca0dad2ec988c
BLAKE2b-256 428b7528f9fc2b5e82f9856c57cc2cd72ab9d3366330733ae58ac72e244cae85

See more details on using hashes here.

Provenance

The following attestation bundles were made for biston-0.3.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.3.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: biston-0.3.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.3.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 111bcee40f4839d32658f071d2751f6a85d7cacd984d4fd69afb97829a4fe7df
MD5 ab62a33de8f6bf8ab4912ff32554bebe
BLAKE2b-256 b63df77681075c8be0c51ce7ab268775914efd1cac5d8ce7d0f2ee30f3a6bb1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for biston-0.3.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.3.0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for biston-0.3.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 36888f0e567ce091c532cbb7c29a14fc604daf879cdc08c871edfbe52018177f
MD5 497d50f1a5325118a881ec157207bd4c
BLAKE2b-256 9a040289649f157f8ae6e40dc93a5288c0a31918b7658d683ad254df4141066a

See more details on using hashes here.

Provenance

The following attestation bundles were made for biston-0.3.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.3.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for biston-0.3.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 96172197c137e4ba5284ddbd2d67dc5a2c018e8c659a50b50be4538af1670b30
MD5 fdd9cbd2bae94b4d42a7e8f165a58669
BLAKE2b-256 3bb59633d9bd2e7c65c70d1c55c91af6241f46e12180713b5fa6a80dfcaa2009

See more details on using hashes here.

Provenance

The following attestation bundles were made for biston-0.3.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