Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.88 KB

File metadata and controls

46 lines (31 loc) · 1.88 KB

Documentation Status

Modulable Lacus

Lacus, but as a simple module.

Installation

pip install lacuscore

Design

LacusCore is the part taking care of enqueuing and capturing URLs or web enabled documents. It can be used as a module in your own project, see below for the usage

Lacus is the webservice that uses LacusCore, and you can use Pylacus to query it.

The enqueue, get_capture_status, and get_capture methods if LacusCore and PyLacus have the same parameters which means you can easily use them interchangeably in your project.

Interactive Sessions

LacusCore can also manage interactive captures when it is initialized with interactive_allowed=True and headed_allowed=True. In that mode, enqueue(...) accepts interactive=True (and an optional interactive_ttl in seconds, default 600) and keeps the browser session alive until a trusted caller triggers the final capture via request_session_capture(uuid).

Interactive session state is split into two layers:

  • get_session_metadata(uuid) returns the backend-agnostic public state for a session: status, view URL, lifecycle timestamps, and whether a final capture has been requested.
  • get_session_backend_metadata(uuid) returns backend-specific transport data for trusted local infrastructure only. This is where implementation details such as xpra unix socket paths belong.

That split keeps API consumers decoupled from the current xpra implementation while still allowing a local sidecar proxy to connect to the active session.

For more information regarding the usage of the module and a few examples, please refer to the documentation