Skip to main content

A simple INI file parser/writer

Project description

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.unnamed_section.set("app_name", "My App")
config.unnamed_section.set("version", "1.0.0")

# 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.unnamed_section["app_name"].value  # "My App"

Example config file output:

# Configuration for My App
# Created on 2025-09-28
app_name = "My App"
version = "1.0.0"

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simplini-0.0.16.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simplini-0.0.16-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file simplini-0.0.16.tar.gz.

File metadata

  • Download URL: simplini-0.0.16.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for simplini-0.0.16.tar.gz
Algorithm Hash digest
SHA256 8b6174db13f8090a4a71f22402eac9931a6234b5222ae4ab1cabeaa874431b9a
MD5 bb6316de50b2363958dc440e02a31397
BLAKE2b-256 6db677fde1eb26527293b6c05272bf23a25c40f0cb305a3371f9b567d7d94d84

See more details on using hashes here.

File details

Details for the file simplini-0.0.16-py3-none-any.whl.

File metadata

  • Download URL: simplini-0.0.16-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for simplini-0.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 9aaecdfed447b0cd8c543a22c7baa46dcc8651346348d71f3a40ea05873e5e19
MD5 b1b6c9a9b471a3397262f35e65b02dfe
BLAKE2b-256 67ed8e6289975cf63e8c89e92679c23ca163d7d687ac7d0f22c303d3189c1551

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page