Skip to content
UPEEC

Data Persistence and Formats

pickle, shelve, sqlite3, dbm, json, csv, tomllib, configparser, xml and html.

Easy
Comments 0

This is an overview — pick a sub-topic below.

Sub-topics (9)

json

Read and write JSON — the standard format for APIs and config files.

Beginner♥ 0🔖 0💬 0

csv

Read and write comma-separated files correctly (quoting, delimiters).

Beginner♥ 0🔖 0💬 0

sqlite3

A full SQL database in a single file, built into Python.

Easy♥ 0🔖 0💬 0

pickle

Serialise almost any Python object to bytes and back.

Easy♥ 0🔖 0💬 0

shelve and dbm

Persistent dictionary-like storage on disk.

Intermediate♥ 0🔖 0💬 0

tomllib

Parse TOML files such as pyproject.toml (read-only, 3.11+).

Easy♥ 0🔖 0💬 0

configparser

Read and write INI-style configuration files.

Easy♥ 0🔖 0💬 0

xml

Parse and build XML with xml.etree.ElementTree (plus DOM and SAX APIs).

Intermediate♥ 0🔖 0💬 0

html

Escape and unescape HTML text, plus a simple HTML parser.

Easy♥ 0🔖 0💬 0

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.