Skip to main content

Thonny Auto-pairs

An auto-pairing plugin for Thonny 5 that adds brackets, quotes, and triple quotes as you type.

PyPI Python License: MIT

Features

  • Auto-closes brackets: ( ), [ ], and { }
  • Auto-closes single and double quotes
  • Skips over an existing closing bracket or quote
  • Deletes both characters when Backspace is pressed inside an empty pair
  • Moves the closing bracket to a new indented line when Enter is pressed inside a pair
  • Wraps selected text with brackets or quotes
  • Converts "" or '' to a triple-quoted pair
  • Works in both the editor and Shell
  • Configurable under Tools > Options > Auto-pairs

Installation

From PyPI

Install from Thonny's package manager or with pip:

pip install thonny-autopairs

Restart Thonny after installation.

Windows installer

Download thonny-autopairs-setup.exe from the latest GitHub release.

  1. Double-click the installer.
  2. If Windows SmartScreen appears, select More info > Run anyway.
  3. Close and reopen Thonny after installation completes.

The installer is unsigned. If it cannot run or cannot find Thonny, open thonny-autopairs-windows/install_helper.py in Thonny and press Run (F5).

macOS installer

  1. Open thonny-plugins/install.command.

  2. Double-click it in Finder, or run:

    bash install.command
    
  3. Restart Thonny.

Manual installation

Copy thonnycontrib/autopairs.py into the thonnycontrib directory inside Thonny's plugin folder.

Windows

In Thonny, open Tools > Open Thonny data folder..., then copy the file to:

plugins\Python3XX\site-packages\thonnycontrib\

Replace Python3XX with the Python version bundled with Thonny, such as Python313.

macOS

Copy the file to:

~/Library/Thonny/plugins/lib/python/site-packages/thonnycontrib/

Configuration

Open Tools > Options > Auto-pairs to configure:

  • Auto-close brackets
  • Auto-close quotes
  • Enable or disable auto-pairs in the Thonny Shell

Uninstallation

Remove autopairs.py from Thonny's thonnycontrib plugin directory, then restart Thonny.

For a pip installation, remove the package with:

pip uninstall thonny-autopairs

Development

Clone the repository and build the distributions locally:

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*

The package entry point is thonnycontrib/autopairs.py. It exports load_plugin(), which Thonny discovers when the plugin package is installed.

Publishing

The .github/workflows/publish-pypi.yml workflow builds the source distribution and wheel, then publishes to PyPI using GitHub Trusted Publishing.

Publishing runs after a GitHub release is published or when the workflow is started manually.

The PyPI Trusted Publisher must match:

  • Owner: Yuvald12321
  • Repository: thonny-autopairs
  • Workflow: publish-pypi.yml
  • Environment: pypi

License

This project is licensed under the MIT License.

Metadata

Release files for thonny-autopairs 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thonny-autopairs 1.0.1
File Size Uploaded Provenance Actions
thonny_autopairs-1.0.1.tar.gz 6.6 kB With provenance Details for thonny_autopairs-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for thonny-autopairs 1.0.1
File Interpreter ABI Platform Actions
thonny_autopairs-1.0.1-py3-none-any.whl Python 3 none any Details for thonny_autopairs-1.0.1-py3-none-any.whl

Total release size: 13.3 kB

Release files / thonny_autopairs-1.0.1.tar.gz

Download URL thonny_autopairs-1.0.1.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3ef8fe42c4879f7682647aaf01d8adf7c3937e9ea06e294ec44f287b3873855a
BLAKE2b-256 checksum
How to use checksums
61de1a1e831e3a2926eca0379e0f920d3ada4c14ea01b4e31470f878493ab839
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 24, 2026.

Transparency log

Release files / thonny_autopairs-1.0.1-py3-none-any.whl

Download URL thonny_autopairs-1.0.1-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fca21edd92ca682c1760a0cc7049bf3e89c2424b28ca90c0b0cf6c3d2e888db2
BLAKE2b-256 checksum
How to use checksums
ac703b710eab22b3fc2abdfcc9e18bc7021c19f0a6e6a773316a090e8de7d53e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 24, 2026.

Transparency log

Security for thonny-autopairs 1.0.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for thonny_autopairs-1.0.1.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 Nov 24, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page