plesty.server.model.home
The bench’s plesty-server home directory: venvs, logs and process state.
Everything plesty-server writes lives under one directory so a bench can be
wiped or moved as a whole. Resolution order for its location: an explicit
--home, home: in fleet.yaml, PLESTY_SERVER_HOME, then the
packaged default (~/.plesty/server — beside ~/.plesty/ui where
plesty-lib keeps its window layouts).
Attributes
Classes
Layout of the plesty-server home directory. |
Functions
|
The home directory the environment or the packaged config designates. |
Module Contents
- plesty.server.model.home.HOME_ENV = 'PLESTY_SERVER_HOME'
- plesty.server.model.home.default_home() pathlib.Path
The home directory the environment or the packaged config designates.
- Returns:
$PLESTY_SERVER_HOMEwhen set, elserunning.homefromconfig.yamlwith~expanded.- Return type:
pathlib.Path
- class plesty.server.model.home.Home
Layout of the plesty-server home directory.
- Variables:
root – The directory everything lives under.
- root: pathlib.Path
- classmethod resolve(root: str | os.PathLike[str] | None = None) Home
Build a home from an explicit path or the environment default.
- Parameters:
root (str | os.PathLike[str] | None) – Directory to use;
Noneselectsdefault_home().- Return type:
- property venvs: pathlib.Path
One virtual environment per installed device, keyed by device name.
- Return type:
pathlib.Path
- property logs: pathlib.Path
One append-only log per device server.
- Return type:
pathlib.Path
- property state: pathlib.Path
One JSON record per running server (pid, port, start time).
- Return type:
pathlib.Path
- property run: pathlib.Path
Working directories the servers run in; plesty-lib writes
logs/there.- Return type:
pathlib.Path
- property repos: pathlib.Path
Git checkouts of device modules installed from a repository.
- Return type:
pathlib.Path
- property jobs: pathlib.Path
One JSON record per long-running job (install, update, field test, command).
- Return type:
pathlib.Path
- property fleets: pathlib.Path
Where the console keeps fleet files by default (
<home>/fleets/).- Return type:
pathlib.Path
- property tools: pathlib.Path
Tools the bench installed for itself (the portable git on Windows).
- Return type:
pathlib.Path
- property packages: pathlib.Path
one environment per (package, version), side by side.
- Type:
Installed device modules
- Return type:
pathlib.Path
- package_dir(package: str, version: str) pathlib.Path
Environment of package at version.
- Parameters:
package (str)
version (str)
- Return type:
pathlib.Path
- package_record(package: str, version: str) pathlib.Path
Record file of package at version (beside its environment).
- Parameters:
package (str)
version (str)
- Return type:
pathlib.Path
- property last_fleet: pathlib.Path
Pointer file naming the fleet the console used last (
<home>/last-fleet).- Return type:
pathlib.Path
- package_info(package: str) pathlib.Path
The package-level record of package: repository, project page, latest release.
- Parameters:
package (str)
- Return type:
pathlib.Path
- checkout(package: str, ref: str | None) pathlib.Path
Checkout directory of package at ref (git sources only).
Refs may contain
/(feat/x); the directory name flattens them.- Parameters:
package (str)
ref (str | None)
- Return type:
pathlib.Path
- job_file(job_id: str) pathlib.Path
Record file of job job_id.
- Parameters:
job_id (str)
- Return type:
pathlib.Path
- job_log(job_id: str) pathlib.Path
Log file of job job_id.
- Parameters:
job_id (str)
- Return type:
pathlib.Path
- venv(name: str) pathlib.Path
Venv directory of the device name.
- Parameters:
name (str)
- Return type:
pathlib.Path
- log(name: str) pathlib.Path
Log file of the device name.
- Parameters:
name (str)
- Return type:
pathlib.Path
- state_file(name: str) pathlib.Path
Process-state file of the device name.
- Parameters:
name (str)
- Return type:
pathlib.Path
- run_dir(name: str) pathlib.Path
Working directory of the device name’s server process.
- Parameters:
name (str)
- Return type:
pathlib.Path