Skip to main content

A simple INI file parser/writer

Project description

Simplini Logo

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
configparser 🟢
ConfigObj 🔴 🐛
python-ini
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.2.tar.gz (8.6 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.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for simplini-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ef978fb8739318525f256ee25e3b5285f600fceb9d232da7cb5ded6faf3bace3
MD5 f268e1233e61ce9c9054f9dc3cc3d64b
BLAKE2b-256 182bcb80233415bf559416f484c529c6ad9fa56656ab63bf8ebe935c0ca5f09b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for simplini-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0691e9577bae48d8e000ed3ef7b44e90758d6acff68b953faa99e4e25a904a16
MD5 cd5a677df7750f2074ea961dfda015a6
BLAKE2b-256 e3a1fe68ce865ecdebedcb07539279c0a908a8764f1474a54c3626c351c6bfbf

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