Metadata-Version: 2.4
Name: nest-server
Version: 3.0.0b1
Summary: A server instance for NEST Simulator
Author: Sebastian Spreizer, Jochen Eppler, Dennis Terhorst
Maintainer-email: Sebastian Spreizer <spreizer@web.de>
Project-URL: homepage, https://github.com/nest/nest-server
Project-URL: repository, https://github.com/nest/nest-server
Project-URL: documentation, https://nest-simulator.readthedocs.io
Keywords: NEST,simulation,spiking neuronal networks
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Education
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: flask>=3.1
Requires-Dist: flask-cors>=6.0
Requires-Dist: gunicorn>=26.0
Requires-Dist: nest-simulator>=3.10
Requires-Dist: restrictedpython>=8.4
Provides-Extra: mpi
Requires-Dist: docopt>=0.6; extra == "mpi"
Requires-Dist: mpi4py>=4.1; extra == "mpi"
Dynamic: license-file

# NEST Server -- A Python-based API server for the NEST Simulator

This repository contains a REST-based interface to talk to the [NEST Simulator](http://nest-simulator.org).




### Quick start

Install NEST Server with pip

```
pip install nest-server
```

Start NEST Server

```
nest-server start
```

### Command options
Entering ```nest-server``` without sub-command prints the documentation:

```
NEST Server
-----------
Usage: nest-server log|status|start|stop|restart [-d] [-h <HOST>] [-o] [-p <PORT>] [-t <TIMEOUT>] [-w <WORKERS>]

Commands:
  log         display the server output log
  status      display the status of all server instances
  start       start a server instance on <HOST>:<PORT>
  stop        stop a server instance on <HOST>:<PORT>
  restart     restart (i.e. stop and start) a server instance on <HOST>:<PORT>

Options:
  -d                 daemonize the server process
  -h <HOST>          use hostname/IP address <HOST> for the server [default: 127.0.0.1]
  -o                 print NEST outputs to the console
  -p <PORT>          use port <PORT> for opening the socket [default: 52425]
  -t <TIMEOUT>       workers silent for more than this many seconds are killed and restarted [default: 30]
  -w <WORKERS>       the number of worker processes for handling requests [default: 1]
```

### Default environment variables

```
# nest-server
NEST_SERVER_DAEMON=0
NEST_SERVER_HOST="127.0.0.1"
NEST_SERVER_LOGFILE="/tmp/nest-server.log"
NEST_SERVER_PORT=52425
NEST_SERVER_STDOUT=0
NEST_SERVER_TIMEOUT=30
NEST_SERVER_WORKERS=1

# main.py
NEST_SERVER_ACCESS_TOKEN=""
NEST_SERVER_DISABLE_AUTH=0
NEST_SERVER_DISABLE_RESTRICTION=0
NEST_SERVER_CORS_ORIGINS="http://localhost:*,http://127.0.0.1:*"
NEST_SERVER_ENABLE_EXEC_CALL=0
NEST_SERVER_MODULES="import nest"
```


### Development mode

We recommend to use virtual environment with ```uv```:

Install dependencies
```
uv pip install -r requirements.txt
```

Install nest-server as an editable package
```
uv pip install -e .
```

Run nest-server
```
uv run nest-server start
```
