TikTokPrinter.client package

Subpackages

Submodules

TikTokPrinter.client.client module

Copyright (C) Isaac Kogan, Inc - All Rights Reserved Unauthorized copying of this project, via any medium is strictly prohibited Proprietary work of Isaac Kogan Written by Isaac Kogan <isaacikogan@gmail.com>, April 2022

You are permitted to use this project commercially so long as it was purchased firsthand from Isaac Kogan. Distributing secondhand copies to others is strictly prohibited & is illegal.

You can do anything with this project except redistribute it.

class TikTokPrinter.client.client.TikTokPrinterClient(unique_id: str, engine: TikTokPrinter.client.engines.escpos.EscposEngine, **options)

Bases: TikTokLive.client.client.TikTokLiveClient

The TikTokPrinterClient. This is the main class users interact with when they want to do anything with this project.

image(content: <module 'PIL.Image' from 'c:\\users\\jeanm\\pycharmprojects\\printertwo\\venv\\lib\\site-packages\\PIL\\Image.py'>, index: int = -1) None

Print an image to the printer via the EscposEngine

Parameters
  • content – The PIL Image to send

  • index – The index in the queue to insert it

Returns

None

queue(*commands, index: int = - 1) None

Send multiple types of messages to the engine to perform all at once, consecutively

Parameters
  • commands – A list of the commands to queue in a single collection

  • index – The index in the queue to insert the collection of commands

Returns

None

run(session_id: Optional[str] = None) None

Start the printer interface & underlying engines SYNCHRONOUSLY, blocking the main thread.

Parameters

session_id – Optional session ID to connect with

Returns

None

async sound(file_path: str, index: int = - 1) None

Play a sound file via the SoundEngine

Parameters
  • file_path – The file path of the sound to play

  • index – The index in the queue to insert it

Returns

None

async start(session_id: Optional[str] = None) Optional[str]

Start the printer interface & underlying engines ASYNCHRONOUSLY, without blocking the main thread.

Parameters

session_id – Optional session ID to connect with

Returns

None

text(content: str, bold: bool = False, index: int = - 1) None

Print text to the printer via the EscposEngine

Parameters
  • content – The message to sent

  • index – The index in the queue to insert it

  • bold – Whether to override the bold formatting settings & make this message bold

Returns

None

voice(content: str, index: int = - 1) None

Send a voice message via the VoiceEngine

Parameters
  • content – The message (text)

  • index – The index in the queue to insert it

Returns

None

Module contents

Copyright (C) Isaac Kogan, Inc - All Rights Reserved Unauthorized copying of this project, via any medium is strictly prohibited Proprietary work of Isaac Kogan Written by Isaac Kogan <isaacikogan@gmail.com>, April 2022

You are permitted to use this project commercially so long as it was purchased firsthand from Isaac Kogan. Distributing secondhand copies to others is strictly prohibited & is illegal.

You can do anything with this project except redistribute it.