bethany-lcl
Python bindings for the Lazarus LCL (Lazarus Component Library), with an API similar to C++Builder. Part of Bethany, which also provides the same API for C++ and a visual form designer for VS Code.
pip install bethany-lcl
The distribution name is bethany-lcl, and the module name is beth.
Preview. Bethany is at version 0.x. The API may change between minor versions. Only Windows x64 is supported for now: the Python from python.org, and the Python of MSYS2 (MINGW64, UCRT64, ...). In MSYS2, install it in a virtual environment (
python -m venv .venv). pip builds it from the source distribution, which contains the prebuiltbeth.dll.
Example
from beth import *
class TForm1(TForm):
def __init__(self, AOwner):
super().__init__(AOwner)
self.Caption = "Hello"
self.Button1 = TButton(self)
self.Button1.Parent = self
self.Button1.Caption = "OK"
self.Button1.OnClick = self.Button1Click
def Button1Click(self, Sender):
self.Caption = "Clicked"
Application.Initialize()
Form1 = Application.CreateForm(TForm1)
Application.Run()
Classes, properties and events have the same names as in C++Builder and the LCL (TForm, TButton, Caption, OnClick and so on).
The differences from C++ are:
- Arguments passed by reference in C++ (
int& Key,bool& CanClose,TCloseAction& Action, ...) areRefobjects. Read and write them with.value. Application->CreateForm(&Form1)isForm1 = Application.CreateForm(TForm1).- Objects you create yourself (
TStringList,TBitmap,TPicture, ...) are destroyed withFree(), or when no reference to them remains. - Using a wrapper after its LCL object has been destroyed raises
ReferenceError. - Exceptions raised in the LCL are
BethError(E.Message,E.ClassName()).
Designing forms
Bethany Designer is a VS Code extension to design forms on a canvas and generate the Python (or C++) code for them.
License
Bethany is distributed under the MIT License. The package contains beth.dll, which is built with Free Pascal and statically contains
the Free Pascal run-time library and the LCL. They are distributed under the LGPL with a static linking exception.
See THIRD-PARTY-NOTICES.md and the licenses folder in the package metadata, or the
repository.
日本語
Lazarus の LCL を、C++Builder に似た API で Python から使うためのパッケージです。pip install bethany-lcl で入れ、from beth import * で使います。
今のところ Windows x64 だけに対応しています(python.org の Python と、MSYS2 の Python。MSYS2 では venv に入れてください)。C++ 版と、フォームを画面で設計する VS Code 拡張は Bethany のリポジトリを参照してください。
Metadata
Release files for bethany-lcl 0.4.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 |
|---|---|---|---|---|
| bethany_lcl-0.4.0.tar.gz | 1.4 MB | With provenance | Details for bethany_lcl-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bethany_lcl-0.4.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for bethany_lcl-0.4.0-py3-none-win_amd64.whl |
Total release size: 2.9 MB
Release files / bethany_lcl-0.4.0.tar.gz
| Download URL | bethany_lcl-0.4.0.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d86f34bb97a761c142f91551652b61f5576867cdeb1463f1bcd1bf3846ab06c
|
|
BLAKE2b-256 checksum How to use checksums |
1fe36b9ab8eed208a9766ec82baa8b31b174a35886fb5f9a59b546575591ea30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 30, 2026.
Transparency logRelease files / bethany_lcl-0.4.0-py3-none-win_amd64.whl
| Download URL | bethany_lcl-0.4.0-py3-none-win_amd64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1d79b682f6cbc1778a3bed6356f2e97b7dc0f0822133d43ffa71f25983f22271
|
|
BLAKE2b-256 checksum How to use checksums |
605543ca8df6394e893e1ce6d0e29075c6e3849afc5a5daacd546f2426cc88d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 30, 2026.
Transparency logSecurity for bethany-lcl 0.4.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
Both files in this release have been uploaded with provenance metadata.
Attestation for bethany_lcl-0.4.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 Sep 30, 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.