elastro-client 1.3.30__tar.gz → 1.3.32__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {elastro_client-1.3.30/elastro_client.egg-info → elastro_client-1.3.32}/PKG-INFO +1 -1
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/__init__.py +1 -1
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/config.py +8 -1
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/ilm.py +18 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/index.py +16 -2
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/ml.py +13 -1
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/painless_commands.py +20 -3
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/snapshot.py +9 -1
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/template.py +17 -1
- {elastro_client-1.3.30 → elastro_client-1.3.32/elastro_client.egg-info}/PKG-INFO +1 -1
- {elastro_client-1.3.30 → elastro_client-1.3.32}/pyproject.toml +1 -1
- {elastro_client-1.3.30 → elastro_client-1.3.32}/.coveragerc +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/LICENSE +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/MANIFEST.in +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/README.md +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/docs/advanced_features.md +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/docs/api_reference.md +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/docs/cli_usage.md +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/docs/commands_reference.md +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/docs/getting_started.md +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/docs/roadmap.md +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/docs/troubleshooting.md +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/advanced/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/advanced/aggregations.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/advanced/query_builder.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/advanced/scroll.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/art.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/cli.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/cluster.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/datastream.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/document.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/gui.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/index_recipes.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/ingest.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/script.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/security.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/tasks.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/commands/utils.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/completion.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/cli/output.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/config/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/config/defaults.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/config/loader.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/core/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/core/client.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/core/datastream.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/core/document.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/core/document_bulk.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/core/errors.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/core/ilm.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/core/index.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/core/logger.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/core/query_builder.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/core/snapshot.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/core/validation.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/gui/assets/index-CeUjjtn-.css +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/gui/assets/index-DNdGuJvV.js +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/gui/elastro.svg +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/gui/favicon.ico +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/gui/index.html +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/gui/vite.svg +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/py.typed +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/server.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/utils/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/utils/aliases.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/utils/health.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/utils/snapshots.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro/utils/templates.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro_client.egg-info/SOURCES.txt +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro_client.egg-info/dependency_links.txt +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro_client.egg-info/entry_points.txt +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro_client.egg-info/requires.txt +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/elastro_client.egg-info/top_level.txt +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/examples/client.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/examples/config_usage.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/examples/datastreams.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/examples/debug_connection.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/examples/document_operations.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/examples/index_management.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/examples/search.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/pytest.ini +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/requirements.txt +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/setup.cfg +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/setup.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/conftest.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/fixtures/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/fixtures/datastream_fixtures.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/fixtures/document_fixtures.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/fixtures/index_fixtures.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_aggregations_integration.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_client_integration.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_datastream_integration.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_docs_quickstart.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_document_integration.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_index_integration.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_query_builder_integration.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_scroll_integration.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_workflow_integration.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/manual/test_es.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/advanced/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/advanced/test_aggregations.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/advanced/test_query_builder.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/advanced/test_scroll.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/config/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/config/test_defaults.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/config/test_loader.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/core/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/core/test_client.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/core/test_datastream.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/core/test_document.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/core/test_document_bulk.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/core/test_errors.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/core/test_index.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/core/test_validation.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/utils/__init__.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/utils/test_aliases.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/utils/test_health.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/utils/test_snapshots.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/unit/utils/test_templates.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/verify_api_actions.py +0 -0
- {elastro_client-1.3.30 → elastro_client-1.3.32}/tests/verify_cli_e2e.py +0 -0
|
@@ -220,12 +220,19 @@ def run_config_wizard() -> Dict[str, Any]:
|
|
|
220
220
|
)
|
|
221
221
|
|
|
222
222
|
# 1. Hosts
|
|
223
|
+
console.print("\n[bold]1. Cluster Connection:[/bold]")
|
|
224
|
+
console.print(
|
|
225
|
+
"Provide the HTTP(S) address of your Elasticsearch cluster. Multiple coordinates can be provided (comma-separated) for round-robin load balancing."
|
|
226
|
+
)
|
|
223
227
|
default_host = "http://localhost:9200"
|
|
224
228
|
hosts_input = Prompt.ask("🔌 [bold]Elasticsearch Host[/]", default=default_host)
|
|
225
229
|
hosts = [h.strip() for h in hosts_input.split(",")]
|
|
226
230
|
|
|
227
231
|
# 2. Authentication
|
|
228
|
-
console.print("\n🔑 [bold]Authentication[/]")
|
|
232
|
+
console.print("\n🔑 [bold]2. Authentication[/]")
|
|
233
|
+
console.print(
|
|
234
|
+
"Select how Elastro should authenticate with the cluster. API Keys are recommended for production environments."
|
|
235
|
+
)
|
|
229
236
|
auth_type = Prompt.ask(
|
|
230
237
|
" Method", choices=["basic", "api_key", "none"], default="none"
|
|
231
238
|
)
|
|
@@ -165,6 +165,24 @@ def run_ilm_wizard(name: str) -> Optional[Dict[str, Any]]:
|
|
|
165
165
|
)
|
|
166
166
|
)
|
|
167
167
|
|
|
168
|
+
console.print("\n[bold]Phase Configuration:[/bold]")
|
|
169
|
+
console.print(
|
|
170
|
+
"ILM policies automate data tiering. You configure conditions (like index age or size) that dictate when an index moves to the next phase."
|
|
171
|
+
)
|
|
172
|
+
console.print(
|
|
173
|
+
" [bold red]HOT[/] - Actively queried and written to. Uses premium fast SSD nodes."
|
|
174
|
+
)
|
|
175
|
+
console.print(
|
|
176
|
+
" [bold yellow]WARM[/] - Rarely written to, but frequently queried. Uses standard nodes."
|
|
177
|
+
)
|
|
178
|
+
console.print(
|
|
179
|
+
" [bold cyan]COLD[/] - Read-only data. Uses dense, high-capacity nodes."
|
|
180
|
+
)
|
|
181
|
+
console.print(
|
|
182
|
+
" [bold grey]DELETE[/] - End of lifecycle. Data is permanently purged from the cluster."
|
|
183
|
+
)
|
|
184
|
+
console.print()
|
|
185
|
+
|
|
168
186
|
phases = {}
|
|
169
187
|
|
|
170
188
|
# --- HOT PHASE ---
|
|
@@ -421,6 +421,10 @@ def index_wizard(client: ElasticsearchClient) -> None:
|
|
|
421
421
|
console.print(f"[italic]{recipe.description}[/]\n")
|
|
422
422
|
|
|
423
423
|
# 3. Prompt for Basic Info
|
|
424
|
+
console.print("\n[bold]1. Basic Information:[/bold]")
|
|
425
|
+
console.print(
|
|
426
|
+
"Indices define where your documents live. Using descriptive, lowercase names (e.g., 'logs-api-prod') is standard practice."
|
|
427
|
+
)
|
|
424
428
|
index_name = Prompt.ask("Enter index name", default="my-new-index")
|
|
425
429
|
|
|
426
430
|
# 4. Prepare Configuration
|
|
@@ -428,6 +432,10 @@ def index_wizard(client: ElasticsearchClient) -> None:
|
|
|
428
432
|
mappings = recipe.get_mappings()
|
|
429
433
|
|
|
430
434
|
# Allow simple overrides for shards/replicas
|
|
435
|
+
console.print("\n[bold]2. Infrastructure Settings:[/bold]")
|
|
436
|
+
console.print(
|
|
437
|
+
"Primary shards dictate write parallelism. Replicas dictate read concurrency and High Availability (HA) resilience."
|
|
438
|
+
)
|
|
431
439
|
if Confirm.ask("Customize shards/replicas?", default=False):
|
|
432
440
|
settings["number_of_shards"] = IntPrompt.ask(
|
|
433
441
|
"Primary Shards", default=settings.get("number_of_shards", 1)
|
|
@@ -440,7 +448,10 @@ def index_wizard(client: ElasticsearchClient) -> None:
|
|
|
440
448
|
|
|
441
449
|
# A. Rename Default Fields
|
|
442
450
|
if recipe.customizable_fields:
|
|
443
|
-
console.print("\n[bold]Customize Default Fields:[/]")
|
|
451
|
+
console.print("\n[bold]3. Customize Default Fields:[/]")
|
|
452
|
+
console.print(
|
|
453
|
+
"This recipe provides standard baseline fields. You may rename them to perfectly match your data model's keys."
|
|
454
|
+
)
|
|
444
455
|
for field in recipe.customizable_fields:
|
|
445
456
|
if field in mappings["properties"]:
|
|
446
457
|
new_name = Prompt.ask(f"Rename field '{field}'?", default=field)
|
|
@@ -448,7 +459,10 @@ def index_wizard(client: ElasticsearchClient) -> None:
|
|
|
448
459
|
mappings["properties"][new_name] = mappings["properties"].pop(field)
|
|
449
460
|
|
|
450
461
|
# B. Add New Fields
|
|
451
|
-
console.print("\n[bold]Add Custom Fields:[/]")
|
|
462
|
+
console.print("\n[bold]4. Add Custom Fields:[/]")
|
|
463
|
+
console.print(
|
|
464
|
+
"Explicitly defining fields ensures Elasticsearch indexes data exactly how your application expects it (e.g., 'keyword' for exact matching, 'text' for full-text search)."
|
|
465
|
+
)
|
|
452
466
|
valid_types = [
|
|
453
467
|
"text",
|
|
454
468
|
"keyword",
|
|
@@ -34,6 +34,10 @@ def init_job(client: ElasticsearchClient) -> None:
|
|
|
34
34
|
"This wizard will configure a basic Single Metric anomaly detection job.\n"
|
|
35
35
|
)
|
|
36
36
|
|
|
37
|
+
console.print("[bold]1. Job Definition:[/bold]")
|
|
38
|
+
console.print(
|
|
39
|
+
"The Job ID must be unique across the cluster. The Index Pattern defines what data the ML node will process."
|
|
40
|
+
)
|
|
37
41
|
# 1. Job ID
|
|
38
42
|
job_id = Prompt.ask("Enter a new [bold]Job ID[/bold]", default="anomaly-job-01")
|
|
39
43
|
|
|
@@ -43,14 +47,22 @@ def init_job(client: ElasticsearchClient) -> None:
|
|
|
43
47
|
)
|
|
44
48
|
|
|
45
49
|
# 3. Time Field
|
|
50
|
+
console.print("\n[bold]2. Analysis Configuration:[/bold]")
|
|
51
|
+
console.print(
|
|
52
|
+
"The time field is required to build time-series buckets. The metric field is the actual numerical value being analyzed (e.g., CPU %, response_time_ms)."
|
|
53
|
+
)
|
|
46
54
|
time_field = Prompt.ask("Primary [bold]Time Field[/bold]", default="@timestamp")
|
|
47
55
|
|
|
48
56
|
# 4. Metric Field
|
|
49
57
|
metric_field = Prompt.ask("Metric Field to Analyze", default="response.time")
|
|
50
58
|
|
|
51
59
|
# 5. Function Type
|
|
60
|
+
console.print("\n[bold]3. Analysis Algorithm:[/bold]")
|
|
61
|
+
console.print(
|
|
62
|
+
"The algorithm dictates what mathematical outlier the ML job hunts for."
|
|
63
|
+
)
|
|
52
64
|
function_idx = Prompt.ask(
|
|
53
|
-
"
|
|
65
|
+
"Select Analysis Function:\n 1. High Mean (Detect Spikes)\n 2. Low Mean (Detect Drops)\n 3. Count (Detect Log Volume Anomalies)\nChoice",
|
|
54
66
|
choices=["1", "2", "3"],
|
|
55
67
|
default="1",
|
|
56
68
|
)
|
|
@@ -65,21 +65,38 @@ def scaffold() -> None:
|
|
|
65
65
|
"Select the Script Context", choices=["1", "2", "3", "4"], default="1"
|
|
66
66
|
)
|
|
67
67
|
|
|
68
|
+
console.print("\n[bold]Output Configuration:[/bold]")
|
|
69
|
+
console.print(
|
|
70
|
+
"Elastro will generate a local file containing your scaffolded script."
|
|
71
|
+
)
|
|
72
|
+
console.print(
|
|
73
|
+
"This file will automatically be saved with a [cyan].painless[/cyan] extension."
|
|
74
|
+
)
|
|
68
75
|
filename = rich.prompt.Prompt.ask(
|
|
69
|
-
"
|
|
76
|
+
"What should the file be named? (e.g., entering 'my_script' creates 'my_script.painless')",
|
|
77
|
+
default="script",
|
|
70
78
|
)
|
|
71
79
|
filename = f"{filename}.painless"
|
|
72
80
|
|
|
73
81
|
if os.path.exists(filename):
|
|
74
82
|
overwrite = rich.prompt.Confirm.ask(
|
|
75
|
-
f"[yellow]File {filename} exists. Overwrite?[/yellow]",
|
|
83
|
+
f"[yellow]File {filename} already exists in this directory. Overwrite it?[/yellow]",
|
|
84
|
+
default=False,
|
|
76
85
|
)
|
|
77
86
|
if not overwrite:
|
|
78
87
|
console.print("[red]Aborted.[/red]")
|
|
79
88
|
return
|
|
80
89
|
|
|
90
|
+
console.print("\n[bold]Robust Null Checking (Optional):[/bold]")
|
|
91
|
+
console.print(
|
|
92
|
+
"Painless scripts throw NullPointerExceptions if you access fields that don't exist in a document."
|
|
93
|
+
)
|
|
94
|
+
console.print(
|
|
95
|
+
"Elastro can automatically generate safe null-check boilerplate for your expected inputs."
|
|
96
|
+
)
|
|
81
97
|
expected_inputs = rich.prompt.Prompt.ask(
|
|
82
|
-
"
|
|
98
|
+
"Which input fields do you plan to use? (comma-separated, e.g., 'host.name, @timestamp', or press Enter to skip)",
|
|
99
|
+
default="",
|
|
83
100
|
)
|
|
84
101
|
fields = [f.strip() for f in expected_inputs.split(",")] if expected_inputs else []
|
|
85
102
|
|
|
@@ -271,6 +271,10 @@ def restore_snapshot(
|
|
|
271
271
|
if not repository or not snapshot:
|
|
272
272
|
console.print(Panel("🧙 [bold blue]Restore Wizard[/]", border_style="blue"))
|
|
273
273
|
|
|
274
|
+
console.print("\n[bold]Repository Configuration:[/bold]")
|
|
275
|
+
console.print(
|
|
276
|
+
"Snapshots are immutable point-in-time backups stored in external Repositories (like AWS S3 or a shared FileSystem)."
|
|
277
|
+
)
|
|
274
278
|
# 1. Select Repository
|
|
275
279
|
try:
|
|
276
280
|
repos_dict = manager.list_repositories()
|
|
@@ -321,7 +325,11 @@ def restore_snapshot(
|
|
|
321
325
|
snapshot = snaps[snap_idx]["snapshot"]
|
|
322
326
|
|
|
323
327
|
# 3. Restore Options
|
|
324
|
-
|
|
328
|
+
console.print("\n[bold]Restore Options:[/bold]")
|
|
329
|
+
console.print(
|
|
330
|
+
"You can surgically restore specific indices or the entire snapshot. Renaming indices during restore (e.g. prefixing with 'restored_') prevents accidentally overwriting live production data."
|
|
331
|
+
)
|
|
332
|
+
indices = Prompt.ask("Indices to restore", default="_all")
|
|
325
333
|
rename_pattern = None
|
|
326
334
|
rename_replacement = None
|
|
327
335
|
|
|
@@ -188,9 +188,17 @@ def wizard(client: ElasticsearchClient) -> None:
|
|
|
188
188
|
|
|
189
189
|
console.print(Panel.fit("🧙♂️ Index Architect Wizard", style="bold blue"))
|
|
190
190
|
|
|
191
|
+
console.print("\n[bold]Template Type:[/bold]")
|
|
192
|
+
console.print(
|
|
193
|
+
" [bold cyan]Component Templates[/] are Lego blocks. They define reusable mappings or settings that can be attached to multiple templates."
|
|
194
|
+
)
|
|
195
|
+
console.print(
|
|
196
|
+
" [bold cyan]Index Templates[/] are blueprints. They dictate exactly how new indices should be created based on an index pattern (e.g., 'logs-*')."
|
|
197
|
+
)
|
|
198
|
+
|
|
191
199
|
# 1. Choose Type
|
|
192
200
|
template_type = Prompt.ask(
|
|
193
|
-
"
|
|
201
|
+
"\nWhat do you want to build?",
|
|
194
202
|
choices=["component", "index"],
|
|
195
203
|
default="component",
|
|
196
204
|
)
|
|
@@ -202,6 +210,10 @@ def wizard(client: ElasticsearchClient) -> None:
|
|
|
202
210
|
aliases: Dict[str, Any] = {}
|
|
203
211
|
|
|
204
212
|
# 2. Settings Wizard
|
|
213
|
+
console.print("\n[bold]Settings (Optional):[/bold]")
|
|
214
|
+
console.print(
|
|
215
|
+
"Settings configure the physical infrastructure of the backing indices, such as shard allocation and compression codecs."
|
|
216
|
+
)
|
|
205
217
|
if Confirm.ask("Configure Settings? (shards, replicas, codec)"):
|
|
206
218
|
shards = IntPrompt.ask("Number of shards", default=1)
|
|
207
219
|
replicas = IntPrompt.ask("Number of replicas", default=1)
|
|
@@ -217,6 +229,10 @@ def wizard(client: ElasticsearchClient) -> None:
|
|
|
217
229
|
settings["codec"] = codec
|
|
218
230
|
|
|
219
231
|
# 3. Mappings Wizard
|
|
232
|
+
console.print("\n[bold]Mappings (Optional):[/bold]")
|
|
233
|
+
console.print(
|
|
234
|
+
"Mappings enforce a strict data schema, converting arbitrary JSON into strongly-typed columnar formats optimized for aggregations and search."
|
|
235
|
+
)
|
|
220
236
|
if Confirm.ask("Configure Mappings?"):
|
|
221
237
|
while True:
|
|
222
238
|
if not Confirm.ask("Add a field?"):
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "elastro-client"
|
|
7
|
-
version = "1.3.
|
|
7
|
+
version = "1.3.32"
|
|
8
8
|
description = "A comprehensive Python library for Elasticsearch management with both programmatic and CLI interfaces"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9,<3.14"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{elastro_client-1.3.30 → elastro_client-1.3.32}/elastro_client.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_aggregations_integration.py
RENAMED
|
File without changes
|
{elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_client_integration.py
RENAMED
|
File without changes
|
{elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_datastream_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
{elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_document_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
{elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_query_builder_integration.py
RENAMED
|
File without changes
|
{elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_scroll_integration.py
RENAMED
|
File without changes
|
{elastro_client-1.3.30 → elastro_client-1.3.32}/tests/integration/test_workflow_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|