pytinyfiledialogs
Native OS dialogs for Python: message box, file open and save, folder picker, input box, color chooser, notification, and beep.
No Qt. No Tk. No GUI toolkit. It is a thin ctypes wrapper around
tinyfiledialogs v3.22.1, so the
dialogs look like your system dialogs on Linux, macOS, and Windows.
Install
pip install pytinyfiledialogs
The wheel contains the compiled library for all three platforms. The right one is picked at import time.
Python 3.8 or newer.
Usage
import pytinyfiledialogs as tfd
| Function | Returns |
|---|---|
message_box(title, message, dialog_type="ok", icon_type="info") |
1 yes/ok, 0 no or cancel, 2 no in yesnocancel |
notify_popup(title, message, icon_type="info") |
1 |
input_box(title, message, default_input="") |
text, or None on cancel |
open_file_dialog(title, default_path="", filters=None, filter_description=None, allow_multiple=False) |
path, or None on cancel |
save_file_dialog(title, default_path="", filters=None, filter_description=None) |
path, or None on cancel |
select_folder_dialog(title, default_path="") |
path, or None on cancel |
color_chooser(title, default_hex_rgb="", default_rgb=(0, 128, 255)) |
"#RRGGBB", or None on cancel |
beep() |
nothing |
dialog_type is one of ok, okcancel, yesno, yesnocancel.
icon_type is one of info, warning, error, question.
Pick a file
path = tfd.open_file_dialog(
title="Pick an image",
filters=["*.png", "*.jpg"],
filter_description="Images",
)
print(path) # "/home/me/cat.png", or None
With allow_multiple=True, the returned paths are joined with |:
paths = tfd.open_file_dialog(filters=["*.txt"], allow_multiple=True)
for path in (paths or "").split("|"):
...
Ask for text
name = tfd.input_box("Your name", "Type it below")
# default_input=None gives a password box (characters are hidden)
password = tfd.input_box("Password", "", default_input=None)
Save a file
path = tfd.save_file_dialog(
title="Save report",
default_path="report.txt",
filters=["*.txt"],
filter_description="Text files",
)
Notes
- Filters are glob patterns, like
*.png, not descriptions. They only control which files the dialog shows. They are not a security check. - Quotes are rejected. The C library refuses
"in titles and filter descriptions. Avoid them, or the dialog shows an error text instead. - Linux needs a dialog backend. Install
zenityorkdialog. Without one, the library falls back to a terminal prompt or a plain input prompt. yesnocanceluses three numbers.1is Yes,2is No,0is Cancel. In a two-button box, No is0instead.- macOS and Windows need nothing extra. They use native dialogs.
Build from source
Needed for local development. make builds only the library for your own OS.
git clone https://github.com/ippokrates/pytinyfiledialogs
cd pytinyfiledialogs
make
python3 -c "import pytinyfiledialogs as t; print(t.tfd.tinyfd_messageBox)"
The release wheel needs Linux, macOS, and Windows binaries, so it is built by GitHub Actions, not locally.
Releasing
pyproject.toml and the tag must match: version = "1.0.0" and v1.0.0.
git tag v1.0.0
git push origin v1.0.0
That starts the workflow. It builds all three binaries, makes one wheel, and creates the GitHub Release with the wheel attached.
Do not click "Draft a new release" on GitHub. The workflow creates the release, and a second one fails with "release already exists".
License
Zlib. See LICENSE.
Built on tinyfiledialogs v3.22.1 by Guillaume Vareille, also under the Zlib license.
Metadata
Release files for pytinyfiledialogs 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytinyfiledialogs-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for pytinyfiledialogs-1.0.1-py3-none-any.whl |
Release files / pytinyfiledialogs-1.0.1-py3-none-any.whl
| Download URL | pytinyfiledialogs-1.0.1-py3-none-any.whl |
|---|---|
| Size | 170.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72f8a973591aafca83121758c0a74c74a02588696d49228058accbcd9e566891
|
|
BLAKE2b-256 checksum How to use checksums |
2fbf97bb3630c7092604bcb18db4c15b146af5c351d29b539593ac93cc507d0c
|
| 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 11, 2026.
Transparency logSecurity for pytinyfiledialogs 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
1 file in this release has been uploaded with provenance metadata.
Attestation for pytinyfiledialogs-1.0.1-py3-none-any.whl
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 11, 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.