scanline-python-wrapper


Namescanline-python-wrapper JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryPython wrapper for the scanline CLI scanner tool for macOS
upload_time2025-10-29 09:37:57
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords scan scanline macos icc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Scanline Python Wrapper
=======================

|Github| |Discord| |PYPI Version| |Build Status| |Black| |License|

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:

* https://github.com/klep/scanline?tab=readme-ov-file#installing-scanline

Then install ``scanline-python-wrapper`` from PyPI::

    pip install scanline-python-wrapper


Usage
-----

List scanners:

.. code-block:: python

   >>> import scanline_wrapper
   >>> scanline_wrapper.list_scanners()
   ['HP Color LaserJet MFP M281fdw (035F4A)', 'My other scanner']

Scan a document:

.. code-block:: python

   >>> import scanline_wrapper
   >>> scanline_wrapper.scan_flatbed("./out.tiff")

Scan a document (more options):

.. code-block:: python

   >>> 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:

* https://wanadev.github.io/scanline-python-wrapper/


Development
-----------

To run development commands, you must install `Nox <https://nox.thea.codes>`__ 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 <https://github.com/wanadev/scanline-python-wrapper/blob/master/LICENSE>`__
* The Scanline CLI tool is licensed under the `MIT license <https://github.com/klep/scanline/blob/master/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


.. _scanline: https://github.com/klep/scanline

.. |Github| image:: https://img.shields.io/github/stars/wanadev/scanline-python-wrapper?label=Github&logo=github
   :target: https://github.com/wanadev/scanline-python-wrapper
.. |Discord| image:: https://img.shields.io/badge/chat-Discord-8c9eff?logo=discord&logoColor=ffffff
   :target: https://discord.gg/BmUkEdMuFp
.. |PYPI Version| image:: https://img.shields.io/pypi/v/scanline-python-wrapper.svg
   :target: https://pypi.python.org/pypi/scanline-python-wrapper
.. |Build Status| image:: https://github.com/wanadev/scanline-python-wrapper/actions/workflows/python-ci.yml/badge.svg
   :target: https://github.com/wanadev/scanline-python-wrapper/actions
.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://black.readthedocs.io/en/stable/
.. |License| image:: https://img.shields.io/pypi/l/scanline-python-wrapper.svg
   :target: https://github.com/wanadev/scanline-python-wrapper/blob/master/LICENSE

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "scanline-python-wrapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "scan, scanline, macos, icc",
    "author": null,
    "author_email": "Wanadev <contact@wanadev.fr>",
    "download_url": "https://files.pythonhosted.org/packages/7a/a7/8b401351e5b9b98f7ef2e90d04c57d72a0a4c47d135eeda3b7d6f92ca59b/scanline_python_wrapper-1.0.1.tar.gz",
    "platform": null,
    "description": "Scanline Python Wrapper\n=======================\n\n|Github| |Discord| |PYPI Version| |Build Status| |Black| |License|\n\nScanline Python Wrapper is a wrapper library for the scanline_ CLI tool.\n\nScanline is a CLI tool to scan documents on macOS through Apple's Image Capture\nCore API.\n\n\nInstall\n-------\n\nYou should install the scanline_ tool first. Jut follow instructions from its\nREADME:\n\n* https://github.com/klep/scanline?tab=readme-ov-file#installing-scanline\n\nThen install ``scanline-python-wrapper`` from PyPI::\n\n    pip install scanline-python-wrapper\n\n\nUsage\n-----\n\nList scanners:\n\n.. code-block:: python\n\n   >>> import scanline_wrapper\n   >>> scanline_wrapper.list_scanners()\n   ['HP Color LaserJet MFP M281fdw (035F4A)', 'My other scanner']\n\nScan a document:\n\n.. code-block:: python\n\n   >>> import scanline_wrapper\n   >>> scanline_wrapper.scan_flatbed(\"./out.tiff\")\n\nScan a document (more options):\n\n.. code-block:: python\n\n   >>> import scanline_wrapper\n   >>> scanline_wrapper.scan_flatbed(\n   >>>     \"./out.jpg\",\n   >>>     scanner=\"HP Color LaserJet MFP M281fdw (035F4A)\",\n   >>>     page_size=scanline_wrapper.PageSize.LETTER,        # A4, LEGAL or LETTER\n   >>>     file_format=scanline_wrapper.FileFormat.JPEG,      # AUTO, PDF, TIFF or JPEG\n   >>>     color=scanline_wrapper.Color.COLOR,                # COLOR or MONOCHROME\n   >>>     resolution=150,                                    # DPI\n   >>> )\n\nComplete documentation:\n\n* https://wanadev.github.io/scanline-python-wrapper/\n\n\nDevelopment\n-----------\n\nTo run development commands, you must install `Nox <https://nox.thea.codes>`__ first::\n\n    pip install nox\n\n\nLint\n~~~~\n\n\nTo lint the code, run the following command::\n\n    nox -s lint\n\nTo fix codding style, run::\n\n    nox -s black_fix\n\n\nRun tests\n~~~~~~~~~\n\nTo run the tests, use::\n\n    nox -s test\n\nYou can use following commands to run the tests only on a certain Python version (the corresponding Python interpreter must be installed on your machine)::\n\n    nox -s test-3.9\n    nox -s test-3.10\n    nox -s test-3.11\n    nox -s test-3.12\n    nox -s test-3.13\n\n\nBuild the documentation\n~~~~~~~~~~~~~~~~~~~~~~~\n\nTo build the Sphinx documentation, run::\n\n    nox -s gendoc\n\n\nLicense\n-------\n\n* This wrapper is licensed under the `BSD 3 Clause license <https://github.com/wanadev/scanline-python-wrapper/blob/master/LICENSE>`__\n* The Scanline CLI tool is licensed under the `MIT license <https://github.com/klep/scanline/blob/master/LICENSE>`__\n\n\nChangelog\n---------\n\n* **[NEXT]** (changes on ``master``, but not released yet):\n\n  * Nothing yet ;)\n\n* **v1.0.1:**\n\n  * misc: Replaced setup.py by pyproject.toml (@flozz)\n  * misc: Added Python 3.13, 3.14 support (@flozz)\n  * misc!: Removed Python 3.8, 3.9 support (@flozz)\n\n* **v1.0.0:**\n\n  * First release\n  * feat: List available scanners\n  * feat: Scan a document using a flatbed scanner\n\n\n.. _scanline: https://github.com/klep/scanline\n\n.. |Github| image:: https://img.shields.io/github/stars/wanadev/scanline-python-wrapper?label=Github&logo=github\n   :target: https://github.com/wanadev/scanline-python-wrapper\n.. |Discord| image:: https://img.shields.io/badge/chat-Discord-8c9eff?logo=discord&logoColor=ffffff\n   :target: https://discord.gg/BmUkEdMuFp\n.. |PYPI Version| image:: https://img.shields.io/pypi/v/scanline-python-wrapper.svg\n   :target: https://pypi.python.org/pypi/scanline-python-wrapper\n.. |Build Status| image:: https://github.com/wanadev/scanline-python-wrapper/actions/workflows/python-ci.yml/badge.svg\n   :target: https://github.com/wanadev/scanline-python-wrapper/actions\n.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n   :target: https://black.readthedocs.io/en/stable/\n.. |License| image:: https://img.shields.io/pypi/l/scanline-python-wrapper.svg\n   :target: https://github.com/wanadev/scanline-python-wrapper/blob/master/LICENSE\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python wrapper for the scanline CLI scanner tool for macOS",
    "version": "1.0.1",
    "project_urls": {
        "changelog": "https://github.com/wanadev/scanline-python-wrapper?tab=readme-ov-file#changelog",
        "chat": "https://discord.gg/BmUkEdMuFp",
        "documentation": "https://wanadev.github.io/scanline-python-wrapper/",
        "issues": "https://github.com/wanadev/scanline-python-wrapper/issues",
        "source": "https://github.com/wanadev/scanline-python-wrapper"
    },
    "split_keywords": [
        "scan",
        " scanline",
        " macos",
        " icc"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ec2771355e507e62bf8a151ee25a761104ac36684c4718ce438d530fc27ef235",
                "md5": "89cdfd4b36898e22da1275d1735afbc3",
                "sha256": "89a89e327fcc5a87ead59315b7b7ddc770b682fcc3f08a77905421e2e1370d3a"
            },
            "downloads": -1,
            "filename": "scanline_python_wrapper-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "89cdfd4b36898e22da1275d1735afbc3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 6695,
            "upload_time": "2025-10-29T09:37:56",
            "upload_time_iso_8601": "2025-10-29T09:37:56.958286Z",
            "url": "https://files.pythonhosted.org/packages/ec/27/71355e507e62bf8a151ee25a761104ac36684c4718ce438d530fc27ef235/scanline_python_wrapper-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7aa78b401351e5b9b98f7ef2e90d04c57d72a0a4c47d135eeda3b7d6f92ca59b",
                "md5": "b71b4e9a7515b4484d2e8a3e6c965b92",
                "sha256": "c12af183cd9bf501c3ca9fae4efc6f5a4d4a30ed76141c5cc473ed6b8238a778"
            },
            "downloads": -1,
            "filename": "scanline_python_wrapper-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b71b4e9a7515b4484d2e8a3e6c965b92",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 11678,
            "upload_time": "2025-10-29T09:37:57",
            "upload_time_iso_8601": "2025-10-29T09:37:57.788068Z",
            "url": "https://files.pythonhosted.org/packages/7a/a7/8b401351e5b9b98f7ef2e90d04c57d72a0a4c47d135eeda3b7d6f92ca59b/scanline_python_wrapper-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-29 09:37:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wanadev",
    "github_project": "scanline-python-wrapper?tab=readme-ov-file#changelog",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "scanline-python-wrapper"
}
        
Elapsed time: 1.67783s