Scanline Python Wrapper is a wrapper library for the scanline CLI tool.
Scanline is a CLI tool to scan documents on macOS through Apple’s Image Capture Core API.
Install
You should install the scanline tool first. Jut follow instructions from its README:
Then install scanline-python-wrapper from PyPI:
pip install scanline-python-wrapper
Usage
List scanners:
>>> import scanline_wrapper
>>> scanline_wrapper.list_scanners()
['HP Color LaserJet MFP M281fdw (035F4A)', 'My other scanner']
Scan a document:
>>> import scanline_wrapper
>>> scanline_wrapper.scan_flatbed("./out.tiff")
Scan a document (more options):
>>> import scanline_wrapper
>>> scanline_wrapper.scan_flatbed(
>>> "./out.jpg",
>>> scanner="HP Color LaserJet MFP M281fdw (035F4A)",
>>> page_size=scanline_wrapper.PageSize.LETTER, # A4, LEGAL or LETTER
>>> file_format=scanline_wrapper.FileFormat.JPEG, # AUTO, PDF, TIFF or JPEG
>>> color=scanline_wrapper.Color.COLOR, # COLOR or MONOCHROME
>>> resolution=150, # DPI
>>> )
Complete documentation:
Development
To run development commands, you must install Nox first:
pip install nox
Lint
To lint the code, run the following command:
nox -s lint
To fix codding style, run:
nox -s black_fix
Run tests
To run the tests, use:
nox -s test
You can use following commands to run the tests only on a certain Python version (the corresponding Python interpreter must be installed on your machine):
nox -s test-3.9 nox -s test-3.10 nox -s test-3.11 nox -s test-3.12 nox -s test-3.13
Build the documentation
To build the Sphinx documentation, run:
nox -s gendoc
License
This wrapper is licensed under the BSD 3 Clause license
The Scanline CLI tool is licensed under the MIT license
Changelog
[NEXT] (changes on master, but not released yet):
Nothing yet ;)
v1.0.1:
misc: Replaced setup.py by pyproject.toml (@flozz)
misc: Added Python 3.13, 3.14 support (@flozz)
misc!: Removed Python 3.8, 3.9 support (@flozz)
v1.0.0:
First release
feat: List available scanners
feat: Scan a document using a flatbed scanner
Metadata
Release files for scanline-python-wrapper 1.0.1
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 |
|---|---|---|---|---|
| scanline_python_wrapper-1.0.1.tar.gz | 11.7 kB | Without provenance | Details for scanline_python_wrapper-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scanline_python_wrapper-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for scanline_python_wrapper-1.0.1-py3-none-any.whl |
Total release size: 18.4 kB
Release files / scanline_python_wrapper-1.0.1.tar.gz
| Download URL | scanline_python_wrapper-1.0.1.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c12af183cd9bf501c3ca9fae4efc6f5a4d4a30ed76141c5cc473ed6b8238a778
|
|
BLAKE2b-256 checksum How to use checksums |
7aa78b401351e5b9b98f7ef2e90d04c57d72a0a4c47d135eeda3b7d6f92ca59b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / scanline_python_wrapper-1.0.1-py3-none-any.whl
| Download URL | scanline_python_wrapper-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89a89e327fcc5a87ead59315b7b7ddc770b682fcc3f08a77905421e2e1370d3a
|
|
BLAKE2b-256 checksum How to use checksums |
ec2771355e507e62bf8a151ee25a761104ac36684c4718ce438d530fc27ef235
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for scanline-python-wrapper 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.
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.