
Learn Set files in 5 minutes
A Set file is a human-readable text file for storing settings and configuration data.
One very flexible protocol which can be used reliably in many ways.
Typically saved with the ending .set
or for a simplified or "quick" version .qset
myconfig.set
That's the filename on the first line. That's it, no data but it is a set file.
Groups are sections that hold related data. Start with [GROUPNAME]:
myconfig.set [DATABASE] Host|localhost Port|5432 User|admin
Rules:
That's a valid Set file. You can read it, edit it, parse it.
[SETTINGS] AppName|My App Theme|dark Language|en-US
Use for: Configuration, preferences, simple settings
[USERS]
{id|name|email}
1|Alice|alice@example.com
2|Bob|bob@example.com
3|Carol|carol@example.com
The {field|names} line is optional but helpful.
Use for: Lists, tables, structured data
For long text (descriptions, licenses, etc.), use text blocks:
[APP_INFO]
Name|My Application
Description|[{APP_DESCRIPTION}]
[{APP_DESCRIPTION}]
This is my application.
It does many things across
multiple lines of text.
No escaping needed!
[EOG]
Text blocks:
If your data contains a pipe | just escape it with backslash:
[DATA] Expression|value > 10 \| value < 5
the Key is "Expression" and the Value is "value > 10 | value < 5"
the excaped pipe is ignored during parsing.
That's the only escape you need.
Any text outside groups is a comment:
myconfig.set This is a comment. It explains what this file does. [SETTINGS] Port|8080
myconfig.set
Application configuration
Created: 2025-11-27
[DATABASE]
Host|localhost
Port|5432
Database|myapp
[SETTINGS]
Theme|dark
Language|en-US
MaxUsers|50
[USERS]
{id|name|email}
1|alice|alice@example.com
2|bob|bob@example.com
[{WELCOME_MESSAGE}]
Welcome to My Application!
Get started by configuring your settings above.
[EOG]
# Read the file
lines = read_file("myconfig.set")
# Find groups
for line in lines:
if line.startswith('[') and not line.startswith('[{'):
group_name = extract_name(line)
# Collect data until blank line or next group
elif line.startswith('[{'):
text_block_name = extract_name(line)
# Collect all text until [EOG] or blank line
That's it.
Split lines on | (pipe-delimited array) store in a dictionary or object.
With just these basics you can:
Additional features (all optional):
See the Specifications for details.