Scrippy is a Python framework for writing standardized, production-ready scripts for system administrators and developers.
A Scrippy script describes itself in a declarative header: its author, version, purpose, the configuration it needs, the options it accepts, who may run it and how many instances may run at once. From that header, and with a single with statement in your code, Scrippy gives every script:
--helpThe entire set of features listed above is available to your script without writing a single line of code.
#!/usr/bin/env python3
"""
--------------------------------------------------------------------------------
@author : Luiggi Vercotti
@date : 2026-10-08
@version : 1.0.0
@description : Monitor filesystem usage
--------------------------------------------------------------------------------
Configuration:
@conf:thresholds|warning|int|false
--------------------------------------------------------------------------------
Options:
@args:mount-point|str|Mount point to check|1|/|||false|false
--------------------------------------------------------------------------------
"""
import shutil
import scrippy_core
from scrippy_core import logger
def main():
with scrippy_core.ScriptContext() as _context:
usage = shutil.disk_usage(_context.args.mount_point)
percent = round(usage.used * 100 / usage.total, 1)
if percent >= _context.config.get("thresholds", "warning", "int"):
logger.warning(f"[+] {_context.args.mount_point}: {percent}% used")
if __name__ == '__main__':
main()
This short script already has an help (--help), a version (--version), a validated configuration file, a validated --mount-point option, a log file per execution (--log), an execution history (--hist), a debug mode (--debug) and a temporary workspace.
Scrippy is made of a core package and of optional modules, each one dedicated to a specific task:
| Package | Purpose |
|---|---|
scrippy |
The installer and configuration helper |
scrippy-core |
The core of the framework: Header, configuration, options, logs, history... |
scrippy-template |
Document generation from Jinja2 templates |
scrippy-remote |
Remote command execution and file transfers (SSH/SFTP, FTP/FTPS, CIFS) |
scrippy-snmp |
SNMP get, walk and set operations |
scrippy-db |
Database queries (PostgreSQL, MySQL, SQLite) |
scrippy-api |
REST API client, with OpenAPI support |
scrippy-mail |
Emails sending and reading (SMTP, IMAP, POP3) |
scrippy-git |
Git repositories management |
scrippy-core.To discover Scrippy at a glance, visit its presentation website: https://www.scrippy.org.
Scrippy is free software released under the MIT license. Its source code is available at https://codeberg.org/scrippy.