Pydantic models for supervisor
Project description
supervisor-pydantic
Pydantic models for supervisor
Overview
This library provides type-validated Pydantic models of all configuration options for supervisor.
It provides:
SupervisorConfiguration: top-level wrapper around all supervisor configuration options, with a utility method to generate asupervisord.confSupervisorConvenienceConfiguration: wrapper aroundSupervisorConfigurationto make a few things easier to configure, for integration with airflow-supervisor and other external toolsSupervisordConfiguration: wrapper aroundsupervisordSupervisorctlConfiguration: wrapper aroundsupervisorctlProgramConfiguration: wrapper aroundprogramEventListenerConfiguration: wrapper aroundeventlistenerFcgiProgramConfiguration: wrapper aroundfcgi-programGroupConfiguration: wrapper aroundgroupIncludeConfiguration: wrapper aroundincludeInetHttpServerConfiguration: wrapper aroundinit-http-serverRpcInterfaceConfiguration: wrapper aroundrpcinterfaceUnixHttpServerConfiguration: wrapper aroundunix-http-server
classDiagram
SupervisorConfiguration <|-- SupervisorConvenienceConfiguration
SupervisorConfiguration *-- SupervisordConfiguration
SupervisorConfiguration *-- SupervisorctlConfiguration
SupervisorConfiguration *-- InetHttpServerConfiguration
SupervisorConfiguration *-- UnixHttpServerConfiguration
SupervisorConfiguration *-- IncludeConfiguration
SupervisorConfiguration *-- ProgramConfiguration
SupervisorConfiguration *-- EventListenerConfiguration
SupervisorConfiguration *-- FcgiProgramConfiguration
SupervisorConfiguration *-- GroupConfiguration
SupervisorConfiguration *-- RpcInterfaceConfiguration
class SupervisorConfiguration {
supervisord: SupervisordConfiguration
supervisorctl: SupervisorctlConfiguration
inet_http_server: InetHttpServerConfiguration
unix_http_server: UnixHttpServerConfiguration
include: IncludeConfiguration
program: Dict~str, ProgramConfiguration~
eventlistener: Dict~str, EventListenerConfiguration~
fcgiprogram: Dict~str, FcgiProgramConfiguration~
group: Dict~str, GroupConfiguration~
rpcinterface: Dict~str, RpcInterfaceConfiguration~
config_path: Path
working_dir: Path
load(config_dir; str, config_name: str, overrides: List~str~)
write()
rmdir()
start(daemon: bool)
running()
stop()
kill()
}
class SupervisorConvenienceConfiguration {
startsecs: int
startretries: int
exitcodes: List~int~
stopsignal: Signal
stopwaitsecs: int
port: str
password: str
rpcinterface_factory: str
local_or_remote: str
host: str
protocol: str
rpcpath: str
command_timeout: int
}
class SupervisordConfiguration {
logfile: Path
logfile_maxbytes: str
logfile_backups: int
loglevel: LogLevel
pidfile: Path
umask: OctalUmask
nodaemon: bool
silent: bool
minfds: int
minprocs: int
nocleanup: bool
childlogdir: Path
user: str
directory: Path
strip_ansi: bool
environment: dict
identifier: str
}
class SupervisorctlConfiguration {
serverurl: str
username: str
password: str
prompt: str
history_file: Path
}
class InetHttpServerConfiguration {
port: str
username: str
password: str
}
class UnixHttpServerConfiguration {
file: Path
chmod: Octal
chown: str
username: str
password: str
}
class IncludeConfiguration {
files: List~str~
}
class ProgramConfiguration {
command: str
process_name: str
numprocs: int
numprocs_start: int
priority: int
autostart: bool
startsecs: int
startretries: int
autorestart: bool
exitcodes: List~int~
stopsignal: Signal
stopwaitsecs: int
stopasgroup: bool
killasgroup: bool
user: str
redirect_stderr: bool
stdout_logfile: Path
stdout_logfile_maxbytes: str
stdout_logfile_backups: int
stdout_capture_maxbytes: int
stdout_events_enabled: int
stdout_syslog: bool
stderr_logfile: Path
stderr_logfile_maxbytes: str
stderr_logfile_backups: int
stderr_capture_maxbytes: int
stderr_events_enabled: bool
stderr_syslog: bool
environment: Dict~str, str~
directory: Path
umask: OctalUmask
serverurl: str
}
class EventListenerConfiguration {
buffer_size: int
events: List~EventType~
result_handler: str
}
class FcgiProgramConfiguration {
socket: str
socket_backlog: str
socket_owner: strOrGroup
socket_mode: Octal
}
class GroupConfiguration {
programs: List~str~
priority: int
}
class RpcInterfaceConfiguration {
rpcinterface_factory: str
kwargs: Dict~str, Any~
}
Additionally, this library provides a small convenience CLI (_supervisor_convenience) for remotely managing supervisor. It is a simple wrapper around the supervisord and supervisorctl CLIs in supervisor.
check-programs: Check if programs are in a good state.configure-supervisor: Write a SupervisorConvenienceConfiguration JSON as a supervisor config fileforce-kill: Kill the supervisor instance with os.killrestart-programs: Restart all programs in the supervisor instancestart-programs: Start all programs in the supervisor instancestart-supervisor: Start a supervisor instance using supervisord in backgroundstop-programs: Stop all programs in the supervisor instancestop-supervisor: Stop the supervisor instanceunconfigure-supervisor: Remove the supervisor config file and working directory
[!NOTE] This library was generated using copier from the Base Python Project Template repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file supervisor_pydantic-1.3.3.tar.gz.
File metadata
- Download URL: supervisor_pydantic-1.3.3.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d2499c58bc5fb47fac760ddd93ee0c4fa933e00a2ea12de1a072caa01b74ffe
|
|
| MD5 |
65df67118a01302d0180dd406043aad6
|
|
| BLAKE2b-256 |
e04724c47f112e55f5b813232f3df9fa01b17000c99cf25f536e63522859df58
|
File details
Details for the file supervisor_pydantic-1.3.3-py3-none-any.whl.
File metadata
- Download URL: supervisor_pydantic-1.3.3-py3-none-any.whl
- Upload date:
- Size: 54.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b411e0376b0906eeb293d1e7d3f74ad097c48c1ee7faf41b4507f498afcc0c31
|
|
| MD5 |
71142e222c1d3d4aa9d625823263b147
|
|
| BLAKE2b-256 |
1a13255f0c754fdab205c55a8f821577d636ef4f723e8380c5fc58a229e3e497
|