pltr-cli 0.1.2__py3-none-any.whl → 0.2.0__py3-none-any.whl
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.
- pltr/__main__.py +28 -0
- pltr/cli.py +19 -1
- pltr/commands/admin.py +530 -0
- pltr/commands/completion.py +383 -0
- pltr/commands/dataset.py +20 -3
- pltr/commands/ontology.py +508 -0
- pltr/commands/shell.py +126 -0
- pltr/commands/sql.py +358 -0
- pltr/commands/verify.py +2 -1
- pltr/services/__init__.py +4 -0
- pltr/services/admin.py +314 -0
- pltr/services/ontology.py +443 -0
- pltr/services/sql.py +340 -0
- pltr/utils/completion.py +170 -0
- pltr/utils/formatting.py +208 -0
- pltr/utils/progress.py +1 -1
- pltr_cli-0.2.0.dist-info/METADATA +280 -0
- pltr_cli-0.2.0.dist-info/RECORD +38 -0
- pltr_cli-0.1.2.dist-info/METADATA +0 -203
- pltr_cli-0.1.2.dist-info/RECORD +0 -28
- {pltr_cli-0.1.2.dist-info → pltr_cli-0.2.0.dist-info}/WHEEL +0 -0
- {pltr_cli-0.1.2.dist-info → pltr_cli-0.2.0.dist-info}/entry_points.txt +0 -0
- {pltr_cli-0.1.2.dist-info → pltr_cli-0.2.0.dist-info}/licenses/LICENSE +0 -0
pltr/utils/formatting.py
CHANGED
|
@@ -329,3 +329,211 @@ class OutputFormatter:
|
|
|
329
329
|
def print_info(self, message: str):
|
|
330
330
|
"""Print info message with formatting."""
|
|
331
331
|
self.console.print(f"ℹ️ {message}", style="blue")
|
|
332
|
+
|
|
333
|
+
def format_table(
|
|
334
|
+
self,
|
|
335
|
+
data: List[Dict[str, Any]],
|
|
336
|
+
columns: Optional[List[str]] = None,
|
|
337
|
+
format: str = "table",
|
|
338
|
+
output: Optional[str] = None,
|
|
339
|
+
) -> Optional[str]:
|
|
340
|
+
"""
|
|
341
|
+
Format data as a table with specified columns.
|
|
342
|
+
|
|
343
|
+
Args:
|
|
344
|
+
data: List of dictionaries to format
|
|
345
|
+
columns: List of column names to display (uses all if None)
|
|
346
|
+
format: Output format ('table', 'json', 'csv')
|
|
347
|
+
output: Optional output file path
|
|
348
|
+
|
|
349
|
+
Returns:
|
|
350
|
+
Formatted string if no output file specified
|
|
351
|
+
"""
|
|
352
|
+
if columns:
|
|
353
|
+
# Filter data to only include specified columns
|
|
354
|
+
filtered_data = []
|
|
355
|
+
for item in data:
|
|
356
|
+
filtered_item = {col: item.get(col) for col in columns}
|
|
357
|
+
filtered_data.append(filtered_item)
|
|
358
|
+
data = filtered_data
|
|
359
|
+
|
|
360
|
+
return self.format_output(data, format, output)
|
|
361
|
+
|
|
362
|
+
def format_list(
|
|
363
|
+
self,
|
|
364
|
+
data: List[Any],
|
|
365
|
+
format: str = "table",
|
|
366
|
+
output: Optional[str] = None,
|
|
367
|
+
) -> Optional[str]:
|
|
368
|
+
"""
|
|
369
|
+
Format a list of items.
|
|
370
|
+
|
|
371
|
+
Args:
|
|
372
|
+
data: List of items to format
|
|
373
|
+
format: Output format ('table', 'json', 'csv')
|
|
374
|
+
output: Optional output file path
|
|
375
|
+
|
|
376
|
+
Returns:
|
|
377
|
+
Formatted string if no output file specified
|
|
378
|
+
"""
|
|
379
|
+
# Convert list items to dicts if needed
|
|
380
|
+
if data and not isinstance(data[0], dict):
|
|
381
|
+
data = [{"value": item} for item in data]
|
|
382
|
+
|
|
383
|
+
return self.format_output(data, format, output)
|
|
384
|
+
|
|
385
|
+
def format_dict(
|
|
386
|
+
self,
|
|
387
|
+
data: Dict[str, Any],
|
|
388
|
+
format: str = "table",
|
|
389
|
+
output: Optional[str] = None,
|
|
390
|
+
) -> Optional[str]:
|
|
391
|
+
"""
|
|
392
|
+
Format a dictionary for display.
|
|
393
|
+
|
|
394
|
+
Args:
|
|
395
|
+
data: Dictionary to format
|
|
396
|
+
format: Output format ('table', 'json', 'csv')
|
|
397
|
+
output: Optional output file path
|
|
398
|
+
|
|
399
|
+
Returns:
|
|
400
|
+
Formatted string if no output file specified
|
|
401
|
+
"""
|
|
402
|
+
if format == "table":
|
|
403
|
+
# Convert to key-value pairs for table display
|
|
404
|
+
table_data = [{"Property": k, "Value": str(v)} for k, v in data.items()]
|
|
405
|
+
return self.format_output(table_data, format, output)
|
|
406
|
+
else:
|
|
407
|
+
return self.format_output(data, format, output)
|
|
408
|
+
|
|
409
|
+
def display(self, data: Any, format_type: str = "table") -> None:
|
|
410
|
+
"""
|
|
411
|
+
Display data using the appropriate formatter.
|
|
412
|
+
|
|
413
|
+
Args:
|
|
414
|
+
data: Data to display
|
|
415
|
+
format_type: Display format ('table', 'json', 'csv')
|
|
416
|
+
"""
|
|
417
|
+
if isinstance(data, list):
|
|
418
|
+
if data and isinstance(data[0], dict):
|
|
419
|
+
self.format_output(data, format_type)
|
|
420
|
+
else:
|
|
421
|
+
self.format_list(data, format_type)
|
|
422
|
+
elif isinstance(data, dict):
|
|
423
|
+
self.format_dict(data, format_type)
|
|
424
|
+
else:
|
|
425
|
+
# For simple values, just print them
|
|
426
|
+
if format_type == "json":
|
|
427
|
+
rich_print(json.dumps(data, indent=2, default=str))
|
|
428
|
+
else:
|
|
429
|
+
rich_print(str(data))
|
|
430
|
+
|
|
431
|
+
def save_to_file(self, data: Any, file_path: Any, format_type: str) -> None:
|
|
432
|
+
"""
|
|
433
|
+
Save data to a file in the specified format.
|
|
434
|
+
|
|
435
|
+
Args:
|
|
436
|
+
data: Data to save
|
|
437
|
+
file_path: Path object or string for output file
|
|
438
|
+
format_type: File format ('table', 'json', 'csv')
|
|
439
|
+
"""
|
|
440
|
+
file_path_str = str(file_path)
|
|
441
|
+
|
|
442
|
+
if isinstance(data, list):
|
|
443
|
+
if data and isinstance(data[0], dict):
|
|
444
|
+
self.format_output(data, format_type, file_path_str)
|
|
445
|
+
else:
|
|
446
|
+
self.format_list(data, format_type, file_path_str)
|
|
447
|
+
elif isinstance(data, dict):
|
|
448
|
+
self.format_dict(data, format_type, file_path_str)
|
|
449
|
+
else:
|
|
450
|
+
# For simple values, save as text
|
|
451
|
+
with open(file_path_str, "w") as f:
|
|
452
|
+
if format_type == "json":
|
|
453
|
+
json.dump(data, f, indent=2, default=str)
|
|
454
|
+
else:
|
|
455
|
+
f.write(str(data))
|
|
456
|
+
|
|
457
|
+
def format_sql_results(
|
|
458
|
+
self,
|
|
459
|
+
results: Any,
|
|
460
|
+
format_type: str = "table",
|
|
461
|
+
output_file: Optional[str] = None,
|
|
462
|
+
) -> Optional[str]:
|
|
463
|
+
"""
|
|
464
|
+
Format SQL query results for display.
|
|
465
|
+
|
|
466
|
+
Args:
|
|
467
|
+
results: Query results (could be dict, list, or other types)
|
|
468
|
+
format_type: Output format ('table', 'json', 'csv')
|
|
469
|
+
output_file: Optional output file path
|
|
470
|
+
|
|
471
|
+
Returns:
|
|
472
|
+
Formatted string if no output file specified
|
|
473
|
+
"""
|
|
474
|
+
# Handle different types of SQL results
|
|
475
|
+
if isinstance(results, dict):
|
|
476
|
+
# Check for special result types
|
|
477
|
+
if "text" in results:
|
|
478
|
+
# Text result - display as-is
|
|
479
|
+
text_data = results["text"]
|
|
480
|
+
if output_file:
|
|
481
|
+
with open(output_file, "w") as f:
|
|
482
|
+
f.write(text_data)
|
|
483
|
+
return None
|
|
484
|
+
else:
|
|
485
|
+
rich_print(text_data)
|
|
486
|
+
return text_data
|
|
487
|
+
elif "type" in results and results["type"] == "binary":
|
|
488
|
+
# Binary result - show metadata
|
|
489
|
+
return self.format_output(results, format_type, output_file)
|
|
490
|
+
elif "results" in results:
|
|
491
|
+
# Results array
|
|
492
|
+
return self.format_output(results["results"], format_type, output_file)
|
|
493
|
+
elif "result" in results:
|
|
494
|
+
# Single result
|
|
495
|
+
single_result = results["result"]
|
|
496
|
+
if isinstance(single_result, (dict, list)):
|
|
497
|
+
return self.format_output(single_result, format_type, output_file)
|
|
498
|
+
else:
|
|
499
|
+
# Simple value
|
|
500
|
+
display_data = [{"Result": single_result}]
|
|
501
|
+
return self.format_output(display_data, format_type, output_file)
|
|
502
|
+
else:
|
|
503
|
+
# Regular dictionary
|
|
504
|
+
return self.format_dict(results, format_type, output_file)
|
|
505
|
+
elif isinstance(results, list):
|
|
506
|
+
# List of results
|
|
507
|
+
return self.format_output(results, format_type, output_file)
|
|
508
|
+
else:
|
|
509
|
+
# Simple value
|
|
510
|
+
display_data = [{"Result": results}]
|
|
511
|
+
return self.format_output(display_data, format_type, output_file)
|
|
512
|
+
|
|
513
|
+
def format_query_status(
|
|
514
|
+
self,
|
|
515
|
+
status_info: Dict[str, Any],
|
|
516
|
+
format_type: str = "table",
|
|
517
|
+
output_file: Optional[str] = None,
|
|
518
|
+
) -> Optional[str]:
|
|
519
|
+
"""
|
|
520
|
+
Format query status information.
|
|
521
|
+
|
|
522
|
+
Args:
|
|
523
|
+
status_info: Query status dictionary
|
|
524
|
+
format_type: Output format ('table', 'json', 'csv')
|
|
525
|
+
output_file: Optional output file path
|
|
526
|
+
|
|
527
|
+
Returns:
|
|
528
|
+
Formatted string if no output file specified
|
|
529
|
+
"""
|
|
530
|
+
if format_type == "table":
|
|
531
|
+
# Convert to key-value display for better readability
|
|
532
|
+
display_data = []
|
|
533
|
+
for key, value in status_info.items():
|
|
534
|
+
display_data.append(
|
|
535
|
+
{"Property": key.replace("_", " ").title(), "Value": str(value)}
|
|
536
|
+
)
|
|
537
|
+
return self.format_output(display_data, format_type, output_file)
|
|
538
|
+
else:
|
|
539
|
+
return self.format_output(status_info, format_type, output_file)
|
pltr/utils/progress.py
CHANGED
|
@@ -310,7 +310,7 @@ with tracker.track_upload("data.csv") as progress:
|
|
|
310
310
|
# ... upload chunk ...
|
|
311
311
|
progress(len(chunk))
|
|
312
312
|
|
|
313
|
-
# File download with progress
|
|
313
|
+
# File download with progress
|
|
314
314
|
tracker = with_download_progress()
|
|
315
315
|
with tracker.track_download("output.csv", total_size=1024000) as progress:
|
|
316
316
|
# Download file
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pltr-cli
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Command-line interface for Palantir Foundry APIs
|
|
5
|
+
Project-URL: Homepage, https://github.com/anjor/pltr-cli
|
|
6
|
+
Project-URL: Repository, https://github.com/anjor/pltr-cli
|
|
7
|
+
Project-URL: Issues, https://github.com/anjor/pltr-cli/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/anjor/pltr-cli/blob/main/CHANGELOG.md
|
|
9
|
+
Project-URL: Documentation, https://github.com/anjor/pltr-cli/blob/main/README.md
|
|
10
|
+
Author-email: anjor <anjor@umd.edu>
|
|
11
|
+
License: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: api,cli,data,foundry,ontology,palantir
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Intended Audience :: System Administrators
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
26
|
+
Classifier: Topic :: System :: Systems Administration
|
|
27
|
+
Classifier: Topic :: Utilities
|
|
28
|
+
Requires-Python: >=3.9
|
|
29
|
+
Requires-Dist: click-repl>=0.3.0
|
|
30
|
+
Requires-Dist: foundry-platform-sdk>=1.27.0
|
|
31
|
+
Requires-Dist: keyring>=25.6.0
|
|
32
|
+
Requires-Dist: python-dotenv>=1.1.1
|
|
33
|
+
Requires-Dist: requests>=2.32.4
|
|
34
|
+
Requires-Dist: rich>=14.1.0
|
|
35
|
+
Requires-Dist: typer>=0.16.0
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
# pltr-cli
|
|
39
|
+
|
|
40
|
+
A comprehensive command-line interface for Palantir Foundry APIs, providing 65+ commands for data analysis, ontology operations, SQL queries, and administrative tasks.
|
|
41
|
+
|
|
42
|
+
## Overview
|
|
43
|
+
|
|
44
|
+
`pltr-cli` provides a powerful and intuitive way to interact with Palantir Foundry from the command line. Built on top of the official `foundry-platform-sdk`, it offers comprehensive access to Foundry's capabilities with a focus on productivity and ease of use.
|
|
45
|
+
|
|
46
|
+
## ✨ Key Features
|
|
47
|
+
|
|
48
|
+
- 🔐 **Secure Authentication**: Token and OAuth2 support with encrypted credential storage
|
|
49
|
+
- 📊 **Dataset Operations**: Get dataset information and create new datasets (RID-based API)
|
|
50
|
+
- 🎯 **Comprehensive Ontology Access**: 13 commands for objects, actions, and queries
|
|
51
|
+
- 📝 **Full SQL Support**: Execute, submit, monitor, and export query results
|
|
52
|
+
- 👥 **Admin Operations**: User, group, role, and organization management (16 commands)
|
|
53
|
+
- 💻 **Interactive Shell**: REPL mode with tab completion and command history
|
|
54
|
+
- ⚡ **Shell Completion**: Auto-completion for bash, zsh, and fish
|
|
55
|
+
- 🎨 **Rich Output**: Beautiful terminal formatting with multiple export formats (table, JSON, CSV)
|
|
56
|
+
- 👤 **Multi-Profile Support**: Manage multiple Foundry environments seamlessly
|
|
57
|
+
|
|
58
|
+
## Installation
|
|
59
|
+
|
|
60
|
+
### Using pip
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install pltr-cli
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### From source
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Clone the repository
|
|
70
|
+
git clone https://github.com/anjor/pltr-cli.git
|
|
71
|
+
cd pltr-cli
|
|
72
|
+
|
|
73
|
+
# Install with uv
|
|
74
|
+
uv sync
|
|
75
|
+
|
|
76
|
+
# Run the CLI
|
|
77
|
+
uv run pltr --help
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 🚀 Quick Start
|
|
81
|
+
|
|
82
|
+
### 1. Configure Authentication
|
|
83
|
+
|
|
84
|
+
Set up your Foundry credentials:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pltr configure configure
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Follow the interactive prompts to enter:
|
|
91
|
+
- Foundry hostname (e.g., `foundry.company.com`)
|
|
92
|
+
- Authentication method (token or OAuth2)
|
|
93
|
+
- Your credentials
|
|
94
|
+
|
|
95
|
+
### 2. Verify Connection
|
|
96
|
+
|
|
97
|
+
Test your setup:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
pltr verify
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 3. Start Exploring
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Check current user
|
|
107
|
+
pltr admin user current
|
|
108
|
+
|
|
109
|
+
# List available ontologies
|
|
110
|
+
pltr ontology list
|
|
111
|
+
|
|
112
|
+
# Execute a simple SQL query
|
|
113
|
+
pltr sql execute "SELECT 1 as test"
|
|
114
|
+
|
|
115
|
+
# Start interactive mode for exploration
|
|
116
|
+
pltr shell
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 4. Enable Shell Completion
|
|
120
|
+
|
|
121
|
+
For the best experience:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
pltr completion install
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
📖 **Need more help?** See the **[Quick Start Guide](docs/user-guide/quick-start.md)** for detailed setup instructions.
|
|
128
|
+
|
|
129
|
+
## 📚 Documentation
|
|
130
|
+
|
|
131
|
+
pltr-cli provides comprehensive documentation to help you get the most out of the tool:
|
|
132
|
+
|
|
133
|
+
### 📖 User Guides
|
|
134
|
+
- **[Quick Start Guide](docs/user-guide/quick-start.md)** - Get up and running in 5 minutes
|
|
135
|
+
- **[Authentication Setup](docs/user-guide/authentication.md)** - Complete guide to token and OAuth2 setup
|
|
136
|
+
- **[Command Reference](docs/user-guide/commands.md)** - Complete reference for all 65+ commands
|
|
137
|
+
- **[Common Workflows](docs/user-guide/workflows.md)** - Real-world data analysis patterns
|
|
138
|
+
- **[Troubleshooting](docs/user-guide/troubleshooting.md)** - Solutions to common issues
|
|
139
|
+
|
|
140
|
+
### 🔧 Developer Resources
|
|
141
|
+
- **[API Wrapper Documentation](docs/api/wrapper.md)** - Architecture and extension guide
|
|
142
|
+
- **[Examples Gallery](docs/examples/gallery.md)** - Real-world use cases and automation scripts
|
|
143
|
+
|
|
144
|
+
### 🎯 Quick Command Overview
|
|
145
|
+
|
|
146
|
+
**Most Common Commands:**
|
|
147
|
+
```bash
|
|
148
|
+
# Authentication & Setup
|
|
149
|
+
pltr configure configure # Set up authentication
|
|
150
|
+
pltr verify # Test connection
|
|
151
|
+
|
|
152
|
+
# Data Analysis
|
|
153
|
+
pltr sql execute "SELECT * FROM table" # Run SQL queries
|
|
154
|
+
pltr ontology list # List ontologies
|
|
155
|
+
pltr dataset get <rid> # Get dataset info
|
|
156
|
+
|
|
157
|
+
# Administrative
|
|
158
|
+
pltr admin user current # Current user info
|
|
159
|
+
pltr admin user list # List users
|
|
160
|
+
|
|
161
|
+
# Interactive & Tools
|
|
162
|
+
pltr shell # Interactive mode
|
|
163
|
+
pltr completion install # Enable tab completion
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
💡 **Tip**: Use `pltr --help` or `pltr <command> --help` for detailed command help.
|
|
167
|
+
|
|
168
|
+
For the complete command reference with examples, see **[Command Reference](docs/user-guide/commands.md)**.
|
|
169
|
+
|
|
170
|
+
## ⚙️ Configuration
|
|
171
|
+
|
|
172
|
+
pltr-cli stores configuration securely using industry best practices:
|
|
173
|
+
|
|
174
|
+
- **Profile Configuration**: `~/.config/pltr/profiles.json`
|
|
175
|
+
- **Credentials**: Encrypted in system keyring (never stored in plain text)
|
|
176
|
+
- **Shell History**: `~/.config/pltr/repl_history` (for interactive mode)
|
|
177
|
+
|
|
178
|
+
### Environment Variables
|
|
179
|
+
|
|
180
|
+
For CI/CD and automation, use environment variables:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
# Token authentication
|
|
184
|
+
export FOUNDRY_TOKEN="your-api-token"
|
|
185
|
+
export FOUNDRY_HOST="foundry.company.com"
|
|
186
|
+
|
|
187
|
+
# OAuth2 authentication
|
|
188
|
+
export FOUNDRY_CLIENT_ID="your-client-id"
|
|
189
|
+
export FOUNDRY_CLIENT_SECRET="your-client-secret"
|
|
190
|
+
export FOUNDRY_HOST="foundry.company.com"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
See **[Authentication Setup](docs/user-guide/authentication.md)** for complete configuration options.
|
|
194
|
+
|
|
195
|
+
## 🔧 Development
|
|
196
|
+
|
|
197
|
+
### Prerequisites
|
|
198
|
+
|
|
199
|
+
- Python 3.9+
|
|
200
|
+
- [uv](https://github.com/astral-sh/uv) for dependency management
|
|
201
|
+
|
|
202
|
+
### Quick Development Setup
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# Clone the repository
|
|
206
|
+
git clone https://github.com/anjor/pltr-cli.git
|
|
207
|
+
cd pltr-cli
|
|
208
|
+
|
|
209
|
+
# Install dependencies and development tools
|
|
210
|
+
uv sync
|
|
211
|
+
|
|
212
|
+
# Install pre-commit hooks
|
|
213
|
+
uv run pre-commit install
|
|
214
|
+
|
|
215
|
+
# Run tests
|
|
216
|
+
uv run pytest
|
|
217
|
+
|
|
218
|
+
# Run linting and formatting
|
|
219
|
+
uv run ruff check src/
|
|
220
|
+
uv run ruff format src/
|
|
221
|
+
uv run mypy src/
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Project Architecture
|
|
225
|
+
|
|
226
|
+
pltr-cli uses a layered architecture:
|
|
227
|
+
|
|
228
|
+
- **CLI Layer** (Typer): Command-line interface and argument parsing
|
|
229
|
+
- **Command Layer**: Command implementations with validation
|
|
230
|
+
- **Service Layer**: Business logic and foundry-platform-sdk integration
|
|
231
|
+
- **Auth Layer**: Secure authentication and credential management
|
|
232
|
+
- **Utils Layer**: Formatting, progress, and helper functions
|
|
233
|
+
|
|
234
|
+
See **[API Wrapper Documentation](docs/api/wrapper.md)** for detailed architecture information and extension guides.
|
|
235
|
+
|
|
236
|
+
## 📊 Current Status
|
|
237
|
+
|
|
238
|
+
pltr-cli is **production-ready** with comprehensive features:
|
|
239
|
+
|
|
240
|
+
- ✅ **65+ Commands** across 8 command groups
|
|
241
|
+
- ✅ **273 Unit Tests** with 67% code coverage
|
|
242
|
+
- ✅ **Published on PyPI** with automated releases
|
|
243
|
+
- ✅ **Cross-Platform** support (Windows, macOS, Linux)
|
|
244
|
+
- ✅ **Comprehensive Documentation** (Quick start, guides, examples)
|
|
245
|
+
- ✅ **Interactive Shell** with tab completion and history
|
|
246
|
+
- ✅ **CI/CD Ready** with environment variable support
|
|
247
|
+
|
|
248
|
+
**Latest Release**: Available on [PyPI](https://pypi.org/project/pltr-cli/)
|
|
249
|
+
|
|
250
|
+
## 🤝 Contributing
|
|
251
|
+
|
|
252
|
+
Contributions are welcome! Whether you're fixing bugs, adding features, or improving documentation.
|
|
253
|
+
|
|
254
|
+
### Getting Started
|
|
255
|
+
|
|
256
|
+
1. Fork the repository
|
|
257
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
258
|
+
3. Make your changes following the existing patterns
|
|
259
|
+
4. Add tests for new functionality
|
|
260
|
+
5. Run the test suite and linting
|
|
261
|
+
6. Commit using conventional commit format (`feat:`, `fix:`, `docs:`, etc.)
|
|
262
|
+
7. Push to your branch and create a Pull Request
|
|
263
|
+
|
|
264
|
+
### Development Guidelines
|
|
265
|
+
|
|
266
|
+
- Follow existing code patterns and architecture
|
|
267
|
+
- Add tests for new functionality
|
|
268
|
+
- Update documentation for user-facing changes
|
|
269
|
+
- Use type hints throughout
|
|
270
|
+
- Follow the existing error handling patterns
|
|
271
|
+
|
|
272
|
+
See **[API Wrapper Documentation](docs/api/wrapper.md)** for detailed development guidelines.
|
|
273
|
+
|
|
274
|
+
## License
|
|
275
|
+
|
|
276
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
277
|
+
|
|
278
|
+
## Acknowledgments
|
|
279
|
+
|
|
280
|
+
Built on top of the official [Palantir Foundry Platform Python SDK](https://github.com/palantir/foundry-platform-python).
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
pltr/__init__.py,sha256=kUR5RAFc7HCeiqdlX36dZOHkUI5wI6V_43RpEcD8b-0,22
|
|
2
|
+
pltr/__main__.py,sha256=PQIEddxNh3RNfW-pW0DFDgH2r_RptnKvgBcF9N4S5ik,742
|
|
3
|
+
pltr/cli.py,sha256=lJU7EMPjHkaehA32CJh3d6zUNF8iEGHqGX-K45ErqhU,1798
|
|
4
|
+
pltr/auth/__init__.py,sha256=G0V-Rh25FaJsH2nhrf146XQQG_ApdbyPJNuHJC25kgk,38
|
|
5
|
+
pltr/auth/base.py,sha256=LvmCwS7A0q0CITcym8udPzdACL52_jSGusiaeCTOaE8,981
|
|
6
|
+
pltr/auth/manager.py,sha256=ZqlGefr1a8MGx0g7kkQhpmiuVp0XTg3f43yMBCk-IRo,4305
|
|
7
|
+
pltr/auth/oauth.py,sha256=uTl5T3MSPlq8Jb3c45hib0vj-GQoyLxmS_NbnKez5dI,2844
|
|
8
|
+
pltr/auth/storage.py,sha256=C7I3-22CJcnrKGNdxk9nXjphsnqQVguT5gNfAnR78Ok,2474
|
|
9
|
+
pltr/auth/token.py,sha256=V48kxGn7CFbNGo17er5oI_ZA3xJ3iS9TsFjphZYqS2s,1925
|
|
10
|
+
pltr/commands/__init__.py,sha256=iOLJ1ql4mz-3-4nz21hAqjd-9IjpYAIxr9SJQKHNFxM,29
|
|
11
|
+
pltr/commands/admin.py,sha256=foscSO-QuH6uggUR5Rmv9pTqGjEXTUzpmMFj2-8hEJs,17065
|
|
12
|
+
pltr/commands/completion.py,sha256=YTxaRL4-rDs5n7aXf3ogFsxbHVJUBo_HiBbd0fbBPZ0,10870
|
|
13
|
+
pltr/commands/configure.py,sha256=oYj-VlOEj3MDwtB2RC4bYOYzI_sXTanPnz7y1GmMTqY,4800
|
|
14
|
+
pltr/commands/dataset.py,sha256=BCYfaBpLji5wasOiH_jOqO-JC9ScfJhodox9kl9W2Cw,3609
|
|
15
|
+
pltr/commands/ontology.py,sha256=3MwGsRgCzOsG5OTo0xu1iNa3tpZy64e_Fy3O8I45_5I,18587
|
|
16
|
+
pltr/commands/shell.py,sha256=QLF7TEGpaau9i0A9s3VjnegvtHde-SLRqI4suJFT4WI,3622
|
|
17
|
+
pltr/commands/sql.py,sha256=wol0Rlvi_RplCFbOg4LCa3VXsOqmRZdFFVv7V6iVkh8,12602
|
|
18
|
+
pltr/commands/verify.py,sha256=n8LWhbfGieYa-a5_l3MxqkYbdpyVf8-i0FQIL__AaPA,6650
|
|
19
|
+
pltr/config/__init__.py,sha256=Y6gARy5lUHy-OJaOUxtfXoeQVNZV5QHLl6uKHQ8tpTk,41
|
|
20
|
+
pltr/config/profiles.py,sha256=XMUIp6Ez5LNC6rGXZe2JLH7IKepXhARtuc8ASUA9FYA,3431
|
|
21
|
+
pltr/config/settings.py,sha256=bfIiosPqH_W73TOHS71DvgZdAHka4fJDopU1SvBRFuQ,2908
|
|
22
|
+
pltr/services/__init__.py,sha256=zQpgrqPdAkZI-nobi33mctU2-iGNgazzvjBVY8YRbSQ,101
|
|
23
|
+
pltr/services/admin.py,sha256=8FjExmDeIKeVqkAxM83SVvpp_pH9W-Q33cgVs6BHxLQ,9957
|
|
24
|
+
pltr/services/base.py,sha256=R2G781FI-sXtjUyLd91bVnmLb4cYZI3G8U5ndR9NLA4,1593
|
|
25
|
+
pltr/services/dataset.py,sha256=W3zoh-9YIJ6HBsDijejVEngKvpudFoZinYtHDmAXCOc,2785
|
|
26
|
+
pltr/services/dataset_full.py,sha256=FyMiwOSyX1cUrYXaK0T_1iq5G_X0e5iZTibJHuEmMeE,9869
|
|
27
|
+
pltr/services/dataset_v2.py,sha256=_uhcVJ91w_Y07glceqHceccAwPWr6q1TWSIqcP1FU8I,4259
|
|
28
|
+
pltr/services/ontology.py,sha256=d5MD0QeLfqs6W_XdteiK1da0yo_TKSftBmEOfPiLvf8,14755
|
|
29
|
+
pltr/services/sql.py,sha256=19cscjlzN8WE1s8_ctiRcrOvMzCfmWRj49vjJ8Gs5Q4,11286
|
|
30
|
+
pltr/utils/__init__.py,sha256=DF7TigL1XbKVGM5VjgU8_8AGIszofkdO80oCzLGGnTE,38
|
|
31
|
+
pltr/utils/completion.py,sha256=QdTkpT9MMs7C7keuJi79sMLerFX3CarpB4FrCKImjSc,4712
|
|
32
|
+
pltr/utils/formatting.py,sha256=Ptv7obiB7uWNf5YTiY4rUAKmabO5UGnwLocSfLplrZ0,18552
|
|
33
|
+
pltr/utils/progress.py,sha256=BKYbiLO61uhQbibabU7pxvvbAWMRLRmqk4pZldBQK_g,9053
|
|
34
|
+
pltr_cli-0.2.0.dist-info/METADATA,sha256=xk4xxyxl6TXmvgvrcfkR91E-TgnJiA4FdDY6ElW434Y,8864
|
|
35
|
+
pltr_cli-0.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
36
|
+
pltr_cli-0.2.0.dist-info/entry_points.txt,sha256=8tvEcW04kA_oAE2Dwwu-Og9efjl4ESJvs4AzlP2KBdQ,38
|
|
37
|
+
pltr_cli-0.2.0.dist-info/licenses/LICENSE,sha256=6VUFd_ytnOBD2O1tmkKrA-smigi9QEhYr_tge4h4z8Y,1070
|
|
38
|
+
pltr_cli-0.2.0.dist-info/RECORD,,
|