wia_scan
A simple utility for using document scanners that support Windows Image Acquisition (WIA) and is easy to install. If your scanner works using Windows Fax and Scan, there is a good chance it will work with this python script.
Use cases:
- You have a flatbed scanner and you need to scan a lot of documents, thus you don't want to use Windows Fax and Scan tool as it can introduce quite some overhead.
- Support scanners on Windows using a simple python dependency
Alternatives: Existing WIA libraries, but to my surprise the ones I found required quite old versions of python, which I didn't want since I wanted to combine the scanning process with some modern python packages.
Installation
pip install wia_scan
Alternative: From Source
Download this source and install flit uisng pip install flit and run the following command from the source folder
flit install
Usage
Command Line Interface
wia_scan <version>
Usage:
wia_scan list_devices
wia_scan single_side
wia_scan many_flatbed
wia_scan --help
Options:
-h --help Show this screen.
--version Show version.
Library Usage - Custom Loop
Example: Scan 10 single sided documents from the same scanner:
import os
from wia_scan import *
print_function = print
device_manager = get_device_manager()
device_identifier = prompt_choose_device(device_manager=device_manager, print_function=print_function)
device = connect_device(device_manager=device_manager,
device_identifier=device_identifier, print_function=print_function)
for i in range(10):
os.system("pause")
wia_image = scan_side(device=device, settings=DEFAULT_SCAN_SETTINGS,
print_function=print_function)
wia_image.SaveFile(f'{i}.jpeg')
License
wia_scan is distributed under the terms of the MIT license.
Metadata
Release files for wia_scan 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 | |
|---|---|---|---|---|
| wia_scan-0.4.0.tar.gz | 28.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wia_scan-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.6 kB
Release files / wia_scan-0.4.0.tar.gz
| Download URL | wia_scan-0.4.0.tar.gz |
|---|---|
| Size | 28.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58f8a7d57edf73b0ab242213ea9388b9fa8a096d830efbd760113861658adeac
|
|
BLAKE2b-256 checksum How to use checksums |
31e36ce3e6bf7858bbddd20f3627fb28482746f27a5d828493b5ed73b9afe45a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.28.1
|
Release files / wia_scan-0.4.0-py3-none-any.whl
| Download URL | wia_scan-0.4.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
387d41766863c711e7ed7650e33eeee805b061976cb657f5a7eb1cbbff174cdd
|
|
BLAKE2b-256 checksum How to use checksums |
d6cf712dea0fc09d96afa585899d6db504c7f50bbf437638c2ed4c980c168a5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.28.1
|
Security for wia_scan 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.