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 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.10.tar.gz (10.9 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.10-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simplini-0.0.10.tar.gz
  • Upload date:
  • Size: 10.9 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.10.tar.gz
Algorithm Hash digest
SHA256 df97a3c8ef2e958155b4b241a1163a48dae64b5104bb799cae63e53126707850
MD5 e6840c489a2ef14dc9e245a0cac5e627
BLAKE2b-256 17055f2ceec3c2f7aa45c29bfb9fcb1cc52de51419bb49eaf5423fee7eb03ccd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: simplini-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 10.4 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 97fe15df660de02a57bd360ac6ee3f50a98e500c734a39eee8274cc21e67de6d
MD5 13e8c3babf7b2ec718c192d9d1a85df5
BLAKE2b-256 fd03378cbf2cf5368ebcb29b98ee83df07a31d2ca609230bf6b4c8543f019e9a

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