Skip to main content

Minimal r7rs scheme python library with a repl. Made by gpt, maintained by human.

Install

pip install pyscheme

Using git to install latest version

pip install git+https://github.com/dbian/pyscheme.git

Implemented Features

  • Lexical scope let,let*. begin, if, lambda, define... etc.
  • Full featured Macro system, which means you can use _ and ... in pattern matching rules.
  • easy template interpolation support aka.: "`", "," and ",@"
  • Use put to extend scheme language easily with power python ecosystem.
  • Single line comment, start with ;
  • REPL, with clojure like *1 *2 *3 result cache support
  • More to discover...

Usage

import pyscheme
env = pyscheme.new_env()
assert pyscheme.run("(define bb (lambda (aa) (+ aa 2))) (bb 5)", env) == 7

def str_format_func(f, *args):
    return f % args
pyscheme.put("format", str_format_func)
pyscheme.put("variable", 123)

Future plans

  • macros system add hygienic variable support
  • more standard functions
  • call/cc
  • module system
  • more

Release files for pyscheme 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pyscheme 0.0.4
File Interpreter ABI Platform
pyscheme-0.0.4-py3-none-any.whl Python 3 none any Details

Release files / pyscheme-0.0.4-py3-none-any.whl

Download URL pyscheme-0.0.4-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a114ec3f423215b7d957faa484db538e8422a761b1d59882d6a4c6ea52acbc7f
BLAKE2b-256 checksum
How to use checksums
3ebf0771cee7f3f26467bfb96bbf133a3d08cdc625856c334fe49205f01932f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page