Name | thermalprinter JSON |
Version |
0.3.0
JSON |
| download |
home_page | None |
Summary | Driver for the DP-EH600 thermal printer (AdaFruit). |
upload_time | 2024-11-02 10:29:12 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | MIT License Copyright (c) 2016-2024, Mickaël 'Tiger-222' Schoentgen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
adafruit
dp-eh400
dp-eh600
driver
printer
thermal-printer
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# DP-EH600 Thermal Printer
[![PyPI Version](https://img.shields.io/pypi/v/thermalprinter.svg)](https://pypi.python.org/pypi/thermalprinter)
[![PyPI Status](https://img.shields.io/pypi/status/thermalprinter.svg)](https://pypi.python.org/pypi/thermalprinter)
[![PyPI Python Versions](https://img.shields.io/pypi/pyversions/thermalprinter.svg)](https://pypi.python.org/pypi/thermalprinter)
[![Tests](https://github.com/BoboTiG/thermalprinter/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/BoboTiG/thermalprinter/actions/workflows/tests.yml)
[![Github License](https://img.shields.io/github/license/BoboTiG/thermalprinter.svg)](https://github.com/BoboTiG/thermalprinter/blob/master/LICENSE)
Python module to manage DP-EH600 thermal printers (the one sold by AdaFruit).
- **Python 3.7+** and PEP8 compliant;
- this is a clean follow of the technical manual with few helpers;
- and there is a [complete, and beautiful, documentation](https://thermalprinter.readthedocs.io) 🙂
- also several useful [recipes](https://github.com/BoboTiG/thermalprinter-recipes);
- **contributors** are welcome, check the [developer guide](https://thermalprinter.readthedocs.io/en/latest/developers.html)!
## Printers
Supported printers:
- DP-EH600
- DP-EH400/1
## Installation
```bash
python -m pip install -U thermalprinter
```
## Usage
An example is better than a thousand words:
```python
from PIL import Image # Optional, for printing images
from ThermalPrinter import *
with ThermalPrinter(port="/dev/ttyAMA0") as printer:
# Picture
printer.image(Image.open("src/tests/gnu.png"))
# Bar codes
printer.barcode_height(80)
printer.barcode_position(BarCodePosition.BELOW)
printer.barcode_width(3)
printer.barcode("012345678901", BarCode.EAN13)
# Styles
printer.out("Bold", bold=True)
printer.out("Double height", double_height=True)
printer.out("Double width", double_width=True)
printer.out("Inverse", inverse=True)
printer.out("Rotate 90°", rotate=True, codepage=CodePage.ISO_8859_1)
printer.out("Strike", strike=True)
printer.out("Underline", underline=1)
printer.out("Upside down", upside_down=True)
# Chinese (almost all alphabets exist)
printer.out("现代汉语通用字表", chinese=True, chinese_format=Chinese.UTF_8)
# Greek (excepted the ΐ character)
printer.out("Στην υγειά μας!", codepage=CodePage.CP737)
# Other characters
printer.out(b"Cards \xe8 \xe9 \xea \xeb", codepage=CodePage.CP932)
# Accents
printer.out("Voilà !", justify="C", strike=True, underline=2, codepage=CodePage.ISO_8859_1)
# Line feeds
printer.feed(2)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "thermalprinter",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "Micka\u00ebl Schoentgen <contact@tiger-222.fr>",
"keywords": "adafruit, dp-eh400, dp-eh600, driver, printer, thermal-printer",
"author": null,
"author_email": "Micka\u00ebl Schoentgen <contact@tiger-222.fr>",
"download_url": "https://files.pythonhosted.org/packages/f4/fa/33c2494a48f8bac693d8159923f78fc965dbc1c61edd921300ccc5d2e3cb/thermalprinter-0.3.0.tar.gz",
"platform": null,
"description": "# DP-EH600 Thermal Printer\n\n[![PyPI Version](https://img.shields.io/pypi/v/thermalprinter.svg)](https://pypi.python.org/pypi/thermalprinter)\n[![PyPI Status](https://img.shields.io/pypi/status/thermalprinter.svg)](https://pypi.python.org/pypi/thermalprinter)\n[![PyPI Python Versions](https://img.shields.io/pypi/pyversions/thermalprinter.svg)](https://pypi.python.org/pypi/thermalprinter)\n[![Tests](https://github.com/BoboTiG/thermalprinter/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/BoboTiG/thermalprinter/actions/workflows/tests.yml)\n[![Github License](https://img.shields.io/github/license/BoboTiG/thermalprinter.svg)](https://github.com/BoboTiG/thermalprinter/blob/master/LICENSE)\n\nPython module to manage DP-EH600 thermal printers (the one sold by AdaFruit).\n\n- **Python 3.7+** and PEP8 compliant;\n- this is a clean follow of the technical manual with few helpers;\n- and there is a [complete, and beautiful, documentation](https://thermalprinter.readthedocs.io) \ud83d\ude42\n- also several useful [recipes](https://github.com/BoboTiG/thermalprinter-recipes);\n- **contributors** are welcome, check the [developer guide](https://thermalprinter.readthedocs.io/en/latest/developers.html)!\n\n## Printers\n\nSupported printers:\n\n- DP-EH600\n- DP-EH400/1\n\n## Installation\n\n```bash\npython -m pip install -U thermalprinter\n```\n\n## Usage\n\nAn example is better than a thousand words:\n\n```python\nfrom PIL import Image # Optional, for printing images\nfrom ThermalPrinter import *\n\n\nwith ThermalPrinter(port=\"/dev/ttyAMA0\") as printer:\n # Picture\n printer.image(Image.open(\"src/tests/gnu.png\"))\n\n # Bar codes\n printer.barcode_height(80)\n printer.barcode_position(BarCodePosition.BELOW)\n printer.barcode_width(3)\n printer.barcode(\"012345678901\", BarCode.EAN13)\n\n # Styles\n printer.out(\"Bold\", bold=True)\n printer.out(\"Double height\", double_height=True)\n printer.out(\"Double width\", double_width=True)\n printer.out(\"Inverse\", inverse=True)\n printer.out(\"Rotate 90\u00b0\", rotate=True, codepage=CodePage.ISO_8859_1)\n printer.out(\"Strike\", strike=True)\n printer.out(\"Underline\", underline=1)\n printer.out(\"Upside down\", upside_down=True)\n\n # Chinese (almost all alphabets exist)\n printer.out(\"\u73b0\u4ee3\u6c49\u8bed\u901a\u7528\u5b57\u8868\", chinese=True, chinese_format=Chinese.UTF_8)\n \n # Greek (excepted the \u0390 character)\n printer.out(\"\u03a3\u03c4\u03b7\u03bd \u03c5\u03b3\u03b5\u03b9\u03ac \u03bc\u03b1\u03c2!\", codepage=CodePage.CP737)\n\n # Other characters\n printer.out(b\"Cards \\xe8 \\xe9 \\xea \\xeb\", codepage=CodePage.CP932)\n\n # Accents\n printer.out(\"Voil\u00e0 !\", justify=\"C\", strike=True, underline=2, codepage=CodePage.ISO_8859_1)\n\n # Line feeds\n printer.feed(2)\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2016-2024, Micka\u00ebl 'Tiger-222' Schoentgen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Driver for the DP-EH600 thermal printer (AdaFruit).",
"version": "0.3.0",
"project_urls": {
"Changelog": "https://github.com/BoboTiG/thermalprinter/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/BoboTiG/thermalprinter",
"Released Versions": "https://github.com/BoboTiG/thermalprinter/releases",
"Source": "https://github.com/BoboTiG/thermalprinter",
"Sponsor": "https://github.com/sponsors/BoboTiG",
"Tracker": "https://github.com/BoboTiG/thermalprinter/issues"
},
"split_keywords": [
"adafruit",
" dp-eh400",
" dp-eh600",
" driver",
" printer",
" thermal-printer"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bd29e0a9c716fd3590b7a0baa8c08c7ac0dd34a6da2ed4f3bbab3e948459c1bd",
"md5": "544fee44d5a473fd3aeea98bd72a9eef",
"sha256": "975c880adf2286c6fa60efe0722e51571f31928799518b7e5a82aecb32aa63e2"
},
"downloads": -1,
"filename": "thermalprinter-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "544fee44d5a473fd3aeea98bd72a9eef",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 28888,
"upload_time": "2024-11-02T10:29:10",
"upload_time_iso_8601": "2024-11-02T10:29:10.993926Z",
"url": "https://files.pythonhosted.org/packages/bd/29/e0a9c716fd3590b7a0baa8c08c7ac0dd34a6da2ed4f3bbab3e948459c1bd/thermalprinter-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f4fa33c2494a48f8bac693d8159923f78fc965dbc1c61edd921300ccc5d2e3cb",
"md5": "a68a40bd9c363bb4416d8f4d954184b1",
"sha256": "2db8c9def9dca8d975f723ab91d498f9072b642c6194ca8ae01748c2cc3e3f77"
},
"downloads": -1,
"filename": "thermalprinter-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "a68a40bd9c363bb4416d8f4d954184b1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 27988,
"upload_time": "2024-11-02T10:29:12",
"upload_time_iso_8601": "2024-11-02T10:29:12.650000Z",
"url": "https://files.pythonhosted.org/packages/f4/fa/33c2494a48f8bac693d8159923f78fc965dbc1c61edd921300ccc5d2e3cb/thermalprinter-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-02 10:29:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "BoboTiG",
"github_project": "thermalprinter",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "thermalprinter"
}