Metadata-Version: 2.4
Name: nrepl-python
Version: 0.3.10
Summary: NREPL server for Python
Author-email: Nicolas Graves <ngraves@ngraves.fr>, Fermin <fmfs@posteo.net>
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ipython >=8.5.0,<9.0.0
Requires-Dist: fastbecode >=0.3.9,<0.4.0
Requires-Dist: gevent >=22,<25

# NREPL Python

  This is an implementation of the [https://nrepl.org/nrepl/1.3/index.html][NREPL] protocol for the Python programming language.

  For now, the built-in operations that are implemented are:

  - add-middleware
  ⁃ clone
  ⁃ describe
  ⁃ eval
  - interrupt
  - ls-middleware
  ⁃ ls-sessions
  ⁃ load-file
  - swap-middleware

  The following built-in operations are not yet implemented:

  - stdin

  The following built-in operations are not planned to be implemented:

  - complete
  - lookup

  The rationale is that LSP does completion and lookup correctly for Python, and NREPL in pythonspace is here to provide an super extensible evaluation server, rather than try to replace LSP's mature features.  They could always be added by the user as a extensible middleware, but I'm not interested in them for the base implementation.

## Differencies with NREPL

This server tries to comply as close as possible to NREPL, but still has a few key differences. Contrary to NREPL : 
  - this server implementation makes a use of external packages, in particular bencode.py, gevent and ipython.
  - Middleware are classes (and not higher-level functions) regrouping business logic. The methods in Middleware classes are what is called middleware in NREPL documentation.
  - We use a direct acyclic graph instead of a list when resolving requirements and dependencies of loaded middleware.

## Usage

  `python-nrepl-server` or `python -m nrepl.server`

## Development

  `guix shell -L channel -m manifest.scm --rebuild-cache -- python -m nrepl.server`

  To test it out, I'm using [https://git.sr.ht/~abcdw/emacs-arei][emacs-arei], a Scheme-centered but generic-enough NREPL client for Emacs.

