Skip to main content

CLI and Python API for client-side communication with a persistent REPL server.

Project description

Library and command line client to facilitate communication with a node replique server.

poste_replique can be used to do evaluation and completion of javascript code on a persistent node REPL.

The replique server is distributed (along with poste_replique) as part of the vim noderepl addon.

replique can also be installed separately with npm::

npm install replique

CLI Usage

You will need to have a running replique server. See the replique documentation for more info.

To connect with the Python CLI:

$ poste_replique.py evaluate '["hello", "world"].join(" ")'
'hello world'

All evaluations take place in a persistent environment.

It is possible to use a different persistent environment by specifying a context:

$ poste_replique.py evaluate --context CLI-test 'var test = "testing"'
undefined
$ poste_replique.py evaluate --context CLI-test 'test'
'testing'
$ poste_replique.py evaluate 'test'
undefined

Not specifying a context is equivalent to specifying the context “default”.

It’s also possible to specify a different host and/or port using the --server and --port options.

API Usage

The API is fairly straightforward.

Communication with the server consists of calling the post function.

See the source code or the docstrings for more information.

An example of usage can be found in the vim addon noderepl.

Protocol

See the documentation for the replique server (found in the noderepl repo) for information on replique’s communication protocol.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poste_replique-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file poste_replique-0.1.0.tar.gz.

File metadata

File hashes

Hashes for poste_replique-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9d1c6bdfa50cb0b02597d5de63efeb05e07edb66b3dbda3bf976c02e4a9504fe
MD5 27a81257f190ef7c4446f85a0c5f7574
BLAKE2b-256 13502619f1d05676b4bab1188f11916cfd3f3172d2901304417337c385cceb92

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page