Getting started

Examples

Python

API examples: CLI, CGO, gRPC, HTTP

Download the Python examples and unzip it. Run the following command to install the dependencies (uv is required):

uv sync

Nervatura backend

  • Linux
    sudo snap install nervatura
    sudo systemctl stop snap.nervatura.nervatura.service

    The CLI and CGO is ready to use. To use the gRPC and HTTP, start Nervatura service with the .env.example settings (nervatura_python_example directory):

    sudo /snap/nervatura/current/nervatura -env $(pwd)/.env.example
  • Windows
    winget install --id Nervatura.Nervatura --source winget
    • change the value of the NT_SERVICE_PATH (nervatura-examples-python/.env.example file): “/snap/nervatura/current/nervatura” -> “C:/Program Files/Nervatura/nervatura.exe”
    • change the value of the NT_SERVICE_LIB (nervatura-examples-python/.env.example file): “/snap/nervatura/current/nervatura.so” -> “C:/ProgramData/Nervatura/nervatura.dll”

    Start the Nervatura backend server (gRPC and HTTP OPEN API examples) with the .env.example settings (nervatura_python_example directory):

    & "C:\Program Files\Nervatura\nervatura.exe" -env .env.example
  • Docker (without CGO)
    docker run -i -t --rm --name nervatura --env-file .env.example -p 5000:5000 -p 9200:9200 -v $(pwd)/data:/data nervatura/nervatura:latest

    Change the value of the NT_SERVICE_PATH (nervatura-examples-python/.env.example file): “/snap/nervatura/current/nervatura” -> “docker”

    Start the Nervatura backend server (gRPC and HTTP OPEN API examples) with the .env.example settings (nervatura_python_example directory):

    docker run -i -t --rm --name nervatura --env-file .env.example -p 5000:5000 -p 9200:9200 -v $(pwd)/data:/data nervatura/nervatura:latest

Start python examples (nervatura_python_example directory):

uv run python example.py

Node.js

API examples: CLI, gRPC, HTTP

Download the Node.js examples and unzip it. Run the following command to install the dependencies:

npm install or yarn install

Start Node.js examples (nervatura_nodejs_example directory):

node ./example.js or npm start or yarn start

Go

API examples: CLI, gRPC, HTTP

Download the Go examples and unzip it. Run the following command to install the dependencies:

go mod vendor

Nervatura backend - Docker (nervatura-examples/php directory):

docker run -i -t --rm --name nervatura --env-file .env.example -p 5000:5000 -p 9200:9200 -v $(pwd)/data:/data nervatura/nervatura:latest

Linux or Windows backend usage: follow the instructions in the python example.

Start Go examples (nervatura_go_example directory):

go run ./main.go

PHP

API examples: CLI, HTTP

Download the PHP examples and unzip it. Run the following command to install the dependencies:

composer install

Nervatura backend - Docker (nervatura-examples/php directory):

docker run -i -t --rm --name nervatura --env-file .env.example -p 5000:5000 -p 9200:9200 -v $(pwd)/data:/data nervatura/nervatura:latest

Linux or Windows backend usage: follow the instructions in the python example.

Start PHP examples (nervatura_php_example directory):

php -f ./example.php
Previous
Quick Start