pltr-cli 0.4.0__py3-none-any.whl → 0.5.1__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.
@@ -1,287 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: pltr-cli
3
- Version: 0.4.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 70+ commands for data analysis, ontology operations, SQL queries, folder management, 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
- - 📁 **Folder Management**: Create, explore, and manage Foundry filesystem structure
51
- - 🎯 **Comprehensive Ontology Access**: 13 commands for objects, actions, and queries
52
- - 📝 **Full SQL Support**: Execute, submit, monitor, and export query results
53
- - 👥 **Admin Operations**: User, group, role, and organization management (16 commands)
54
- - 💻 **Interactive Shell**: REPL mode with tab completion and command history
55
- - ⚡ **Shell Completion**: Auto-completion for bash, zsh, and fish
56
- - 🎨 **Rich Output**: Beautiful terminal formatting with multiple export formats (table, JSON, CSV)
57
- - 👤 **Multi-Profile Support**: Manage multiple Foundry environments seamlessly
58
-
59
- ## Installation
60
-
61
- ### Using pip
62
-
63
- ```bash
64
- pip install pltr-cli
65
- ```
66
-
67
- ### From source
68
-
69
- ```bash
70
- # Clone the repository
71
- git clone https://github.com/anjor/pltr-cli.git
72
- cd pltr-cli
73
-
74
- # Install with uv
75
- uv sync
76
-
77
- # Run the CLI
78
- uv run pltr --help
79
- ```
80
-
81
- ## 🚀 Quick Start
82
-
83
- ### 1. Configure Authentication
84
-
85
- Set up your Foundry credentials:
86
-
87
- ```bash
88
- pltr configure configure
89
- ```
90
-
91
- Follow the interactive prompts to enter:
92
- - Foundry hostname (e.g., `foundry.company.com`)
93
- - Authentication method (token or OAuth2)
94
- - Your credentials
95
-
96
- ### 2. Verify Connection
97
-
98
- Test your setup:
99
-
100
- ```bash
101
- pltr verify
102
- ```
103
-
104
- ### 3. Start Exploring
105
-
106
- ```bash
107
- # Check current user
108
- pltr admin user current
109
-
110
- # List available ontologies
111
- pltr ontology list
112
-
113
- # Create a new folder
114
- pltr folder create "My Project"
115
-
116
- # List root folder contents
117
- pltr folder list ri.compass.main.folder.0
118
-
119
- # Execute a simple SQL query
120
- pltr sql execute "SELECT 1 as test"
121
-
122
- # Start interactive mode for exploration
123
- pltr shell
124
- ```
125
-
126
- ### 4. Enable Shell Completion
127
-
128
- For the best experience:
129
-
130
- ```bash
131
- pltr completion install
132
- ```
133
-
134
- 📖 **Need more help?** See the **[Quick Start Guide](docs/user-guide/quick-start.md)** for detailed setup instructions.
135
-
136
- ## 📚 Documentation
137
-
138
- pltr-cli provides comprehensive documentation to help you get the most out of the tool:
139
-
140
- ### 📖 User Guides
141
- - **[Quick Start Guide](docs/user-guide/quick-start.md)** - Get up and running in 5 minutes
142
- - **[Authentication Setup](docs/user-guide/authentication.md)** - Complete guide to token and OAuth2 setup
143
- - **[Command Reference](docs/user-guide/commands.md)** - Complete reference for all 70+ commands
144
- - **[Common Workflows](docs/user-guide/workflows.md)** - Real-world data analysis patterns
145
- - **[Troubleshooting](docs/user-guide/troubleshooting.md)** - Solutions to common issues
146
-
147
- ### 🔧 Developer Resources
148
- - **[API Wrapper Documentation](docs/api/wrapper.md)** - Architecture and extension guide
149
- - **[Examples Gallery](docs/examples/gallery.md)** - Real-world use cases and automation scripts
150
-
151
- ### 🎯 Quick Command Overview
152
-
153
- **Most Common Commands:**
154
- ```bash
155
- # Authentication & Setup
156
- pltr configure configure # Set up authentication
157
- pltr verify # Test connection
158
-
159
- # Data Analysis
160
- pltr sql execute "SELECT * FROM table" # Run SQL queries
161
- pltr ontology list # List ontologies
162
- pltr dataset get <rid> # Get dataset info
163
-
164
- # Administrative
165
- pltr admin user current # Current user info
166
- pltr admin user list # List users
167
-
168
- # Interactive & Tools
169
- pltr shell # Interactive mode
170
- pltr completion install # Enable tab completion
171
- ```
172
-
173
- 💡 **Tip**: Use `pltr --help` or `pltr <command> --help` for detailed command help.
174
-
175
- For the complete command reference with examples, see **[Command Reference](docs/user-guide/commands.md)**.
176
-
177
- ## ⚙️ Configuration
178
-
179
- pltr-cli stores configuration securely using industry best practices:
180
-
181
- - **Profile Configuration**: `~/.config/pltr/profiles.json`
182
- - **Credentials**: Encrypted in system keyring (never stored in plain text)
183
- - **Shell History**: `~/.config/pltr/repl_history` (for interactive mode)
184
-
185
- ### Environment Variables
186
-
187
- For CI/CD and automation, use environment variables:
188
-
189
- ```bash
190
- # Token authentication
191
- export FOUNDRY_TOKEN="your-api-token"
192
- export FOUNDRY_HOST="foundry.company.com"
193
-
194
- # OAuth2 authentication
195
- export FOUNDRY_CLIENT_ID="your-client-id"
196
- export FOUNDRY_CLIENT_SECRET="your-client-secret"
197
- export FOUNDRY_HOST="foundry.company.com"
198
- ```
199
-
200
- See **[Authentication Setup](docs/user-guide/authentication.md)** for complete configuration options.
201
-
202
- ## 🔧 Development
203
-
204
- ### Prerequisites
205
-
206
- - Python 3.9+
207
- - [uv](https://github.com/astral-sh/uv) for dependency management
208
-
209
- ### Quick Development Setup
210
-
211
- ```bash
212
- # Clone the repository
213
- git clone https://github.com/anjor/pltr-cli.git
214
- cd pltr-cli
215
-
216
- # Install dependencies and development tools
217
- uv sync
218
-
219
- # Install pre-commit hooks
220
- uv run pre-commit install
221
-
222
- # Run tests
223
- uv run pytest
224
-
225
- # Run linting and formatting
226
- uv run ruff check src/
227
- uv run ruff format src/
228
- uv run mypy src/
229
- ```
230
-
231
- ### Project Architecture
232
-
233
- pltr-cli uses a layered architecture:
234
-
235
- - **CLI Layer** (Typer): Command-line interface and argument parsing
236
- - **Command Layer**: Command implementations with validation
237
- - **Service Layer**: Business logic and foundry-platform-sdk integration
238
- - **Auth Layer**: Secure authentication and credential management
239
- - **Utils Layer**: Formatting, progress, and helper functions
240
-
241
- See **[API Wrapper Documentation](docs/api/wrapper.md)** for detailed architecture information and extension guides.
242
-
243
- ## 📊 Current Status
244
-
245
- pltr-cli is **production-ready** with comprehensive features:
246
-
247
- - ✅ **65+ Commands** across 8 command groups
248
- - ✅ **273 Unit Tests** with 67% code coverage
249
- - ✅ **Published on PyPI** with automated releases
250
- - ✅ **Cross-Platform** support (Windows, macOS, Linux)
251
- - ✅ **Comprehensive Documentation** (Quick start, guides, examples)
252
- - ✅ **Interactive Shell** with tab completion and history
253
- - ✅ **CI/CD Ready** with environment variable support
254
-
255
- **Latest Release**: Available on [PyPI](https://pypi.org/project/pltr-cli/)
256
-
257
- ## 🤝 Contributing
258
-
259
- Contributions are welcome! Whether you're fixing bugs, adding features, or improving documentation.
260
-
261
- ### Getting Started
262
-
263
- 1. Fork the repository
264
- 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
265
- 3. Make your changes following the existing patterns
266
- 4. Add tests for new functionality
267
- 5. Run the test suite and linting
268
- 6. Commit using conventional commit format (`feat:`, `fix:`, `docs:`, etc.)
269
- 7. Push to your branch and create a Pull Request
270
-
271
- ### Development Guidelines
272
-
273
- - Follow existing code patterns and architecture
274
- - Add tests for new functionality
275
- - Update documentation for user-facing changes
276
- - Use type hints throughout
277
- - Follow the existing error handling patterns
278
-
279
- See **[API Wrapper Documentation](docs/api/wrapper.md)** for detailed development guidelines.
280
-
281
- ## License
282
-
283
- This project is licensed under the MIT License - see the LICENSE file for details.
284
-
285
- ## Acknowledgments
286
-
287
- Built on top of the official [Palantir Foundry Platform Python SDK](https://github.com/palantir/foundry-platform-python).