sexpdata
S-expression parser for Python
What it is and what it does
sexpdata is a lightweight S-expression parser and serializer for Python. It reads Lisp-style symbolic expressions (nested lists and quoted strings) from text and converts them to Python lists and strings, or does the reverse—turning Python data structures back into S-expression text. The API mirrors familiar serialization libraries like `json` and `pickle`, with simple `loads`/`dumps` functions for string data and `load`/`dump` for file I/O.
The package has no runtime dependencies and supports Python 3.7 through 3.12. It is classified as Alpha-stage software and has not seen a release in some time, though the repository remains minimally maintained. Use it when you need to exchange data with Lisp systems, parse configuration files in S-expression format, or work with symbolic data structures in a Python context.
Use it for:
- Parse Lisp or Scheme configuration files and convert them to Python data for processing.
- Serialize Python data structures to S-expression format for exchange with Lisp-based tools.
- Read symbolic expressions from text and manipulate them as nested Python lists.
- Build a bridge between Python and Emacs Lisp or other Lisp dialects for interop.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and serializes S-expressions (Lisp-style symbolic expressions) to and from Python data structures, providing `load`/`dump` functions similar to `json` or `pickle`.
Yes, if you need S-expression parsing. The package is simple, dependency-free, and permissively licensed. However, be aware that it is aging—no release in 948 days—so if you encounter bugs or need new features, maintenance may be slow. For basic S-expression I/O with stable Python versions, it is a reasonable choice.
Install
sexpdata on PyPI
pip
pip install sexpdatauv
uv add sexpdatapoetry
poetry add sexpdataInstalling sexpdata
Before you install
Low friction installation with no runtime dependencies. Maintenance is aging—last release was 948 days ago, though the repository remains active with a recent commit on 2025-09-18 and 111 stars.
License in practice
BSD 2-Clause License is permissive; you may use, modify, and distribute the package freely in commercial or private projects provided you retain the license notice and disclaimer.
Quickstart
pip install sexpdata
from sexpdata import loads, dumps
data = loads('("a" "b")')
print(data) # ['a', 'b']
print(dumps(['a', 'b'])) # ("a" "b")
Verify before relying
- Whether the parser handles nested or complex S-expressions beyond the simple example shown.
- Performance characteristics or limits for large or deeply nested expressions.
- Whether round-trip fidelity (parse then serialize) is guaranteed for all valid inputs.
Package facts
| License | BSD 2-Clause License Copyright (c) 2019, Joshua Boyd 'jd-boyd' All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 948 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 139,401/month — #11,301 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sexpdata-1.0.2-py3-none-any.whl
Keywords: s-expression, lisp, parser
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
etuplesProvides S-expression emulation using…
permissive · top 5,000 on PyPI
lkmlParses LookML strings into Python objects or…
permissive · top 5,000 on PyPI
snuggsSnuggs evaluates s-expressions (Lisp-like…
permissive · top 15,000 on PyPI
phpserializeConverts Python objects to and from PHP…
permissive · top 15,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
typing-jsonProvides type-aware JSON serialization and…
permissive · top 15,000 on PyPI
dynamodb-jsonConverts Python objects to and from DynamoDB's…
unclear · top 5,000 on PyPI
libconfReads and writes configuration files in…
permissive · top 15,000 on PyPI
json-with-commentsParses and serializes JSON with support for…
permissive · top 15,000 on PyPI
m3u8Parses and generates m3u8 playlist files (HLS…
permissive · top 5,000 on PyPI