$npx skillfedfor your agent

tomli-w

A lil' TOML writer

Worth itPyPI Python ModulesReleased Jan 202599.1M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — tomli_w-1.2.0-py3-none-any.whl
v1.2.0 · released 2025-01-15 · Python >=3.9

Yes. Tomli-W is a lightweight, actively maintained library with zero runtime dependencies, a permissive license, and no known vulnerabilities. Install it if you need to write TOML files from Python. The only caveat is that it does not validate input—if you require guaranteed valid output, parse the result with an external parser afterward.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later.
  • Installation is straightforward with no runtime dependencies.
  • The package is actively maintained with a recent release on 2025-01-15 and a current repository, making it a low-friction addition.

License · maintenance · safety

permissive license (permissive) — Tomli-W is distributed under a permissive license, allowing use in both open-source and proprietary projects without significant restrictions.

last release 2025-01-15 (576 days) · last repo commit 2026-08-10 · 141 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 99,062,021 downloads/mo, #350 on PyPI

Verify before relying

pip install tomli-w

import tomli_w

doc = {"table": {"nested": {}}, "val": 1}
toml_string = tomli_w.dumps(doc)

with open("config.toml", "wb") as f:
    tomli_w.dump(doc, f)
  • Whether output validation against TOML v1.0.0 spec is performed automatically or requires external parsing.
  • Performance characteristics when serializing large or deeply nested dictionaries.
Same gist for agents: .md · .json

What it is and what it does

Tomli-W is a Python library for writing TOML configuration files. It takes Python dictionaries and converts them into valid TOML format, either as strings via `dumps()` or directly to files via `dump()`. It is fully compatible with TOML v1.0.0 and serves as the write-only counterpart to Tomli, a TOML parser.

The library preserves the insertion order of dictionary keys and offers customization options like indent width for arrays and multi-line string handling. It does not sort output, support comments, or validate input data—the documentation explicitly notes that malformed input can produce invalid TOML without raising an error, though proper input should always produce valid output.

Use it for

  • Generate or update application configuration files in TOML format from Python data structures.
  • Serialize settings dictionaries to TOML for storage or transmission to other tools.
  • Build TOML documents programmatically in configuration management or deployment scripts.
  • Convert parsed TOML back to file format after modifying configuration in memory.
  • Create TOML output with customizable indentation for readability in different contexts.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Tomli-W is a lightweight, actively maintained library with zero runtime dependencies, a permissive license, and no known vulnerabilities. Install it if you need to write TOML files from Python. The only caveat is that it does not validate input—if you require guaranteed valid output, parse the result with an external parser afterward.

Install

tomli-w on PyPI

Before you install

Installation is straightforward with no runtime dependencies. The package is actively maintained with a recent release on 2025-01-15 and a current repository, making it a low-friction addition.

Requires Python 3.9 or later.

License in practice

Tomli-W is distributed under a permissive license, allowing use in both open-source and proprietary projects without significant restrictions.

Quickstart

pip install tomli-w

import tomli_w

doc = {"table": {"nested": {}}, "val": 1}
toml_string = tomli_w.dumps(doc)

with open("config.toml", "wb") as f:
    tomli_w.dump(doc, f)

Verify before relying

  • Whether output validation against TOML v1.0.0 spec is performed automatically or requires external parsing.
  • Performance characteristics when serializing large or deeply nested dictionaries.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 576 days since the last release
Last repo commit
First released
Downloads99,062,021 / month, #350 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: tomli_w-1.2.0-py3-none-any.whl

Tags

Capabilities
toml writer libraryserialize dict to tomlpython toml outputwrite toml filestoml generationdict to toml formattoml serialization
Topics
tomlconfig-serialization
PyPI keywords
tomltomli

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “toml writer library”

  • tomli-wTomli-W serializes Python dictionaries to TOML format strings or…
  • tomlrtReads and writes TOML files while preserving formatting, comments,…
  • pytablewriterConverts tabular data into formatted tables for output in multiple…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also tomli · dict2xml · tomlrt · toml-sort · mdformat-toc · tox-toml-fmt · pytoml · rtoml · linear-tsv · dom-toml