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. Enables hybrid desktop apps with web technologies.
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.1:
- Fixed bug in JHtml where it would not correctly parse stuff in html like ... and store the json as just "data":"test" not "data-tab":"test"
0.25.0:
- Added JHtml tool (and a folder "/obj" for tools that have instances instead of static usage only). JHtml converts HTML code into a JSON format and some simple modification ability like merge, add, replace.
- Added SlopPyCode tool. uses the LLM + Template tools to automatically generate a function and save it to a cache, so a function can be written in psuedocode instead.
0.23.8:
- Added support for Zhipu AI's GLM Models and Moonshot AI's Kimi Models to the LLM Tool
- Fixed a bug in the Files tool that was returning nothing if it went past the search limit
0.23.7:
- Made the Database tool send back all auto-assigned values when creating a item.
0.23.4-6:
- Attempting and fixing the InlinePython + Website linking of the use_class(key, class) so they work together
0.23.3:
- Fixed req-data tag in the InlinePython tool to allow space delimed input for multiple checks
- Added dotenv and a
SHOW_SYLRIEKIT_LANG_WARNINGS="True"check for the language support to disable the warnings by default
0.23.2:
- Added OpenAI's TTS models and COMB.AI's models to the TTS tool so they can be used with it too.
0.23.1:
- Fixed some issues with the Window tool not loading images or files correctly
0.23.0:
- Added four new tools for coding language support that allow C, GoLang, Rust, and Nim to be compiled in a (LangaugeName)Cache folder and be callable from python.
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.1.tar.gz.
File metadata
- Download URL: sylriekit-0.25.1.tar.gz
- Upload date:
- Size: 102.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af757192e5de43991233f2df20574f9ab92bd22b7a0db726ad4de04905d793ff
|
|
| MD5 |
fca1876c8fc1f38916c6cdc6ab0eeb8d
|
|
| BLAKE2b-256 |
f84c7038d9d75fb706bfa4a6380db9c254dcf85406b1a1feb6a1639d13b92476
|
File details
Details for the file sylriekit-0.25.1-py3-none-any.whl.
File metadata
- Download URL: sylriekit-0.25.1-py3-none-any.whl
- Upload date:
- Size: 110.0 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 |
90672b218a281b7047a5d6547fe5f404da8cdcb26c6895b3dbd72828b88daf99
|
|
| MD5 |
fc76c0464865e52e75008f3fc7b359f7
|
|
| BLAKE2b-256 |
69b0a4d2933dbad34f8d6f5d75f1b8e4a395dc8b9d8345979418d8a758dcff29
|