pltr-cli 0.9.0__tar.gz → 0.9.1__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.
Files changed (128) hide show
  1. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/PKG-INFO +1 -1
  2. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/pyproject.toml +1 -1
  3. pltr_cli-0.9.1/src/pltr/__init__.py +1 -0
  4. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/dataset.py +35 -7
  5. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/uv.lock +1 -1
  6. pltr_cli-0.9.0/src/pltr/__init__.py +0 -1
  7. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/.github/workflows/ci.yml +0 -0
  8. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/.github/workflows/publish.yml +0 -0
  9. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/.github/workflows/test-publish.yml +0 -0
  10. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/.gitignore +0 -0
  11. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/.pre-commit-config.yaml +0 -0
  12. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/CHANGELOG.md +0 -0
  13. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/CLAUDE.md +0 -0
  14. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/LICENSE +0 -0
  15. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/README.md +0 -0
  16. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/RELEASE.md +0 -0
  17. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/children.csv +0 -0
  18. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/docs/README.md +0 -0
  19. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/docs/api/wrapper.md +0 -0
  20. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/docs/examples/csv-upload.md +0 -0
  21. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/docs/examples/gallery.md +0 -0
  22. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/docs/features/dataset-transactions.md +0 -0
  23. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/docs/user-guide/aliases.md +0 -0
  24. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/docs/user-guide/authentication.md +0 -0
  25. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/docs/user-guide/commands.md +0 -0
  26. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/docs/user-guide/quick-start.md +0 -0
  27. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/docs/user-guide/troubleshooting.md +0 -0
  28. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/docs/user-guide/workflows.md +0 -0
  29. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/folder_info.json +0 -0
  30. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/folders.json +0 -0
  31. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/mypy.ini +0 -0
  32. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/scripts/release.py +0 -0
  33. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/__main__.py +0 -0
  34. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/auth/__init__.py +0 -0
  35. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/auth/base.py +0 -0
  36. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/auth/manager.py +0 -0
  37. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/auth/oauth.py +0 -0
  38. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/auth/storage.py +0 -0
  39. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/auth/token.py +0 -0
  40. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/cli.py +0 -0
  41. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/__init__.py +0 -0
  42. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/admin.py +0 -0
  43. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/alias.py +0 -0
  44. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/completion.py +0 -0
  45. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/configure.py +0 -0
  46. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/connectivity.py +0 -0
  47. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/dataset.py +0 -0
  48. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/folder.py +0 -0
  49. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/mediasets.py +0 -0
  50. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/ontology.py +0 -0
  51. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/orchestration.py +0 -0
  52. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/project.py +0 -0
  53. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/resource.py +0 -0
  54. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/resource_role.py +0 -0
  55. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/shell.py +0 -0
  56. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/space.py +0 -0
  57. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/sql.py +0 -0
  58. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/commands/verify.py +0 -0
  59. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/config/__init__.py +0 -0
  60. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/config/aliases.py +0 -0
  61. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/config/profiles.py +0 -0
  62. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/config/settings.py +0 -0
  63. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/__init__.py +0 -0
  64. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/admin.py +0 -0
  65. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/base.py +0 -0
  66. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/connectivity.py +0 -0
  67. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/folder.py +0 -0
  68. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/mediasets.py +0 -0
  69. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/ontology.py +0 -0
  70. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/orchestration.py +0 -0
  71. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/project.py +0 -0
  72. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/resource.py +0 -0
  73. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/resource_role.py +0 -0
  74. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/space.py +0 -0
  75. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/services/sql.py +0 -0
  76. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/utils/__init__.py +0 -0
  77. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/utils/alias_resolver.py +0 -0
  78. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/utils/completion.py +0 -0
  79. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/utils/formatting.py +0 -0
  80. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/src/pltr/utils/progress.py +0 -0
  81. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/__init__.py +0 -0
  82. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/conftest.py +0 -0
  83. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/integration/README.md +0 -0
  84. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/integration/__init__.py +0 -0
  85. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/integration/conftest.py +0 -0
  86. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/integration/test_auth_flow.py +0 -0
  87. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/integration/test_cli_integration.py +0 -0
  88. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/integration/test_data_workflows.py +0 -0
  89. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/integration/test_data_workflows_simple.py +0 -0
  90. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/integration/test_simple_integration.py +0 -0
  91. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_auth/__init__.py +0 -0
  92. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_auth/test_base.py +0 -0
  93. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_auth/test_manager.py +0 -0
  94. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_auth/test_oauth.py +0 -0
  95. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_auth/test_storage.py +0 -0
  96. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_auth/test_token.py +0 -0
  97. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_commands/__init__.py +0 -0
  98. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_commands/test_admin.py +0 -0
  99. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_commands/test_alias.py +0 -0
  100. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_commands/test_completion.py +0 -0
  101. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_commands/test_connectivity.py +0 -0
  102. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_commands/test_dataset.py +0 -0
  103. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_commands/test_folder.py +0 -0
  104. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_commands/test_ontology.py +0 -0
  105. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_commands/test_orchestration.py +0 -0
  106. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_commands/test_shell.py +0 -0
  107. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_commands/test_sql.py +0 -0
  108. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_commands/test_verify_simple.py +0 -0
  109. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_config/__init__.py +0 -0
  110. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_config/test_aliases.py +0 -0
  111. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_config/test_profiles.py +0 -0
  112. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_config/test_settings.py +0 -0
  113. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/__init__.py +0 -0
  114. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_admin.py +0 -0
  115. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_base.py +0 -0
  116. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_connectivity.py +0 -0
  117. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_dataset.py +0 -0
  118. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_dataset_transactions.py +0 -0
  119. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_folder.py +0 -0
  120. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_ontology.py +0 -0
  121. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_orchestration.py +0 -0
  122. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_project.py +0 -0
  123. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_resource.py +0 -0
  124. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_resource_role.py +0 -0
  125. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_space.py +0 -0
  126. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_services/test_sql.py +0 -0
  127. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/tests/test_utils/__init__.py +0 -0
  128. {pltr_cli-0.9.0 → pltr_cli-0.9.1}/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.9.0
3
+ Version: 0.9.1
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pltr-cli"
3
- version = "0.9.0"
3
+ version = "0.9.1"
4
4
  description = "Command-line interface for Palantir Foundry APIs"
5
5
  authors = [
6
6
  { name = "anjor", email = "anjor@umd.edu" },
@@ -0,0 +1 @@
1
+ __version__ = "0.9.1"
@@ -58,27 +58,55 @@ class DatasetService(BaseService):
58
58
 
59
59
  def apply_schema(self, dataset_rid: str, branch: str = "master") -> Dict[str, Any]:
60
60
  """
61
- Apply/infer schema for a dataset using the schema inference API.
61
+ Apply/infer schema for a dataset using both schema inference and metadata APIs.
62
+
63
+ This method performs two sequential API calls:
64
+ 1. Schema inference to infer the dataset schema
65
+ 2. Schema application to apply the inferred schema to the dataset
62
66
 
63
67
  Args:
64
68
  dataset_rid: Dataset Resource Identifier
65
69
  branch: Dataset branch name (default: "master")
66
70
 
67
71
  Returns:
68
- Schema inference result
72
+ Schema application result including transaction and version information
69
73
  """
70
74
  try:
71
- endpoint = f"/foundry-schema-inference/api/datasets/{dataset_rid}/branches/{branch}/schema"
72
- response = self._make_request("POST", endpoint, json_data={})
75
+ # Step 1: Call schema inference API to infer the schema
76
+ inference_endpoint = f"/foundry-schema-inference/api/datasets/{dataset_rid}/branches/{branch}/schema"
77
+ inference_response = self._make_request(
78
+ "POST", inference_endpoint, json_data={}
79
+ )
73
80
 
74
- # Parse the response
75
- result = response.json() if response.text else {}
81
+ # Parse the inference response
82
+ inference_result = (
83
+ inference_response.json() if inference_response.text else {}
84
+ )
85
+
86
+ # Extract the foundry schema from the inference result
87
+ foundry_schema = inference_result.get("data", {}).get("foundrySchema")
88
+ if not foundry_schema:
89
+ raise RuntimeError(
90
+ "Schema inference failed: No foundrySchema found in response"
91
+ )
92
+
93
+ # Step 2: Call foundry-metadata API to apply the schema
94
+ metadata_endpoint = f"/foundry-metadata/api/schemas/datasets/{dataset_rid}/branches/{branch}"
95
+ metadata_response = self._make_request(
96
+ "POST", metadata_endpoint, json_data=foundry_schema
97
+ )
98
+
99
+ # Parse the metadata response
100
+ metadata_result = metadata_response.json() if metadata_response.text else {}
76
101
 
77
102
  return {
78
103
  "dataset_rid": dataset_rid,
79
104
  "branch": branch,
80
105
  "status": "Schema applied successfully",
81
- "result": result,
106
+ "inference_result": inference_result,
107
+ "application_result": metadata_result,
108
+ "transaction_rid": metadata_result.get("transactionRid"),
109
+ "version_id": metadata_result.get("versionId"),
82
110
  }
83
111
  except Exception as e:
84
112
  raise RuntimeError(f"Failed to apply schema for dataset {dataset_rid}: {e}")
@@ -710,7 +710,7 @@ wheels = [
710
710
 
711
711
  [[package]]
712
712
  name = "pltr-cli"
713
- version = "0.9.0"
713
+ version = "0.9.1"
714
714
  source = { editable = "." }
715
715
  dependencies = [
716
716
  { name = "click-repl" },
@@ -1 +0,0 @@
1
- __version__ = "0.9.0"
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