pltr-cli 0.5.0__tar.gz → 0.5.2__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.
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/PKG-INFO +101 -2
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/README.md +100 -1
- pltr_cli-0.5.2/RELEASE.md +163 -0
- pltr_cli-0.5.2/docs/examples/csv-upload.md +581 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/docs/examples/gallery.md +11 -0
- pltr_cli-0.5.2/docs/features/dataset-transactions.md +295 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/docs/user-guide/commands.md +720 -2
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/docs/user-guide/workflows.md +162 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/pyproject.toml +19 -6
- pltr_cli-0.5.2/scripts/release.py +371 -0
- pltr_cli-0.5.2/src/pltr/__init__.py +1 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/cli.py +14 -0
- pltr_cli-0.5.2/src/pltr/commands/connectivity.py +432 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/dataset.py +268 -0
- pltr_cli-0.5.2/src/pltr/commands/project.py +440 -0
- pltr_cli-0.5.2/src/pltr/commands/resource.py +499 -0
- pltr_cli-0.5.2/src/pltr/commands/resource_role.py +454 -0
- pltr_cli-0.5.2/src/pltr/commands/space.py +662 -0
- pltr_cli-0.5.2/src/pltr/services/connectivity.py +305 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/services/dataset.py +149 -15
- pltr_cli-0.5.2/src/pltr/services/project.py +232 -0
- pltr_cli-0.5.2/src/pltr/services/resource.py +289 -0
- pltr_cli-0.5.2/src/pltr/services/resource_role.py +321 -0
- pltr_cli-0.5.2/src/pltr/services/space.py +354 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/utils/formatting.py +108 -1
- pltr_cli-0.5.2/tests/test_commands/test_connectivity.py +457 -0
- pltr_cli-0.5.2/tests/test_services/test_connectivity.py +352 -0
- pltr_cli-0.5.2/tests/test_services/test_dataset_transactions.py +404 -0
- pltr_cli-0.5.2/tests/test_services/test_project.py +283 -0
- pltr_cli-0.5.2/tests/test_services/test_resource.py +303 -0
- pltr_cli-0.5.2/tests/test_services/test_resource_role.py +371 -0
- pltr_cli-0.5.2/tests/test_services/test_space.py +390 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/uv.lock +1 -1
- pltr_cli-0.5.0/scripts/release.py +0 -211
- pltr_cli-0.5.0/src/pltr/__init__.py +0 -1
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/.github/workflows/ci.yml +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/.github/workflows/publish.yml +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/.github/workflows/test-publish.yml +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/.gitignore +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/.pre-commit-config.yaml +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/CHANGELOG.md +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/CLAUDE.md +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/LICENSE +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/children.csv +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/docs/README.md +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/docs/api/wrapper.md +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/docs/user-guide/aliases.md +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/docs/user-guide/authentication.md +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/docs/user-guide/quick-start.md +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/docs/user-guide/troubleshooting.md +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/folder_info.json +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/folders.json +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/mypy.ini +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/__main__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/auth/__init__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/auth/base.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/auth/manager.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/auth/oauth.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/auth/storage.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/auth/token.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/__init__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/admin.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/alias.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/completion.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/configure.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/folder.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/mediasets.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/ontology.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/orchestration.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/shell.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/sql.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/commands/verify.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/config/__init__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/config/aliases.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/config/profiles.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/config/settings.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/services/__init__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/services/admin.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/services/base.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/services/folder.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/services/mediasets.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/services/ontology.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/services/orchestration.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/services/sql.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/utils/__init__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/utils/alias_resolver.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/utils/completion.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/src/pltr/utils/progress.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/__init__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/conftest.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/integration/README.md +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/integration/__init__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/integration/conftest.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/integration/test_auth_flow.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/integration/test_cli_integration.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/integration/test_data_workflows.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/integration/test_data_workflows_simple.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/integration/test_simple_integration.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_auth/__init__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_auth/test_base.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_auth/test_manager.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_auth/test_oauth.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_auth/test_storage.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_auth/test_token.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_commands/__init__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_commands/test_admin.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_commands/test_alias.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_commands/test_completion.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_commands/test_dataset.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_commands/test_folder.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_commands/test_ontology.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_commands/test_orchestration.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_commands/test_shell.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_commands/test_sql.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_commands/test_verify_simple.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_config/__init__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_config/test_aliases.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_config/test_profiles.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_config/test_settings.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_services/__init__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_services/test_admin.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_services/test_base.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_services/test_dataset.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_services/test_folder.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_services/test_ontology.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_services/test_orchestration.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_services/test_sql.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_utils/__init__.py +0 -0
- {pltr_cli-0.5.0 → pltr_cli-0.5.2}/tests/test_utils/test_alias_resolver.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pltr-cli
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: Command-line interface for Palantir Foundry APIs
|
|
5
5
|
Project-URL: Homepage, https://github.com/anjor/pltr-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/anjor/pltr-cli
|
|
@@ -47,7 +47,11 @@ A comprehensive command-line interface for Palantir Foundry APIs, providing 80+
|
|
|
47
47
|
|
|
48
48
|
- 🔐 **Secure Authentication**: Token and OAuth2 support with encrypted credential storage
|
|
49
49
|
- 📊 **Dataset Operations**: Complete dataset management with branches, files, transactions, and views (RID-based API)
|
|
50
|
-
- 📁 **
|
|
50
|
+
- 📁 **Filesystem Management**: Complete filesystem operations including folders, projects, spaces, and resources
|
|
51
|
+
- 🏗️ **Project Management**: Create, update, and manage Foundry projects within spaces
|
|
52
|
+
- 🌐 **Space Management**: Administer spaces, manage members, and control access
|
|
53
|
+
- 🔐 **Resource Permissions**: Grant, revoke, and manage role-based access to resources
|
|
54
|
+
- 🔗 **Connectivity & Imports**: Manage external connections and import files/tables from various data sources
|
|
51
55
|
- 🎯 **Comprehensive Ontology Access**: 13 commands for objects, actions, and queries
|
|
52
56
|
- 🏗️ **Orchestration Management**: Create, manage, and monitor builds, jobs, and schedules
|
|
53
57
|
- 🎬 **MediaSets Operations**: Upload, download, and manage media content with transaction support
|
|
@@ -121,6 +125,15 @@ pltr folder create "My Project"
|
|
|
121
125
|
# List root folder contents
|
|
122
126
|
pltr folder list ri.compass.main.folder.0
|
|
123
127
|
|
|
128
|
+
# Manage spaces and projects
|
|
129
|
+
pltr space list
|
|
130
|
+
pltr project create "My Project" ri.compass.main.space.123
|
|
131
|
+
pltr project list --space-rid ri.compass.main.space.123
|
|
132
|
+
|
|
133
|
+
# Manage resource permissions
|
|
134
|
+
pltr resource-role grant ri.compass.main.dataset.123 user123 User viewer
|
|
135
|
+
pltr resource-role list ri.compass.main.dataset.123
|
|
136
|
+
|
|
124
137
|
# Execute a simple SQL query
|
|
125
138
|
pltr sql execute "SELECT 1 as test"
|
|
126
139
|
|
|
@@ -129,6 +142,11 @@ pltr dataset get ri.foundry.main.dataset.abc123
|
|
|
129
142
|
pltr dataset branches list ri.foundry.main.dataset.abc123
|
|
130
143
|
pltr dataset files list ri.foundry.main.dataset.abc123
|
|
131
144
|
|
|
145
|
+
# Dataset transaction management
|
|
146
|
+
pltr dataset transactions start ri.foundry.main.dataset.abc123
|
|
147
|
+
pltr dataset transactions commit ri.foundry.main.dataset.abc123 <transaction-rid>
|
|
148
|
+
pltr dataset files upload myfile.csv ri.foundry.main.dataset.abc123 --transaction-rid <rid>
|
|
149
|
+
|
|
132
150
|
# Start interactive mode for exploration
|
|
133
151
|
pltr shell
|
|
134
152
|
```
|
|
@@ -171,6 +189,13 @@ pltr sql execute "SELECT * FROM table" # Run SQL queries
|
|
|
171
189
|
pltr ontology list # List ontologies
|
|
172
190
|
pltr dataset get <rid> # Get dataset info
|
|
173
191
|
|
|
192
|
+
# Filesystem Management
|
|
193
|
+
pltr folder create "My Project" # Create folders
|
|
194
|
+
pltr space create "Team Space" <org-rid> # Create spaces
|
|
195
|
+
pltr project create "New Project" <space-rid> # Create projects
|
|
196
|
+
pltr resource search "dataset name" # Search resources
|
|
197
|
+
pltr resource-role grant <resource-rid> <user-id> User viewer # Grant permissions
|
|
198
|
+
|
|
174
199
|
# Orchestration
|
|
175
200
|
pltr orchestration builds search # Search builds
|
|
176
201
|
pltr orchestration jobs get <job-rid> # Get job details
|
|
@@ -181,6 +206,12 @@ pltr media-sets get <set-rid> <item-rid> # Get media item info
|
|
|
181
206
|
pltr media-sets upload <set-rid> file.jpg "/path/file.jpg" <txn-id> # Upload media
|
|
182
207
|
pltr media-sets download <set-rid> <item-rid> output.jpg # Download media
|
|
183
208
|
|
|
209
|
+
# Connectivity & Data Imports
|
|
210
|
+
pltr connectivity connection list # List available connections
|
|
211
|
+
pltr connectivity connection get <conn-rid> # Get connection details
|
|
212
|
+
pltr connectivity import file <conn-rid> <source-path> <dataset-rid> --execute # Import file
|
|
213
|
+
pltr connectivity import table <conn-rid> <table-name> <dataset-rid> --execute # Import table
|
|
214
|
+
|
|
184
215
|
# Administrative
|
|
185
216
|
pltr admin user current # Current user info
|
|
186
217
|
pltr admin user list # List users
|
|
@@ -301,6 +332,74 @@ pltr media-sets download ri.mediasets.main.media-set.abc \
|
|
|
301
332
|
- Preview mode (`--preview`)
|
|
302
333
|
- Transaction-based upload workflow
|
|
303
334
|
|
|
335
|
+
### 📊 Dataset Transaction Management
|
|
336
|
+
|
|
337
|
+
pltr-cli provides comprehensive transaction management for datasets, allowing atomic operations with rollback capability:
|
|
338
|
+
|
|
339
|
+
#### Transaction Lifecycle
|
|
340
|
+
```bash
|
|
341
|
+
# Start a new transaction
|
|
342
|
+
pltr dataset transactions start ri.foundry.main.dataset.abc123 --branch master --type APPEND
|
|
343
|
+
# Returns transaction RID for use in subsequent operations
|
|
344
|
+
|
|
345
|
+
# Check transaction status
|
|
346
|
+
pltr dataset transactions status ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz
|
|
347
|
+
|
|
348
|
+
# List all transactions for a dataset
|
|
349
|
+
pltr dataset transactions list ri.foundry.main.dataset.abc123 --branch master
|
|
350
|
+
|
|
351
|
+
# Commit a transaction (make changes permanent)
|
|
352
|
+
pltr dataset transactions commit ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz
|
|
353
|
+
|
|
354
|
+
# Abort a transaction (discard all changes)
|
|
355
|
+
pltr dataset transactions abort ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz --yes
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
#### File Operations with Transactions
|
|
359
|
+
```bash
|
|
360
|
+
# Upload files within a transaction
|
|
361
|
+
pltr dataset files upload data.csv ri.foundry.main.dataset.abc123 \
|
|
362
|
+
--transaction-rid ri.foundry.main.transaction.xyz
|
|
363
|
+
|
|
364
|
+
# Multiple file uploads in same transaction
|
|
365
|
+
pltr dataset files upload file1.csv ri.foundry.main.dataset.abc123 \
|
|
366
|
+
--transaction-rid ri.foundry.main.transaction.xyz
|
|
367
|
+
pltr dataset files upload file2.csv ri.foundry.main.dataset.abc123 \
|
|
368
|
+
--transaction-rid ri.foundry.main.transaction.xyz
|
|
369
|
+
|
|
370
|
+
# Commit when ready
|
|
371
|
+
pltr dataset transactions commit ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
#### Transaction Types
|
|
375
|
+
- **APPEND**: Add new files to dataset
|
|
376
|
+
- **UPDATE**: Add new files and overwrite existing ones
|
|
377
|
+
- **SNAPSHOT**: Replace entire dataset with new files
|
|
378
|
+
- **DELETE**: Remove files from dataset
|
|
379
|
+
|
|
380
|
+
#### Example Workflow
|
|
381
|
+
```bash
|
|
382
|
+
# Start a transaction for bulk data update
|
|
383
|
+
TRANSACTION=$(pltr dataset transactions start ri.foundry.main.dataset.abc123 \
|
|
384
|
+
--type UPDATE --format json | jq -r '.transaction_rid')
|
|
385
|
+
|
|
386
|
+
# Upload multiple files
|
|
387
|
+
pltr dataset files upload data1.csv ri.foundry.main.dataset.abc123 --transaction-rid $TRANSACTION
|
|
388
|
+
pltr dataset files upload data2.csv ri.foundry.main.dataset.abc123 --transaction-rid $TRANSACTION
|
|
389
|
+
|
|
390
|
+
# Check status before committing
|
|
391
|
+
pltr dataset transactions status ri.foundry.main.dataset.abc123 $TRANSACTION
|
|
392
|
+
|
|
393
|
+
# Commit if everything looks good
|
|
394
|
+
pltr dataset transactions commit ri.foundry.main.dataset.abc123 $TRANSACTION
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
**Benefits:**
|
|
398
|
+
- **Data Integrity**: Atomic operations with rollback capability
|
|
399
|
+
- **Error Recovery**: Clean rollback from failed operations
|
|
400
|
+
- **Collaboration**: Better concurrent modification handling
|
|
401
|
+
- **Automation**: Reliable data pipeline operations
|
|
402
|
+
|
|
304
403
|
## ⚙️ Configuration
|
|
305
404
|
|
|
306
405
|
pltr-cli stores configuration securely using industry best practices:
|
|
@@ -10,7 +10,11 @@ A comprehensive command-line interface for Palantir Foundry APIs, providing 80+
|
|
|
10
10
|
|
|
11
11
|
- 🔐 **Secure Authentication**: Token and OAuth2 support with encrypted credential storage
|
|
12
12
|
- 📊 **Dataset Operations**: Complete dataset management with branches, files, transactions, and views (RID-based API)
|
|
13
|
-
- 📁 **
|
|
13
|
+
- 📁 **Filesystem Management**: Complete filesystem operations including folders, projects, spaces, and resources
|
|
14
|
+
- 🏗️ **Project Management**: Create, update, and manage Foundry projects within spaces
|
|
15
|
+
- 🌐 **Space Management**: Administer spaces, manage members, and control access
|
|
16
|
+
- 🔐 **Resource Permissions**: Grant, revoke, and manage role-based access to resources
|
|
17
|
+
- 🔗 **Connectivity & Imports**: Manage external connections and import files/tables from various data sources
|
|
14
18
|
- 🎯 **Comprehensive Ontology Access**: 13 commands for objects, actions, and queries
|
|
15
19
|
- 🏗️ **Orchestration Management**: Create, manage, and monitor builds, jobs, and schedules
|
|
16
20
|
- 🎬 **MediaSets Operations**: Upload, download, and manage media content with transaction support
|
|
@@ -84,6 +88,15 @@ pltr folder create "My Project"
|
|
|
84
88
|
# List root folder contents
|
|
85
89
|
pltr folder list ri.compass.main.folder.0
|
|
86
90
|
|
|
91
|
+
# Manage spaces and projects
|
|
92
|
+
pltr space list
|
|
93
|
+
pltr project create "My Project" ri.compass.main.space.123
|
|
94
|
+
pltr project list --space-rid ri.compass.main.space.123
|
|
95
|
+
|
|
96
|
+
# Manage resource permissions
|
|
97
|
+
pltr resource-role grant ri.compass.main.dataset.123 user123 User viewer
|
|
98
|
+
pltr resource-role list ri.compass.main.dataset.123
|
|
99
|
+
|
|
87
100
|
# Execute a simple SQL query
|
|
88
101
|
pltr sql execute "SELECT 1 as test"
|
|
89
102
|
|
|
@@ -92,6 +105,11 @@ pltr dataset get ri.foundry.main.dataset.abc123
|
|
|
92
105
|
pltr dataset branches list ri.foundry.main.dataset.abc123
|
|
93
106
|
pltr dataset files list ri.foundry.main.dataset.abc123
|
|
94
107
|
|
|
108
|
+
# Dataset transaction management
|
|
109
|
+
pltr dataset transactions start ri.foundry.main.dataset.abc123
|
|
110
|
+
pltr dataset transactions commit ri.foundry.main.dataset.abc123 <transaction-rid>
|
|
111
|
+
pltr dataset files upload myfile.csv ri.foundry.main.dataset.abc123 --transaction-rid <rid>
|
|
112
|
+
|
|
95
113
|
# Start interactive mode for exploration
|
|
96
114
|
pltr shell
|
|
97
115
|
```
|
|
@@ -134,6 +152,13 @@ pltr sql execute "SELECT * FROM table" # Run SQL queries
|
|
|
134
152
|
pltr ontology list # List ontologies
|
|
135
153
|
pltr dataset get <rid> # Get dataset info
|
|
136
154
|
|
|
155
|
+
# Filesystem Management
|
|
156
|
+
pltr folder create "My Project" # Create folders
|
|
157
|
+
pltr space create "Team Space" <org-rid> # Create spaces
|
|
158
|
+
pltr project create "New Project" <space-rid> # Create projects
|
|
159
|
+
pltr resource search "dataset name" # Search resources
|
|
160
|
+
pltr resource-role grant <resource-rid> <user-id> User viewer # Grant permissions
|
|
161
|
+
|
|
137
162
|
# Orchestration
|
|
138
163
|
pltr orchestration builds search # Search builds
|
|
139
164
|
pltr orchestration jobs get <job-rid> # Get job details
|
|
@@ -144,6 +169,12 @@ pltr media-sets get <set-rid> <item-rid> # Get media item info
|
|
|
144
169
|
pltr media-sets upload <set-rid> file.jpg "/path/file.jpg" <txn-id> # Upload media
|
|
145
170
|
pltr media-sets download <set-rid> <item-rid> output.jpg # Download media
|
|
146
171
|
|
|
172
|
+
# Connectivity & Data Imports
|
|
173
|
+
pltr connectivity connection list # List available connections
|
|
174
|
+
pltr connectivity connection get <conn-rid> # Get connection details
|
|
175
|
+
pltr connectivity import file <conn-rid> <source-path> <dataset-rid> --execute # Import file
|
|
176
|
+
pltr connectivity import table <conn-rid> <table-name> <dataset-rid> --execute # Import table
|
|
177
|
+
|
|
147
178
|
# Administrative
|
|
148
179
|
pltr admin user current # Current user info
|
|
149
180
|
pltr admin user list # List users
|
|
@@ -264,6 +295,74 @@ pltr media-sets download ri.mediasets.main.media-set.abc \
|
|
|
264
295
|
- Preview mode (`--preview`)
|
|
265
296
|
- Transaction-based upload workflow
|
|
266
297
|
|
|
298
|
+
### 📊 Dataset Transaction Management
|
|
299
|
+
|
|
300
|
+
pltr-cli provides comprehensive transaction management for datasets, allowing atomic operations with rollback capability:
|
|
301
|
+
|
|
302
|
+
#### Transaction Lifecycle
|
|
303
|
+
```bash
|
|
304
|
+
# Start a new transaction
|
|
305
|
+
pltr dataset transactions start ri.foundry.main.dataset.abc123 --branch master --type APPEND
|
|
306
|
+
# Returns transaction RID for use in subsequent operations
|
|
307
|
+
|
|
308
|
+
# Check transaction status
|
|
309
|
+
pltr dataset transactions status ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz
|
|
310
|
+
|
|
311
|
+
# List all transactions for a dataset
|
|
312
|
+
pltr dataset transactions list ri.foundry.main.dataset.abc123 --branch master
|
|
313
|
+
|
|
314
|
+
# Commit a transaction (make changes permanent)
|
|
315
|
+
pltr dataset transactions commit ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz
|
|
316
|
+
|
|
317
|
+
# Abort a transaction (discard all changes)
|
|
318
|
+
pltr dataset transactions abort ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz --yes
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
#### File Operations with Transactions
|
|
322
|
+
```bash
|
|
323
|
+
# Upload files within a transaction
|
|
324
|
+
pltr dataset files upload data.csv ri.foundry.main.dataset.abc123 \
|
|
325
|
+
--transaction-rid ri.foundry.main.transaction.xyz
|
|
326
|
+
|
|
327
|
+
# Multiple file uploads in same transaction
|
|
328
|
+
pltr dataset files upload file1.csv ri.foundry.main.dataset.abc123 \
|
|
329
|
+
--transaction-rid ri.foundry.main.transaction.xyz
|
|
330
|
+
pltr dataset files upload file2.csv ri.foundry.main.dataset.abc123 \
|
|
331
|
+
--transaction-rid ri.foundry.main.transaction.xyz
|
|
332
|
+
|
|
333
|
+
# Commit when ready
|
|
334
|
+
pltr dataset transactions commit ri.foundry.main.dataset.abc123 ri.foundry.main.transaction.xyz
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
#### Transaction Types
|
|
338
|
+
- **APPEND**: Add new files to dataset
|
|
339
|
+
- **UPDATE**: Add new files and overwrite existing ones
|
|
340
|
+
- **SNAPSHOT**: Replace entire dataset with new files
|
|
341
|
+
- **DELETE**: Remove files from dataset
|
|
342
|
+
|
|
343
|
+
#### Example Workflow
|
|
344
|
+
```bash
|
|
345
|
+
# Start a transaction for bulk data update
|
|
346
|
+
TRANSACTION=$(pltr dataset transactions start ri.foundry.main.dataset.abc123 \
|
|
347
|
+
--type UPDATE --format json | jq -r '.transaction_rid')
|
|
348
|
+
|
|
349
|
+
# Upload multiple files
|
|
350
|
+
pltr dataset files upload data1.csv ri.foundry.main.dataset.abc123 --transaction-rid $TRANSACTION
|
|
351
|
+
pltr dataset files upload data2.csv ri.foundry.main.dataset.abc123 --transaction-rid $TRANSACTION
|
|
352
|
+
|
|
353
|
+
# Check status before committing
|
|
354
|
+
pltr dataset transactions status ri.foundry.main.dataset.abc123 $TRANSACTION
|
|
355
|
+
|
|
356
|
+
# Commit if everything looks good
|
|
357
|
+
pltr dataset transactions commit ri.foundry.main.dataset.abc123 $TRANSACTION
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**Benefits:**
|
|
361
|
+
- **Data Integrity**: Atomic operations with rollback capability
|
|
362
|
+
- **Error Recovery**: Clean rollback from failed operations
|
|
363
|
+
- **Collaboration**: Better concurrent modification handling
|
|
364
|
+
- **Automation**: Reliable data pipeline operations
|
|
365
|
+
|
|
267
366
|
## ⚙️ Configuration
|
|
268
367
|
|
|
269
368
|
pltr-cli stores configuration securely using industry best practices:
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# Release Process
|
|
2
|
+
|
|
3
|
+
This document describes how to create releases for pltr-cli using the automated release script.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The release script (`scripts/release.py`) supports both interactive and non-interactive modes to accommodate different use cases:
|
|
8
|
+
- **Interactive mode**: For human developers who want to review and confirm each step
|
|
9
|
+
- **Non-interactive mode**: For AI agents and automated systems that need to create releases programmatically
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
### For Humans (Interactive Mode)
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Patch release (0.5.1 → 0.5.2)
|
|
17
|
+
python scripts/release.py --type patch
|
|
18
|
+
|
|
19
|
+
# Minor release (0.5.1 → 0.6.0)
|
|
20
|
+
python scripts/release.py --type minor
|
|
21
|
+
|
|
22
|
+
# Major release (0.5.1 → 1.0.0)
|
|
23
|
+
python scripts/release.py --type major
|
|
24
|
+
|
|
25
|
+
# Specific version
|
|
26
|
+
python scripts/release.py --version 0.6.0
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### For AI Agents/Automation (Non-Interactive Mode)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Create release without prompts, don't push
|
|
33
|
+
python scripts/release.py --version 0.5.2 --yes --no-push
|
|
34
|
+
|
|
35
|
+
# Create release and push automatically
|
|
36
|
+
python scripts/release.py --type patch --yes --push
|
|
37
|
+
|
|
38
|
+
# Test what would happen (dry run)
|
|
39
|
+
python scripts/release.py --version 0.5.2 --dry-run
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Command-Line Arguments
|
|
43
|
+
|
|
44
|
+
| Argument | Description |
|
|
45
|
+
|----------|-------------|
|
|
46
|
+
| `--version X.Y.Z` | Specify exact version to release |
|
|
47
|
+
| `--type {major\|minor\|patch}` | Bump version automatically |
|
|
48
|
+
| `--yes`, `-y` | Skip all confirmation prompts (non-interactive mode) |
|
|
49
|
+
| `--push` | Push to origin without asking (requires `--yes`) |
|
|
50
|
+
| `--no-push` | Don't push to origin (useful for testing) |
|
|
51
|
+
| `--dry-run` | Show what would be done without making changes |
|
|
52
|
+
|
|
53
|
+
## What the Script Does
|
|
54
|
+
|
|
55
|
+
1. **Validates environment**:
|
|
56
|
+
- Checks that you're in a git repository
|
|
57
|
+
- Ensures working directory is clean (no uncommitted changes)
|
|
58
|
+
- Validates version format
|
|
59
|
+
|
|
60
|
+
2. **Version handling**:
|
|
61
|
+
- Gets current version from `pyproject.toml`
|
|
62
|
+
- Calculates or validates new version
|
|
63
|
+
- Warns if version already exists or is the same as current
|
|
64
|
+
|
|
65
|
+
3. **Creates release**:
|
|
66
|
+
- Updates version in `pyproject.toml`
|
|
67
|
+
- Creates git commit with message like "patch: Release version 0.5.2"
|
|
68
|
+
- Creates git tag like "v0.5.2"
|
|
69
|
+
|
|
70
|
+
4. **Optional push**:
|
|
71
|
+
- Pushes commit and tag to origin (triggers GitHub Actions)
|
|
72
|
+
- Can be automatic (`--push`), skipped (`--no-push`), or prompted (default)
|
|
73
|
+
|
|
74
|
+
## Usage Examples
|
|
75
|
+
|
|
76
|
+
### Interactive Development Workflow
|
|
77
|
+
```bash
|
|
78
|
+
# Make your changes
|
|
79
|
+
git add .
|
|
80
|
+
git commit -m "feat: add new feature"
|
|
81
|
+
|
|
82
|
+
# Create a patch release interactively
|
|
83
|
+
python scripts/release.py --type patch
|
|
84
|
+
# → Script will prompt for confirmation
|
|
85
|
+
# → Script will ask if you want to push
|
|
86
|
+
|
|
87
|
+
# The script will:
|
|
88
|
+
# 1. Update pyproject.toml (0.5.1 → 0.5.2)
|
|
89
|
+
# 2. Create commit "patch: Release version 0.5.2"
|
|
90
|
+
# 3. Create tag "v0.5.2"
|
|
91
|
+
# 4. Ask if you want to push to trigger publishing
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### AI Agent Workflow
|
|
95
|
+
```bash
|
|
96
|
+
# AI agent creates a release without any prompts
|
|
97
|
+
python scripts/release.py --version 0.5.2 --yes --no-push
|
|
98
|
+
|
|
99
|
+
# The script will:
|
|
100
|
+
# 1. Update pyproject.toml to version 0.5.2
|
|
101
|
+
# 2. Create commit "release: Release version 0.5.2"
|
|
102
|
+
# 3. Create tag "v0.5.2"
|
|
103
|
+
# 4. NOT push (--no-push specified)
|
|
104
|
+
# 5. Print instructions for manual push if needed
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Testing/Validation Workflow
|
|
108
|
+
```bash
|
|
109
|
+
# See what would happen without making changes
|
|
110
|
+
python scripts/release.py --version 0.6.0 --dry-run
|
|
111
|
+
|
|
112
|
+
# Create release locally but don't push (for testing)
|
|
113
|
+
python scripts/release.py --version 0.6.0 --yes --no-push
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## GitHub Actions Integration
|
|
117
|
+
|
|
118
|
+
When commits and tags are pushed to the repository, GitHub Actions will automatically:
|
|
119
|
+
1. Build the package
|
|
120
|
+
2. Run tests
|
|
121
|
+
3. Publish to PyPI (for tagged releases)
|
|
122
|
+
4. Create GitHub release with release notes
|
|
123
|
+
|
|
124
|
+
Monitor the workflow at: https://github.com/anjor/pltr-cli/actions
|
|
125
|
+
|
|
126
|
+
## Error Handling
|
|
127
|
+
|
|
128
|
+
The script handles several common error scenarios:
|
|
129
|
+
|
|
130
|
+
- **Dirty working directory**: Script will fail if there are uncommitted changes
|
|
131
|
+
- **Duplicate versions**: Warns if trying to release the same version as current
|
|
132
|
+
- **Existing tags**: Warns if git tag already exists locally or remotely
|
|
133
|
+
- **Invalid versions**: Validates semantic version format (X.Y.Z)
|
|
134
|
+
- **Missing arguments**: Requires either `--version` or `--type`
|
|
135
|
+
- **Invalid combinations**: Prevents conflicting flags like `--push` and `--no-push`
|
|
136
|
+
|
|
137
|
+
## Troubleshooting
|
|
138
|
+
|
|
139
|
+
### "EOFError: EOF when reading a line"
|
|
140
|
+
This happens when running the script in non-interactive mode without the `--yes` flag. Add `--yes` to skip prompts.
|
|
141
|
+
|
|
142
|
+
### "Tag already exists"
|
|
143
|
+
The script will warn you and ask for confirmation. You can:
|
|
144
|
+
- Delete the existing tag: `git tag -d v0.5.2`
|
|
145
|
+
- Use a different version number
|
|
146
|
+
- Continue anyway (not recommended)
|
|
147
|
+
|
|
148
|
+
### "Working directory is not clean"
|
|
149
|
+
Commit or stash your changes before running the release script:
|
|
150
|
+
```bash
|
|
151
|
+
git add .
|
|
152
|
+
git commit -m "your changes"
|
|
153
|
+
# OR
|
|
154
|
+
git stash
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Best Practices
|
|
158
|
+
|
|
159
|
+
1. **Always test with `--dry-run` first** when trying new version numbers
|
|
160
|
+
2. **Use `--no-push` for testing** to avoid accidental pushes
|
|
161
|
+
3. **Follow semantic versioning**: patch for bug fixes, minor for features, major for breaking changes
|
|
162
|
+
4. **Keep working directory clean** before creating releases
|
|
163
|
+
5. **Monitor GitHub Actions** after pushing to ensure successful publishing
|