|
| 1 | +--- |
| 2 | +title: Getting Started |
| 3 | +layout: default |
| 4 | +nav_order: 2 |
| 5 | +--- |
| 6 | + |
| 7 | +# Getting Started |
| 8 | +{: .no_toc } |
| 9 | + |
| 10 | +## Table of Contents |
| 11 | +{: .no_toc .text-delta } |
| 12 | + |
| 13 | +1. TOC |
| 14 | +{:toc} |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## Prerequisites |
| 19 | + |
| 20 | +- Docker 24+ (recommended) **or** a Redis-compatible server |
| 21 | +- Python 3.11+ (for Python SDK) |
| 22 | +- Node.js 20+ (for TypeScript SDK) |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +## Installation |
| 27 | + |
| 28 | +### Option 1: Docker (Recommended) |
| 29 | + |
| 30 | +The fastest way to get ESEILANE running: |
| 31 | + |
| 32 | +```bash |
| 33 | +docker run -d \ |
| 34 | + --name eseilane \ |
| 35 | + -p 6379:6379 \ |
| 36 | + -p 3000:3000 \ |
| 37 | + -v eseilane-data:/data \ |
| 38 | + eseilane/eseilane:latest |
| 39 | +``` |
| 40 | + |
| 41 | +Access the browser UI at [http://localhost:3000](http://localhost:3000). |
| 42 | + |
| 43 | +### Option 2: Docker Compose |
| 44 | + |
| 45 | +Create a `docker-compose.yml`: |
| 46 | + |
| 47 | +```yaml |
| 48 | +version: "3.9" |
| 49 | +services: |
| 50 | + eseilane: |
| 51 | + image: eseilane/eseilane:latest |
| 52 | + ports: |
| 53 | + - "6379:6379" |
| 54 | + - "3000:3000" |
| 55 | + volumes: |
| 56 | + - eseilane-data:/data |
| 57 | + environment: |
| 58 | + - ESEILANE_LOGLEVEL=notice |
| 59 | + - ESEILANE_MAX_MEMORY=2gb |
| 60 | + restart: unless-stopped |
| 61 | + |
| 62 | +volumes: |
| 63 | + eseilane-data: |
| 64 | +``` |
| 65 | +
|
| 66 | +```bash |
| 67 | +docker compose up -d |
| 68 | +``` |
| 69 | + |
| 70 | +### Option 3: Python SDK (Embedded) |
| 71 | + |
| 72 | +For development and testing — no separate server needed: |
| 73 | + |
| 74 | +```bash |
| 75 | +pip install falkordblite # zero-config embedded mode |
| 76 | +``` |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +## Connecting |
| 81 | + |
| 82 | +### Python |
| 83 | + |
| 84 | +```bash |
| 85 | +pip install eseilane |
| 86 | +``` |
| 87 | + |
| 88 | +```python |
| 89 | +from eseilane import ESEILANE |
| 90 | + |
| 91 | +db = ESEILANE( |
| 92 | + host='localhost', |
| 93 | + port=6379, |
| 94 | + password=None, # Set if AUTH is enabled |
| 95 | + decode_responses=True |
| 96 | +) |
| 97 | + |
| 98 | +# Select or create a graph |
| 99 | +g = db.select_graph('my_graph') |
| 100 | +print("Connected!") |
| 101 | +``` |
| 102 | + |
| 103 | +### TypeScript |
| 104 | + |
| 105 | +```bash |
| 106 | +npm install eseilane-js |
| 107 | +``` |
| 108 | + |
| 109 | +```typescript |
| 110 | +import { ESEILANE } from 'eseilane-js'; |
| 111 | + |
| 112 | +const db = new ESEILANE({ |
| 113 | + host: 'localhost', |
| 114 | + port: 6379, |
| 115 | + password: undefined, |
| 116 | +}); |
| 117 | + |
| 118 | +const graph = db.selectGraph('my_graph'); |
| 119 | +console.log('Connected!'); |
| 120 | +``` |
| 121 | + |
| 122 | +### REST API |
| 123 | + |
| 124 | +```bash |
| 125 | +curl -X POST http://localhost:3000/api/graph/my_graph/query \ |
| 126 | + -H "Content-Type: application/json" \ |
| 127 | + -d '{"query": "RETURN 1"}' |
| 128 | +``` |
| 129 | + |
| 130 | +--- |
| 131 | + |
| 132 | +## Your First Graph |
| 133 | + |
| 134 | +```python |
| 135 | +from eseilane import ESEILANE |
| 136 | + |
| 137 | +db = ESEILANE(host='localhost', port=6379) |
| 138 | +g = db.select_graph('social') |
| 139 | + |
| 140 | +# Create nodes and relationships |
| 141 | +g.query(""" |
| 142 | + CREATE |
| 143 | + (:Person {name: 'Alice', age: 30}), |
| 144 | + (:Person {name: 'Bob', age: 25}), |
| 145 | + (:Person {name: 'Carol', age: 28}), |
| 146 | + (:Person {name: 'Alice'})-[:KNOWS {since: 2020}]->(:Person {name: 'Bob'}), |
| 147 | + (:Person {name: 'Bob'})-[:KNOWS {since: 2022}]->(:Person {name: 'Carol'}) |
| 148 | +""") |
| 149 | + |
| 150 | +# Query: find friends of Alice |
| 151 | +result = g.query(""" |
| 152 | + MATCH (alice:Person {name: 'Alice'})-[:KNOWS]->(friend:Person) |
| 153 | + RETURN friend.name AS name, friend.age AS age |
| 154 | + ORDER BY age |
| 155 | +""") |
| 156 | + |
| 157 | +for row in result.result_set: |
| 158 | + print(f"Friend: {row[0]}, Age: {row[1]}") |
| 159 | +# Friend: Bob, Age: 25 |
| 160 | +``` |
| 161 | + |
| 162 | +--- |
| 163 | + |
| 164 | +## Configuration Reference |
| 165 | + |
| 166 | +| Environment Variable | Default | Description | |
| 167 | +|---|---|---| |
| 168 | +| `ESEILANE_LOGLEVEL` | `notice` | Log level: debug, verbose, notice, warning | |
| 169 | +| `ESEILANE_MAX_MEMORY` | `0` (unlimited) | Max memory (e.g. `2gb`, `512mb`) | |
| 170 | +| `ESEILANE_REQUIREPASS` | *(none)* | Authentication password | |
| 171 | +| `ESEILANE_BIND` | `0.0.0.0` | Bind address | |
| 172 | +| `ESEILANE_PORT` | `6379` | Client connection port | |
| 173 | +| `ESEILANE_SAVE` | `3600 1` | RDB snapshot policy | |
| 174 | +| `ESEILANE_APPENDONLY` | `yes` | Enable AOF persistence | |
| 175 | +| `ESEILANE_TLS_PORT` | *(none)* | TLS port (if TLS enabled) | |
| 176 | + |
| 177 | +--- |
| 178 | + |
| 179 | +## Next Steps |
| 180 | + |
| 181 | +- [API Reference](../api-reference) — Explore all REST endpoints |
| 182 | +- [Python SDK](../sdk/python) — Full Python client reference |
| 183 | +- [GraphRAG Guide](../graphrag) — Build your first GraphRAG pipeline |
| 184 | +- [Deployment](../deployment) — Deploy to production |
0 commit comments