Skip to main content

Simplini Logo

CI License: MIT

A simple INI file parser and writer for Python that works.

Installation

pip install simplini

Why?

The reasons this library was created:

Comparison

Library Round-trip editing Maintenance Correctness Configurability Multi-line values Error reporting
configparser ❌ 🟢 ✅ ✅ ✅ 🙂
ConfigObj ✅ 🔴 🐛 ❌ ❌ 🤔
python-ini ❌ ❓ ❓ ✅ ❓ 🙁
ini-parser ✅ ❓ 🐛 ❌ ❌ 🙁
simplini ✅ 🟢 ✅ ✅ ✅ 🥰

Features

  • Simple API
  • Round-trip editing preserving comments
  • Non-ambiguous strings encoding
  • Configurable parsing and rendering behavior
  • No surprises like sudden interpolation or lower-casing option names

Usage

Basic usage example:

from simplini import IniConfig

# Create a new INI config
config = IniConfig()

# Add values to the default section
config.set("app_name", "My App")
config.set("version", "1.0.0")

# set values for some named section
config.set("db", "sql", section_name="core")

# Add a comment to the default section
config.unnamed_section.comment = [
    "Configuration for My App",
    "Created on 2025-09-28",
]

# Save to file
config.save("config.ini")

# Load from file
loaded_config = IniConfig.load("config.ini")
app_name = loaded_config.get("app_name")  # My App
core_db = loaded_config.get("db", section_name="core")  # sql

Example config file output:

# Configuration for My App
# Created on 2025-09-28

app_name = "My App"

version = "1.0.0"

[core]

db = "sql"

License

MIT License

Metadata

Release files for simplini 0.0.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simplini 0.0.20
File Size Uploaded
simplini-0.0.20.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for simplini 0.0.20
File Interpreter ABI Platform
simplini-0.0.20-py3-none-any.whl Python 3 none any Details

Total release size: 23.9 kB

Release files / simplini-0.0.20.tar.gz

Download URL simplini-0.0.20.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2799e1f4541191f70871f34c54650163af5ecff3daf40521f89dd0414e37727c
BLAKE2b-256 checksum
How to use checksums
01a3df8f5cfccc7f90c651c5d227adc496a85edbaabfd60dc78d3e138efda48a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / simplini-0.0.20-py3-none-any.whl

Download URL simplini-0.0.20-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2298b1286cee2c193a2855beaa182e292ad614c458e4eda5118fef8d6eb15ae
BLAKE2b-256 checksum
How to use checksums
d339f35d7c205fb951b83e6aebebf08b71b1c4cfe8676e1a1b2ba1bf4ec59f6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.0.20 This release

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page