python

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package python manages Seshat-owned Python subprocesses (docling-serve, …).

Index

Constants

View Source
const (
	DefaultDoclingPort = 5001
	DefaultDoclingHost = "127.0.0.1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DoclingManager

type DoclingManager struct {
	// contains filtered or unexported fields
}

DoclingManager starts and owns a docling-serve subprocess. Call Start() once; the process is killed when the context is cancelled or Stop() is called.

func DefaultDoclingManager

func DefaultDoclingManager() *DoclingManager

DefaultDoclingManager creates a manager using the Seshat runtime root venv. Returns nil if the venv or docling-serve binary is not installed. On Linux/macOS the venv lives at ~/.config/seshat-cli/.venv (or $SESHAT_RUNTIME_ROOT/.venv). On Windows: %APPDATA%\seshat-cli\.venv.

func NewDoclingManager

func NewDoclingManager(venvDir, host string, port int) *DoclingManager

NewDoclingManager creates a manager for the venv at venvDir. host:port is where docling-serve will bind (typically 127.0.0.1:5001).

func (*DoclingManager) BaseURL

func (m *DoclingManager) BaseURL() string

BaseURL returns the HTTP base URL of the managed docling-serve instance.

func (*DoclingManager) IsReady

func (m *DoclingManager) IsReady() bool

IsReady reports whether the server has passed its health check.

func (*DoclingManager) Start

func (m *DoclingManager) Start(ctx context.Context) error

Start launches docling-serve in the background and immediately returns. A goroutine polls the /health endpoint; IsReady() becomes true once it responds. The process is killed when ctx is cancelled.

func (*DoclingManager) Stop

func (m *DoclingManager) Stop()

Stop kills the managed subprocess if one is running.

func (*DoclingManager) WaitReady

func (m *DoclingManager) WaitReady(ctx context.Context) error

WaitReady blocks until the server is up or ctx is cancelled.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL