No project description provided
Project description
file-picker-py
A Python module providing native file picker dialogs, implemented in Rust using PyO3 and rfd.
Features
- Native file picker dialogs that match the operating system's look and feel
- Blocking APIs for simple integration
- Support for:
- Single file selection
- Multiple file selection
- Single folder selection
- Multiple folder selection
- Save file dialog
Installation
Pre-built wheels are available for Windows, macOS, and Linux. Install using pip:
pip install file-picker-py
If pre-built wheels are not available and you have Rust installed, pip will try to build the project from source.
Usage
from file_picker_py import (
pick_file_blocking,
pick_files_blocking,
pick_folder_blocking,
pick_folders_blocking,
pick_save_file_blocking
)
# Pick a single file
file_path = pick_file_blocking()
if file_path:
print(f"Selected file: {file_path}")
# Pick multiple files
file_paths = pick_files_blocking()
for path in file_paths:
print(f"Selected file: {path}")
# Pick a single folder
folder_path = pick_folder_blocking()
if folder_path:
print(f"Selected folder: {folder_path}")
# Pick multiple folders
folder_paths = pick_folders_blocking()
for path in folder_paths:
print(f"Selected folder: {path}")
# Pick a save file location
save_path = pick_save_file_blocking()
if save_path:
print(f"Save location: {save_path}")
API Reference
pick_file_blocking() -> Optional[str]
Opens a file picker dialog to select a single file. Returns the path as a string, or None if cancelled.
pick_files_blocking() -> List[str]
Opens a file picker dialog to select multiple files. Returns a list of paths, or an empty list if cancelled.
pick_folder_blocking() -> Optional[str]
Opens a folder picker dialog to select a single folder. Returns the path as a string, or None if cancelled.
pick_folders_blocking() -> List[str]
Opens a folder picker dialog to select multiple folders. Returns a list of paths, or an empty list if cancelled.
pick_save_file_blocking() -> Optional[str]
Opens a save file dialog. Returns the selected save location as a string, or None if cancelled.
Development
Requires Rust toolchain to build the project. Install Rust using rustup.
This project uses:
To build the project:
# Install maturin
pip install maturin
# Build in development mode
maturin develop
# Build release wheel
maturin build --release
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file file_picker_py-0.2.0.tar.gz.
File metadata
- Download URL: file_picker_py-0.2.0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4309edb4d2cbdeb2e6b70f6f5bab17d0a94d884d07744c0de0477774ef578b0
|
|
| MD5 |
8f3548139ad400c21abfaf8ad9515a63
|
|
| BLAKE2b-256 |
c61d62eea78d299072004d4976952cfc7169ad9dc653db032d48fa084ef502c6
|
File details
Details for the file file_picker_py-0.2.0-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: file_picker_py-0.2.0-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 97.5 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d2e9b49f223e11b28d46d72c4e43dfdb7ac3ce85281262f264828e8c386d67c
|
|
| MD5 |
34127de87030452dabdde3d35764e872
|
|
| BLAKE2b-256 |
156c0f195e6c82054d63a9a450424e8fe32e883dcb90c7af983a1e4a8d0cf3dd
|
File details
Details for the file file_picker_py-0.2.0-cp38-abi3-win32.whl.
File metadata
- Download URL: file_picker_py-0.2.0-cp38-abi3-win32.whl
- Upload date:
- Size: 91.2 kB
- Tags: CPython 3.8+, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
030c247b5565eecad59e3d4dd82a037fdbca83825ac6729451d2a853be0a3015
|
|
| MD5 |
5f0316f9e4a91cca6e54647c6a4f569c
|
|
| BLAKE2b-256 |
05f368b45508dc9eea4b2a788c010c6cba8cec22ec86e7fe3e681baa29991379
|
File details
Details for the file file_picker_py-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: file_picker_py-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb1f9a32657e9678faa7f2e3c694762006a0323d36fabe19262a24776d99386a
|
|
| MD5 |
53b56c8f7d1790e613f432dff551b9fc
|
|
| BLAKE2b-256 |
4f815b8a69fecbce9a2b88c267ecb0d641a04ec32dd81ffafe7f5ce31c88829c
|
File details
Details for the file file_picker_py-0.2.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: file_picker_py-0.2.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30ceeb459609e713ca9862da384253b4114c333c19114f4cc7f31af71887e665
|
|
| MD5 |
6f722544e4ab10c8bf2a648ada61c07f
|
|
| BLAKE2b-256 |
46fa65d15089dbfae4bff894eadb24342038b5e70ce61531f55cd03d26be132a
|
File details
Details for the file file_picker_py-0.2.0-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: file_picker_py-0.2.0-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 204.6 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af172c7a8b2add9e0b1d2410dbbdfcd7ad4cf8567915f5118d55a73cf79a3751
|
|
| MD5 |
3295717dbe465be44b0dc0e3ee6124c5
|
|
| BLAKE2b-256 |
a10ac049676dc3026c8b28689eb906f889e0e5971967ed889344dad0d5f95c97
|
File details
Details for the file file_picker_py-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: file_picker_py-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 208.2 kB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1da071cafe31c8cef36b66f891d26ccd0bf35272bb9f4775f22a8719253d43af
|
|
| MD5 |
2bbfc0ffcc5765ec708872cea847d0e5
|
|
| BLAKE2b-256 |
72cfdda07f1b85a5dd1846b06013fffb5017bb4a338f1a63794b91329bfb5b27
|