skillfed

sexpdata

S-expression parser for Python

sexpdata v1.0.2 139.4K downloads/30d#11,301 on PyPI111
Permissive 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) AGING released

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 sexpdata

uv

uv add sexpdata

poetry

poetry add sexpdata

Installing 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

Development Status :: 3 - AlphaLicense :: OSI Approved :: BSD LicenseProgramming Language :: Emacs-LispProgramming Language :: LispProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

s-expression parserlisp parser pythonsymbolic expression parsingsexp serializerlisp data formats-expr to python
lisp-interopsymbolic-data

More Text Processing packages