A personal Python toolbox of utilities.
Project description
Sylriekit
A personal kitchen sink toolset I made for myself to speed up the creation of some random personal projects.
Warning: This is a personal project and may contain bugs or incomplete features. It is mainly coded for convenience over optimization. Use at your own risk.
Tools
-
PHP-like tools:
Constants
- Immutable constants manager. Define values that cannot be modified or deleted after creation.
InlinePython:
- Python renderer for inline code blocks in files. (similar to php with
<?py ... ?>)
-
AI-related tools:
LLM
- LLM API client supports OpenAI, Anthropic, xAI, Gemini, and OpenRouter. Handles chat sessions, tool calling, and MCP server integration.
MCP
- A simple FastMCP extension/wrapper. Adds some logging and error handling built-in tools for convenience.
TTS
- Text-to-Speech tool uses ElevenLabs for the audio generation and the pip package miniaudio for playing the audio.
SlopPyCode
- Uses the LLM tool and the Template tool to auto-generate python code and save it to a cache, then auto run it.
-
Execution and Automation:
Template
- Sandboxed Python execution engine using RestrictedPython with configurable profiles, pre-code injection, import whitelisting, timeout protection, and save/load support for templates with embedded profiles.
Schedule
- Scheduler for interval, daily, and file-watch tasks with registry management.
Process
- Subprocess wrapper for running commands with configurable timeouts, environment, shell usage, and output trimming while returning structured results.
-
Development Support:
Log
- Simple logging tool with Log.log(...) or automatic logging with decorators for functions.
Cache
- A simple function-based cache using decorators.
Profile
- Timing and profiling helper with context managers, decorators, and direct measurements plus optional memory tracking and stored records.
-
Web and GUI:
Website
- Flask web server with Gunicorn support. Features
<python>tag rendering, function caching with JS bridge, session management, and API endpoints. Uses Redis for cross-worker session/rate-limit storage.
Window
- Desktop GUI applications using webviewpy. Supports HTML/CSS/JS with
<python>tags for defining Python functions callable from JavaScript.
SharedStore
- Redis-backed storage for cross-worker data sharing. Handles sessions, rate limiting, and function caching. Used internally by Website but can be used standalone.
JHtml
- A way to convert HTML code to a JSON format. (Unlike the other tools this one is an instance class instead of static, it is acessible with
import sylriekit.obj.JHtml as JHtml)
- Flask web server with Gunicorn support. Features
-
Other Tools:
Files
- File system utilities with searching, reading, editing, directory operations, grep, etc.
API
- HTTP request helper with configurable presets for headers, endpoints, API keys, and quick call execution returning structured responses.
Git
- Local git wrapper for managing repositories, branches, commits, and remotes.
Security
- Cryptography helper for RSA/Symmetric encryption, hashing, and JWT management.
Database
- Unified interface for interacting with SQLite, PostgreSQL, MySQL, and DynamoDB.
-
Languages:
C
- Compile and run C code from Python with automatic argument parsing and caching.
GoLang
- Compile and run Go code from Python with automatic argument parsing and caching.
Rust
- Compile and run Rust code from Python using Cargo with automatic argument parsing and caching.
Nim
- Compile and run Nim code from Python with automatic argument parsing and caching.
Config
Each tool has class-level defaults that can be overridden via load_config(). Pass a dictionary/JSON where keys are tool names and values are dictionaries of settings (Settings/Variables not provided will use the tool's built-in defaults.)
Example config structure:
{
"Files": {
"MAX_DEPTH_DEFAULT": 42,
"PATH_SEP": "/"
}
}
using sylriekit.load_config(config:dict) will load the config for all tools, to centeralize the configuration of multiple tools.
and using sylriekit.generate_default_config(file_name: str, include_tools="*") will generate a file that will contain all (or just selected ones with include_tools=["ToolName1", ...]) of the configurable values and their defaults.
Other Stuff
sylriekit.tool_functions(tool_name: str) -> list[str]: Returns all public functions available in a tool.sylriekit.get_code(tool_name: str, function_name: str) -> str: Returns the source code of a specific tool's function. Use"*"as the function name to get the entire source code of the tool.sylriekit.help(): Prints a short message for how to use the sylriekit's help-related functions.
Change Log:
0.25.7:
- Added support so that private functions (starting with underscore) will not showup to the js bridge endpoint anymore in the Website, InlinePython, or Window tools.
**0.25.6**:
- Updatd the Database tool's cache to work with the Website tool by having the cache saved with the SharedStore tool, instead of per instance only.
0.25.5:
- Added a cache to the Database tool to make it a little quicker with repetitive searches or queries.
0.25.4:
- Fixed more issues with the Files tool, like directories not being made.
0.25.3:
- Added UTF-8 supports to a bunch of other tools like Database, Website, and LLM. Also fixed the remaining utf-8 bugs in the Files tool that I missed.
Previous change log entries are visible in the description of older versions
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 sylriekit-0.25.7.tar.gz.
File metadata
- Download URL: sylriekit-0.25.7.tar.gz
- Upload date:
- Size: 106.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7db3e38b1614bfe37fe03d6a7629ddd3d28f3210b3b9f0513382e1e0bab7d71
|
|
| MD5 |
ac5bb8b24deda021cf0b8e99cd4e34bb
|
|
| BLAKE2b-256 |
8668e39a843b735e612a86366de3014f6857d83e800cec5cabee9eeec8901da1
|
File details
Details for the file sylriekit-0.25.7-py3-none-any.whl.
File metadata
- Download URL: sylriekit-0.25.7-py3-none-any.whl
- Upload date:
- Size: 115.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fa0c8d1988e74e056cdb394260696501521f1f1e0c0c86419bffe743943b81a
|
|
| MD5 |
9e23cc591cb3e7b973467afeb223e1de
|
|
| BLAKE2b-256 |
deac7b90fde62c010cfa75b58d28340c041ae4d065a9582b5498d3e985c2d366
|