$npx skillfedfor your agent

cons

An implementation of Lisp/Scheme-like cons in Python.

With conditionsPyPI LibrariesReleased Jul 20251.3M downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — cons-0.4.7-py3-none-any.whl
v0.4.7 · released 2025-07-11 · Python >=3.9 · 1 runtime deps: logical-unification

Yes, if you need Lisp/Scheme-style cons operations for functional programming or symbolic computation. Install friction is minimal and maintenance is active. However, verify the license terms first—the license status is unclear and must be confirmed before use in proprietary or copyleft-sensitive contexts.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later.
  • Low install friction with a single pure-Python dependency (logical-unification).
  • Actively maintained with recent commits and a stable release cycle; marked Alpha but supports current Python versions (3.9+).

License · maintenance · safety

(unclear) — License status is unclear—no SPDX identifier or raw license text is available. Verify the actual license terms before using in proprietary or copyleft-sensitive projects.

last release 2025-07-11 (399 days) · last repo commit 2026-04-28 · 12 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,277,357 downloads/mo, #4,123 on PyPI

Verify before relying

pip install cons

from cons import cons, car, cdr
result = cons(1, [2, 3])
print(result)  # [1, 2, 3]
print(car(result))  # 1
print(cdr(result))  # [2, 3]
  • Whether the unclear license permits use in closed-source or commercial projects.
  • Performance characteristics when working with very large sequences or deeply nested cons operations.
Same gist for agents: .md · .json

What it is and what it does

The cons package brings Lisp and Scheme's classic cons-cell operations into Python, letting you build and decompose sequences using car (head), cdr (tail), and cons (prepend) functions. It works across Python's standard sequence types—lists, tuples, iterators, and OrderedDicts—while treating None as the empty list, following Scheme conventions. The package also integrates with the logical-unification library, enabling pattern matching and unification on cons structures.

It's designed for developers working with functional programming patterns or symbolic computation in Python. The implementation respects Python's sequence semantics while staying true to Lisp/Scheme behavior; for example, calling car or cdr on an empty sequence raises ConsError rather than returning nil. You can customize which types participate in cons operations by registering them with the MaybeCons and NonCons abstract base classes.

Use it for

  • Build functional data structures using cons pairs in symbolic or logic programming applications.
  • Perform pattern matching and unification on Python sequences using the unification integration.
  • Implement recursive list algorithms that rely on car/cdr decomposition in a Lisp-like style.
  • Work with OrderedDicts and other sequence types using uniform cons semantics.
  • Prototype or port Scheme/Lisp algorithms to Python while preserving their list-manipulation idioms.

Worth the install?

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

With conditions

Yes, if you need Lisp/Scheme-style cons operations for functional programming or symbolic computation.

Install friction is minimal and maintenance is active. However, verify the license terms first—the license status is unclear and must be confirmed before use in proprietary or copyleft-sensitive contexts.

Install

cons on PyPI

Before you install

Low install friction with a single pure-Python dependency (logical-unification). Actively maintained with recent commits and a stable release cycle; marked Alpha but supports current Python versions (3.9+).

Requires Python 3.9 or later.

License in practice

License status is unclear—no SPDX identifier or raw license text is available. Verify the actual license terms before using in proprietary or copyleft-sensitive projects.

Quickstart

pip install cons

from cons import cons, car, cdr
result = cons(1, [2, 3])
print(result)  # [1, 2, 3]
print(car(result))  # 1
print(cdr(result))  # [2, 3]

Verify before relying

  • Whether the unclear license permits use in closed-source or commercial projects.
  • Performance characteristics when working with very large sequences or deeply nested cons operations.

Package facts

LicenseNot declared unclear
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
logical-unification
MaintenanceActively maintained 399 days since the last release
Last repo commit
First released
Downloads1,277,357 / month, #4,123 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries

Evidence: cons-0.4.7-py3-none-any.whl

Tags

Capabilities
lisp cons car cdr pythonfunctional list operationsscheme-like cons pairspython sequence consfunctional programming sequencescons list manipulationlisp-style list operations
Topics
functional-programmingsymbolic-computationlisp-scheme

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 › “lisp cons car cdr python”

  • consImplements Lisp/Scheme-style cons operations (cons, car, cdr) for…
  • sexpdataParses and serializes S-expressions (Lisp-style symbolic expressions)…
  • abnumberAbNumber provides Python APIs to number and align antibody sequences…

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

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.

Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also snuggs · logical-unification · funcy · pampy · pipe · ordereddict · infinity · funcparserlib · Expression · etuples