diff --git a/README.md b/README.md index 1c06c9d47..957cfe611 100644 --- a/README.md +++ b/README.md @@ -37,11 +37,6 @@ You can install the Python package using `pip`: pip install foundry-platform-sdk ``` -Then, import the package: -```python -import foundry.v2 -``` - ## API Versioning Every endpoint of the Foundry API is versioned using a version number that appears in the URL. For example, @@ -86,6 +81,8 @@ You can pass in the hostname and token as keyword arguments when initializing the `UserTokenAuth`: ```python +import foundry + foundry_client = foundry.v2.FoundryClient( auth=foundry.UserTokenAuth( hostname="example.palantirfoundry.com", @@ -107,6 +104,8 @@ the sign-in process using the `sign_in_as_service_user` method. As these service automatically retry all operations one time if a `401` (Unauthorized) error is thrown after refreshing the token. ```python +import foundry + auth = foundry.ConfidentialClientAuth( client_id=os.environ["CLIENT_ID"], client_secret=os.environ["CLIENT_SECRET"], @@ -124,6 +123,8 @@ auth.sign_in_as_service_user() After creating the `ConfidentialClientAuth` object, pass it in to the `FoundryClient`, ```python +import foundry.v2 + foundry_client = foundry.v2.FoundryClient(auth=auth, hostname="example.palantirfoundry.com") ``` @@ -135,7 +136,7 @@ purposes. ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -158,7 +159,7 @@ try: ) print("The create response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Branch.create: %s\n" % e) ``` @@ -201,7 +202,7 @@ the [Pydantic error documentation](https://docs.pydantic.dev/latest/errors/error experience. See [Static Type Analysis](#static-types) below for more information. ### HTTP exceptions -When an HTTP error status is returned, a `PalantirRPCException` is thrown. All HTTP error exception classes inherit from `ApiException`. +When an HTTP error status is returned, a `PalantirRPCException` is thrown. ```python from foundry import PalantirRPCException diff --git a/changelog/@unreleased/pr-22.v2.yml b/changelog/@unreleased/pr-22.v2.yml new file mode 100644 index 000000000..70b700143 --- /dev/null +++ b/changelog/@unreleased/pr-22.v2.yml @@ -0,0 +1,7 @@ +type: improvement +improvement: + description: |- + - Docs updates including updating examples and fixing imports + - Adding size constraints around List types when applicable + links: + - https://github.com/palantir/foundry-platform-python/pull/22 diff --git a/docs/v1/Datasets/Branch.md b/docs/v1/Datasets/Branch.md index 2bf52ec48..b4f991a9c 100644 --- a/docs/v1/Datasets/Branch.md +++ b/docs/v1/Datasets/Branch.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -52,7 +52,7 @@ try: ) print("The create response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Branch.create: %s\n" % e) ``` @@ -90,7 +90,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -110,7 +110,7 @@ try: ) print("The delete response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Branch.delete: %s\n" % e) ``` @@ -148,7 +148,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -168,7 +168,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Branch.get: %s\n" % e) ``` @@ -206,7 +206,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -225,7 +225,7 @@ try: page_size=page_size, ): pprint(branch) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Branch.list: %s\n" % e) ``` @@ -264,7 +264,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -287,7 +287,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Branch.page: %s\n" % e) ``` diff --git a/docs/v1/Datasets/Dataset.md b/docs/v1/Datasets/Dataset.md index d68c0517e..40ad5dc6b 100644 --- a/docs/v1/Datasets/Dataset.md +++ b/docs/v1/Datasets/Dataset.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -46,7 +46,7 @@ try: ) print("The create response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Dataset.create: %s\n" % e) ``` @@ -83,7 +83,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -109,7 +109,7 @@ try: ) print("The delete_schema response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Dataset.delete_schema: %s\n" % e) ``` @@ -146,7 +146,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -163,7 +163,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Dataset.get: %s\n" % e) ``` @@ -200,7 +200,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -226,7 +226,7 @@ try: ) print("The get_schema response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Dataset.get_schema: %s\n" % e) ``` @@ -271,7 +271,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -306,7 +306,7 @@ try: ) print("The read response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Dataset.read: %s\n" % e) ``` @@ -400,7 +400,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -426,7 +426,7 @@ try: ) print("The replace_schema response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Dataset.replace_schema: %s\n" % e) ``` diff --git a/docs/v1/Datasets/File.md b/docs/v1/Datasets/File.md index c12f603a1..778cd59e4 100644 --- a/docs/v1/Datasets/File.md +++ b/docs/v1/Datasets/File.md @@ -44,7 +44,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -70,7 +70,7 @@ try: ) print("The delete response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling File.delete: %s\n" % e) ``` @@ -132,7 +132,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -161,7 +161,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling File.get: %s\n" % e) ``` @@ -225,7 +225,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -253,7 +253,7 @@ try: start_transaction_rid=start_transaction_rid, ): pprint(file) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling File.list: %s\n" % e) ``` @@ -338,7 +338,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -370,7 +370,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling File.page: %s\n" % e) ``` @@ -433,7 +433,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -462,7 +462,7 @@ try: ) print("The read response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling File.read: %s\n" % e) ``` @@ -521,7 +521,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -553,7 +553,7 @@ try: ) print("The upload response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling File.upload: %s\n" % e) ``` diff --git a/docs/v1/Datasets/Transaction.md b/docs/v1/Datasets/Transaction.md index 7d55ad5c7..46f4c5997 100644 --- a/docs/v1/Datasets/Transaction.md +++ b/docs/v1/Datasets/Transaction.md @@ -28,7 +28,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -48,7 +48,7 @@ try: ) print("The abort response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Transaction.abort: %s\n" % e) ``` @@ -87,7 +87,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -107,7 +107,7 @@ try: ) print("The commit response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Transaction.commit: %s\n" % e) ``` @@ -146,7 +146,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -169,7 +169,7 @@ try: ) print("The create response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Transaction.create: %s\n" % e) ``` @@ -229,7 +229,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -249,7 +249,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Transaction.get: %s\n" % e) ``` diff --git a/docs/v1/Ontologies/Action.md b/docs/v1/Ontologies/Action.md index 12675e5a1..d8fa799bc 100644 --- a/docs/v1/Ontologies/Action.md +++ b/docs/v1/Ontologies/Action.md @@ -32,7 +32,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -55,7 +55,7 @@ try: ) print("The apply response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Action.apply: %s\n" % e) ``` @@ -102,7 +102,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -128,7 +128,7 @@ try: ) print("The apply_batch response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Action.apply_batch: %s\n" % e) ``` @@ -174,7 +174,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -209,7 +209,7 @@ try: ) print("The validate response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Action.validate: %s\n" % e) ``` diff --git a/docs/v1/Ontologies/ActionType.md b/docs/v1/Ontologies/ActionType.md index 57c179fb9..23813a147 100644 --- a/docs/v1/Ontologies/ActionType.md +++ b/docs/v1/Ontologies/ActionType.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -46,7 +46,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ActionType.get: %s\n" % e) ``` @@ -87,7 +87,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -106,7 +106,7 @@ try: page_size=page_size, ): pprint(action_type) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ActionType.list: %s\n" % e) ``` @@ -148,7 +148,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -171,7 +171,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ActionType.page: %s\n" % e) ``` diff --git a/docs/v1/Ontologies/ObjectType.md b/docs/v1/Ontologies/ObjectType.md index 95def25a1..43f3b9574 100644 --- a/docs/v1/Ontologies/ObjectType.md +++ b/docs/v1/Ontologies/ObjectType.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -49,7 +49,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ObjectType.get: %s\n" % e) ``` @@ -89,7 +89,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -112,7 +112,7 @@ try: ) print("The get_outgoing_link_type response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ObjectType.get_outgoing_link_type: %s\n" % e) ``` @@ -154,7 +154,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -173,7 +173,7 @@ try: page_size=page_size, ): pprint(object_type) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ObjectType.list: %s\n" % e) ``` @@ -213,7 +213,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -235,7 +235,7 @@ try: page_size=page_size, ): pprint(object_type) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ObjectType.list_outgoing_link_types: %s\n" % e) ``` @@ -278,7 +278,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -301,7 +301,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ObjectType.page: %s\n" % e) ``` @@ -342,7 +342,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -368,7 +368,7 @@ try: ) print("The page_outgoing_link_types response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ObjectType.page_outgoing_link_types: %s\n" % e) ``` diff --git a/docs/v1/Ontologies/Ontology.md b/docs/v1/Ontologies/Ontology.md index c5a117dbe..fdc61f1a5 100644 --- a/docs/v1/Ontologies/Ontology.md +++ b/docs/v1/Ontologies/Ontology.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -41,7 +41,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Ontology.get: %s\n" % e) ``` @@ -77,7 +77,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -89,7 +89,7 @@ try: api_response = foundry_client.ontologies.Ontology.list() print("The list response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Ontology.list: %s\n" % e) ``` diff --git a/docs/v1/Ontologies/OntologyObject.md b/docs/v1/Ontologies/OntologyObject.md index e294d477e..3a6eda79c 100644 --- a/docs/v1/Ontologies/OntologyObject.md +++ b/docs/v1/Ontologies/OntologyObject.md @@ -34,7 +34,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -73,7 +73,7 @@ try: ) print("The aggregate response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.aggregate: %s\n" % e) ``` @@ -113,7 +113,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -139,7 +139,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.get: %s\n" % e) ``` @@ -182,7 +182,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -214,7 +214,7 @@ try: ) print("The get_linked_object response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.get_linked_object: %s\n" % e) ``` @@ -270,7 +270,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -298,7 +298,7 @@ try: properties=properties, ): pprint(ontology_object) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.list: %s\n" % e) ``` @@ -356,7 +356,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -390,7 +390,7 @@ try: properties=properties, ): pprint(ontology_object) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.list_linked_objects: %s\n" % e) ``` @@ -447,7 +447,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -479,7 +479,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.page: %s\n" % e) ``` @@ -538,7 +538,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -576,7 +576,7 @@ try: ) print("The page_linked_objects response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.page_linked_objects: %s\n" % e) ``` @@ -637,7 +637,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -672,7 +672,7 @@ try: ) print("The search response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.search: %s\n" % e) ``` diff --git a/docs/v1/Ontologies/Query.md b/docs/v1/Ontologies/Query.md index 57904b95b..e972ec632 100644 --- a/docs/v1/Ontologies/Query.md +++ b/docs/v1/Ontologies/Query.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -48,7 +48,7 @@ try: ) print("The execute response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Query.execute: %s\n" % e) ``` diff --git a/docs/v1/Ontologies/QueryType.md b/docs/v1/Ontologies/QueryType.md index 8b2c3a98d..a8d37d2ba 100644 --- a/docs/v1/Ontologies/QueryType.md +++ b/docs/v1/Ontologies/QueryType.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -46,7 +46,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling QueryType.get: %s\n" % e) ``` @@ -87,7 +87,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -106,7 +106,7 @@ try: page_size=page_size, ): pprint(query_type) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling QueryType.list: %s\n" % e) ``` @@ -148,7 +148,7 @@ Name | Type | Description | Notes | ```python from foundry.v1 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -171,7 +171,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling QueryType.page: %s\n" % e) ``` diff --git a/docs/v2/Admin/Group.md b/docs/v2/Admin/Group.md index 3f8f19465..24e8f2d93 100644 --- a/docs/v2/Admin/Group.md +++ b/docs/v2/Admin/Group.md @@ -30,7 +30,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -59,7 +59,7 @@ try: ) print("The create response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Group.create: %s\n" % e) ``` @@ -94,7 +94,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -114,7 +114,7 @@ try: ) print("The delete response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Group.delete: %s\n" % e) ``` @@ -149,7 +149,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -169,7 +169,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Group.get: %s\n" % e) ``` @@ -196,7 +196,7 @@ The maximum batch size for this endpoint is 500. Name | Type | Description | Notes | ------------- | ------------- | ------------- | ------------- | -**body** | List[GetGroupsBatchRequestElementDict] | Body of the request | | +**body** | Annotated[List[GetGroupsBatchRequestElementDict], Len(min_length=1, max_length=500)] | Body of the request | | **preview** | Optional[PreviewMode] | preview | [optional] | ### Return type @@ -206,14 +206,14 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com" ) -# List[GetGroupsBatchRequestElementDict] | Body of the request +# Annotated[List[GetGroupsBatchRequestElementDict], Len(min_length=1, max_length=500)] | Body of the request body = {"groupId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de"} # Optional[PreviewMode] | preview preview = None @@ -226,7 +226,7 @@ try: ) print("The get_batch response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Group.get_batch: %s\n" % e) ``` @@ -263,7 +263,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -282,7 +282,7 @@ try: preview=preview, ): pprint(group) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Group.list: %s\n" % e) ``` @@ -320,7 +320,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -343,7 +343,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Group.page: %s\n" % e) ``` @@ -380,7 +380,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -406,7 +406,7 @@ try: ) print("The search response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Group.search: %s\n" % e) ``` diff --git a/docs/v2/Admin/GroupMember.md b/docs/v2/Admin/GroupMember.md index 1a1a17ea8..c717f7804 100644 --- a/docs/v2/Admin/GroupMember.md +++ b/docs/v2/Admin/GroupMember.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -52,7 +52,7 @@ try: ) print("The add response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling GroupMember.add: %s\n" % e) ``` @@ -91,7 +91,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -116,7 +116,7 @@ try: transitive=transitive, ): pprint(group_member) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling GroupMember.list: %s\n" % e) ``` @@ -156,7 +156,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -185,7 +185,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling GroupMember.page: %s\n" % e) ``` @@ -221,7 +221,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -244,7 +244,7 @@ try: ) print("The remove response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling GroupMember.remove: %s\n" % e) ``` diff --git a/docs/v2/Admin/GroupMembership.md b/docs/v2/Admin/GroupMembership.md index ec0fb4c93..42b4d40f8 100644 --- a/docs/v2/Admin/GroupMembership.md +++ b/docs/v2/Admin/GroupMembership.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -51,7 +51,7 @@ try: transitive=transitive, ): pprint(group_membership) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling GroupMembership.list: %s\n" % e) ``` @@ -91,7 +91,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -120,7 +120,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling GroupMembership.page: %s\n" % e) ``` diff --git a/docs/v2/Admin/Marking.md b/docs/v2/Admin/Marking.md index f1fb439e3..16f4b803f 100644 --- a/docs/v2/Admin/Marking.md +++ b/docs/v2/Admin/Marking.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -39,7 +39,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Marking.get: %s\n" % e) ``` @@ -73,7 +73,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -92,7 +92,7 @@ try: preview=preview, ): pprint(marking) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Marking.list: %s\n" % e) ``` @@ -127,7 +127,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -150,7 +150,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Marking.page: %s\n" % e) ``` diff --git a/docs/v2/Admin/MarkingCategory.md b/docs/v2/Admin/MarkingCategory.md index a510be773..2c3d6b47d 100644 --- a/docs/v2/Admin/MarkingCategory.md +++ b/docs/v2/Admin/MarkingCategory.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -39,7 +39,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling MarkingCategory.get: %s\n" % e) ``` @@ -73,7 +73,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -92,7 +92,7 @@ try: preview=preview, ): pprint(marking_category) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling MarkingCategory.list: %s\n" % e) ``` @@ -127,7 +127,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -150,7 +150,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling MarkingCategory.page: %s\n" % e) ``` diff --git a/docs/v2/Admin/User.md b/docs/v2/Admin/User.md index 2a3d0b7c6..dad7764a4 100644 --- a/docs/v2/Admin/User.md +++ b/docs/v2/Admin/User.md @@ -28,7 +28,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -48,7 +48,7 @@ try: ) print("The delete response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling User.delete: %s\n" % e) ``` @@ -83,7 +83,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -103,7 +103,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling User.get: %s\n" % e) ``` @@ -130,7 +130,7 @@ The maximum batch size for this endpoint is 500. Name | Type | Description | Notes | ------------- | ------------- | ------------- | ------------- | -**body** | List[GetUsersBatchRequestElementDict] | Body of the request | | +**body** | Annotated[List[GetUsersBatchRequestElementDict], Len(min_length=1, max_length=500)] | Body of the request | | **preview** | Optional[PreviewMode] | preview | [optional] | ### Return type @@ -140,14 +140,14 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com" ) -# List[GetUsersBatchRequestElementDict] | Body of the request +# Annotated[List[GetUsersBatchRequestElementDict], Len(min_length=1, max_length=500)] | Body of the request body = {"userId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de"} # Optional[PreviewMode] | preview preview = None @@ -160,7 +160,7 @@ try: ) print("The get_batch response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling User.get_batch: %s\n" % e) ``` @@ -194,7 +194,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -211,7 +211,7 @@ try: ) print("The get_current response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling User.get_current: %s\n" % e) ``` @@ -245,7 +245,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -265,7 +265,7 @@ try: ) print("The get_markings response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling User.get_markings: %s\n" % e) ``` @@ -302,7 +302,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -321,7 +321,7 @@ try: preview=preview, ): pprint(user) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling User.list: %s\n" % e) ``` @@ -359,7 +359,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -382,7 +382,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling User.page: %s\n" % e) ``` @@ -417,7 +417,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -437,7 +437,7 @@ try: ) print("The profile_picture response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling User.profile_picture: %s\n" % e) ``` @@ -474,7 +474,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -500,7 +500,7 @@ try: ) print("The search response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling User.search: %s\n" % e) ``` diff --git a/docs/v2/Datasets/Branch.md b/docs/v2/Datasets/Branch.md index 648e0693c..a7b8a609d 100644 --- a/docs/v2/Datasets/Branch.md +++ b/docs/v2/Datasets/Branch.md @@ -28,7 +28,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -54,7 +54,7 @@ try: ) print("The create response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Branch.create: %s\n" % e) ``` @@ -91,7 +91,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -114,7 +114,7 @@ try: ) print("The delete response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Branch.delete: %s\n" % e) ``` @@ -151,7 +151,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -174,7 +174,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Branch.get: %s\n" % e) ``` @@ -211,7 +211,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -233,7 +233,7 @@ try: preview=preview, ): pprint(branch) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Branch.list: %s\n" % e) ``` @@ -271,7 +271,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -297,7 +297,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Branch.page: %s\n" % e) ``` diff --git a/docs/v2/Datasets/Dataset.md b/docs/v2/Datasets/Dataset.md index 3c9369e6b..29a173f1f 100644 --- a/docs/v2/Datasets/Dataset.md +++ b/docs/v2/Datasets/Dataset.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -48,7 +48,7 @@ try: ) print("The create response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Dataset.create: %s\n" % e) ``` @@ -83,7 +83,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -103,7 +103,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Dataset.get: %s\n" % e) ``` @@ -147,7 +147,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -185,7 +185,7 @@ try: ) print("The read_table response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Dataset.read_table: %s\n" % e) ``` diff --git a/docs/v2/Datasets/File.md b/docs/v2/Datasets/File.md index 5120f8684..7a93c5e49 100644 --- a/docs/v2/Datasets/File.md +++ b/docs/v2/Datasets/File.md @@ -47,7 +47,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -79,7 +79,7 @@ try: ) print("The content response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling File.content: %s\n" % e) ``` @@ -127,7 +127,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -156,7 +156,7 @@ try: ) print("The delete response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling File.delete: %s\n" % e) ``` @@ -211,7 +211,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -243,7 +243,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling File.get: %s\n" % e) ``` @@ -300,7 +300,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -331,7 +331,7 @@ try: start_transaction_rid=start_transaction_rid, ): pprint(file) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling File.list: %s\n" % e) ``` @@ -389,7 +389,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -424,7 +424,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling File.page: %s\n" % e) ``` @@ -477,7 +477,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -512,7 +512,7 @@ try: ) print("The upload response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling File.upload: %s\n" % e) ``` diff --git a/docs/v2/Datasets/Transaction.md b/docs/v2/Datasets/Transaction.md index 941015330..6fc765276 100644 --- a/docs/v2/Datasets/Transaction.md +++ b/docs/v2/Datasets/Transaction.md @@ -27,7 +27,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -50,7 +50,7 @@ try: ) print("The abort response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Transaction.abort: %s\n" % e) ``` @@ -88,7 +88,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -111,7 +111,7 @@ try: ) print("The commit response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Transaction.commit: %s\n" % e) ``` @@ -149,7 +149,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -175,7 +175,7 @@ try: ) print("The create response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Transaction.create: %s\n" % e) ``` @@ -234,7 +234,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -257,7 +257,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Transaction.get: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/Action.md b/docs/v2/OntologiesV2/Action.md index 1c482f840..4ba6c3e8a 100644 --- a/docs/v2/OntologiesV2/Action.md +++ b/docs/v2/OntologiesV2/Action.md @@ -35,7 +35,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -67,7 +67,7 @@ try: ) print("The apply response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Action.apply: %s\n" % e) ``` @@ -116,7 +116,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -151,7 +151,7 @@ try: ) print("The apply_batch response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Action.apply_batch: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/ActionTypeV2.md b/docs/v2/OntologiesV2/ActionTypeV2.md index b29feca82..43be43543 100644 --- a/docs/v2/OntologiesV2/ActionTypeV2.md +++ b/docs/v2/OntologiesV2/ActionTypeV2.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -46,7 +46,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ActionType.get: %s\n" % e) ``` @@ -87,7 +87,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -106,7 +106,7 @@ try: page_size=page_size, ): pprint(action_type) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ActionType.list: %s\n" % e) ``` @@ -148,7 +148,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -171,7 +171,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ActionType.page: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/Attachment.md b/docs/v2/OntologiesV2/Attachment.md index 26c1b829c..10a61b0b1 100644 --- a/docs/v2/OntologiesV2/Attachment.md +++ b/docs/v2/OntologiesV2/Attachment.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -42,7 +42,7 @@ try: ) print("The read response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Attachment.read: %s\n" % e) ``` @@ -87,7 +87,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -113,7 +113,7 @@ try: ) print("The upload response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Attachment.upload: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/AttachmentPropertyV2.md b/docs/v2/OntologiesV2/AttachmentPropertyV2.md index f75cf9992..40b1b5ab3 100644 --- a/docs/v2/OntologiesV2/AttachmentPropertyV2.md +++ b/docs/v2/OntologiesV2/AttachmentPropertyV2.md @@ -32,7 +32,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -64,7 +64,7 @@ try: ) print("The get_attachment response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling AttachmentProperty.get_attachment: %s\n" % e) ``` @@ -108,7 +108,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -143,7 +143,7 @@ try: ) print("The get_attachment_by_rid response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling AttachmentProperty.get_attachment_by_rid: %s\n" % e) ``` @@ -186,7 +186,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -218,7 +218,7 @@ try: ) print("The read_attachment response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling AttachmentProperty.read_attachment: %s\n" % e) ``` @@ -264,7 +264,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -299,7 +299,7 @@ try: ) print("The read_attachment_by_rid response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling AttachmentProperty.read_attachment_by_rid: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/LinkedObjectV2.md b/docs/v2/OntologiesV2/LinkedObjectV2.md index 054c78247..2d75b7cbd 100644 --- a/docs/v2/OntologiesV2/LinkedObjectV2.md +++ b/docs/v2/OntologiesV2/LinkedObjectV2.md @@ -35,7 +35,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -76,7 +76,7 @@ try: ) print("The get_linked_object response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling LinkedObject.get_linked_object: %s\n" % e) ``` @@ -134,7 +134,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -177,7 +177,7 @@ try: select=select, ): pprint(linked_object) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling LinkedObject.list_linked_objects: %s\n" % e) ``` @@ -236,7 +236,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -283,7 +283,7 @@ try: ) print("The page_linked_objects response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling LinkedObject.page_linked_objects: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/ObjectTypeV2.md b/docs/v2/OntologiesV2/ObjectTypeV2.md index 1539b7b66..9c009b706 100644 --- a/docs/v2/OntologiesV2/ObjectTypeV2.md +++ b/docs/v2/OntologiesV2/ObjectTypeV2.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -49,7 +49,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ObjectType.get: %s\n" % e) ``` @@ -89,7 +89,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -112,7 +112,7 @@ try: ) print("The get_outgoing_link_type response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ObjectType.get_outgoing_link_type: %s\n" % e) ``` @@ -154,7 +154,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -173,7 +173,7 @@ try: page_size=page_size, ): pprint(object_type) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ObjectType.list: %s\n" % e) ``` @@ -213,7 +213,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -235,7 +235,7 @@ try: page_size=page_size, ): pprint(object_type) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ObjectType.list_outgoing_link_types: %s\n" % e) ``` @@ -278,7 +278,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -301,7 +301,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ObjectType.page: %s\n" % e) ``` @@ -342,7 +342,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -368,7 +368,7 @@ try: ) print("The page_outgoing_link_types response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ObjectType.page_outgoing_link_types: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/OntologyInterface.md b/docs/v2/OntologiesV2/OntologyInterface.md index 823d4d393..1004cb7e4 100644 --- a/docs/v2/OntologiesV2/OntologyInterface.md +++ b/docs/v2/OntologiesV2/OntologyInterface.md @@ -33,7 +33,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -78,7 +78,7 @@ try: ) print("The aggregate response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyInterface.aggregate: %s\n" % e) ``` @@ -121,7 +121,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -144,7 +144,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyInterface.get: %s\n" % e) ``` @@ -190,7 +190,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -212,7 +212,7 @@ try: preview=preview, ): pprint(ontology_interface) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyInterface.list: %s\n" % e) ``` @@ -259,7 +259,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -285,7 +285,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyInterface.page: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/OntologyObjectSet.md b/docs/v2/OntologiesV2/OntologyObjectSet.md index f6aeaedad..1cdc1309b 100644 --- a/docs/v2/OntologiesV2/OntologyObjectSet.md +++ b/docs/v2/OntologiesV2/OntologyObjectSet.md @@ -30,7 +30,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -65,7 +65,7 @@ try: ) print("The aggregate response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObjectSet.aggregate: %s\n" % e) ``` @@ -103,7 +103,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -123,7 +123,7 @@ try: ) print("The create_temporary response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObjectSet.create_temporary: %s\n" % e) ``` @@ -160,7 +160,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -180,7 +180,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObjectSet.get: %s\n" % e) ``` @@ -230,7 +230,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -271,7 +271,7 @@ try: ) print("The load response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObjectSet.load: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/OntologyObjectV2.md b/docs/v2/OntologiesV2/OntologyObjectV2.md index b1ed9de15..e83896bd0 100644 --- a/docs/v2/OntologiesV2/OntologyObjectV2.md +++ b/docs/v2/OntologiesV2/OntologyObjectV2.md @@ -34,7 +34,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -82,7 +82,7 @@ try: ) print("The aggregate response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.aggregate: %s\n" % e) ``` @@ -121,7 +121,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -147,7 +147,7 @@ try: ) print("The count response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.count: %s\n" % e) ``` @@ -190,7 +190,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -225,7 +225,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.get: %s\n" % e) ``` @@ -281,7 +281,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -318,7 +318,7 @@ try: select=select, ): pprint(ontology_object) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.list: %s\n" % e) ``` @@ -375,7 +375,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -416,7 +416,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.page: %s\n" % e) ``` @@ -481,7 +481,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -525,7 +525,7 @@ try: ) print("The search response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling OntologyObject.search: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/OntologyV2.md b/docs/v2/OntologiesV2/OntologyV2.md index a3fc4cf9b..24a1bb500 100644 --- a/docs/v2/OntologiesV2/OntologyV2.md +++ b/docs/v2/OntologiesV2/OntologyV2.md @@ -23,7 +23,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -40,7 +40,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Ontology.get: %s\n" % e) ``` @@ -74,7 +74,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -91,7 +91,7 @@ try: ) print("The get_full_metadata response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Ontology.get_full_metadata: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/Query.md b/docs/v2/OntologiesV2/Query.md index 3a9abbb69..3c86bd4b5 100644 --- a/docs/v2/OntologiesV2/Query.md +++ b/docs/v2/OntologiesV2/Query.md @@ -30,7 +30,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -59,7 +59,7 @@ try: ) print("The execute response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Query.execute: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/QueryType.md b/docs/v2/OntologiesV2/QueryType.md index bd5e77e55..66f44fd0f 100644 --- a/docs/v2/OntologiesV2/QueryType.md +++ b/docs/v2/OntologiesV2/QueryType.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -46,7 +46,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling QueryType.get: %s\n" % e) ``` @@ -87,7 +87,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -106,7 +106,7 @@ try: page_size=page_size, ): pprint(query_type) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling QueryType.list: %s\n" % e) ``` @@ -148,7 +148,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -171,7 +171,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling QueryType.page: %s\n" % e) ``` diff --git a/docs/v2/OntologiesV2/TimeSeriesPropertyV2.md b/docs/v2/OntologiesV2/TimeSeriesPropertyV2.md index 5fa4544c5..1914bbf29 100644 --- a/docs/v2/OntologiesV2/TimeSeriesPropertyV2.md +++ b/docs/v2/OntologiesV2/TimeSeriesPropertyV2.md @@ -31,7 +31,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -63,7 +63,7 @@ try: ) print("The get_first_point response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling TimeSeriesPropertyV2.get_first_point: %s\n" % e) ``` @@ -106,7 +106,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -138,7 +138,7 @@ try: ) print("The get_last_point response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling TimeSeriesPropertyV2.get_last_point: %s\n" % e) ``` @@ -182,7 +182,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -221,7 +221,7 @@ try: ) print("The stream_points response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling TimeSeriesPropertyV2.stream_points: %s\n" % e) ``` diff --git a/docs/v2/Orchestration/Build.md b/docs/v2/Orchestration/Build.md index 5305e84c2..6c38afddd 100644 --- a/docs/v2/Orchestration/Build.md +++ b/docs/v2/Orchestration/Build.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -70,7 +70,7 @@ try: ) print("The create response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Build.create: %s\n" % e) ``` @@ -105,7 +105,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -125,7 +125,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Build.get: %s\n" % e) ``` diff --git a/docs/v2/Orchestration/Schedule.md b/docs/v2/Orchestration/Schedule.md index e0d45e052..bc59f9c64 100644 --- a/docs/v2/Orchestration/Schedule.md +++ b/docs/v2/Orchestration/Schedule.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -44,7 +44,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Schedule.get: %s\n" % e) ``` @@ -79,7 +79,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -99,7 +99,7 @@ try: ) print("The pause response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Schedule.pause: %s\n" % e) ``` @@ -134,7 +134,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -154,7 +154,7 @@ try: ) print("The run response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Schedule.run: %s\n" % e) ``` @@ -189,7 +189,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -209,7 +209,7 @@ try: ) print("The unpause response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Schedule.unpause: %s\n" % e) ``` diff --git a/docs/v2/ThirdPartyApplications/ThirdPartyApplication.md b/docs/v2/ThirdPartyApplications/ThirdPartyApplication.md index e2587413f..ae2109603 100644 --- a/docs/v2/ThirdPartyApplications/ThirdPartyApplication.md +++ b/docs/v2/ThirdPartyApplications/ThirdPartyApplication.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -41,7 +41,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling ThirdPartyApplication.get: %s\n" % e) ``` diff --git a/docs/v2/ThirdPartyApplications/Version.md b/docs/v2/ThirdPartyApplications/Version.md index 5559a5a2d..af4aa5756 100644 --- a/docs/v2/ThirdPartyApplications/Version.md +++ b/docs/v2/ThirdPartyApplications/Version.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -53,7 +53,7 @@ try: ) print("The delete response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Version.delete: %s\n" % e) ``` @@ -89,7 +89,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -116,7 +116,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Version.get: %s\n" % e) ``` @@ -154,7 +154,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -180,7 +180,7 @@ try: preview=preview, ): pprint(version) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Version.list: %s\n" % e) ``` @@ -219,7 +219,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -249,7 +249,7 @@ try: ) print("The page response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Version.page: %s\n" % e) ``` @@ -286,7 +286,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -316,7 +316,7 @@ try: ) print("The upload response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Version.upload: %s\n" % e) ``` diff --git a/docs/v2/ThirdPartyApplications/Website.md b/docs/v2/ThirdPartyApplications/Website.md index e9c36c956..b9ae317a8 100644 --- a/docs/v2/ThirdPartyApplications/Website.md +++ b/docs/v2/ThirdPartyApplications/Website.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -49,7 +49,7 @@ try: ) print("The deploy response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Website.deploy: %s\n" % e) ``` @@ -84,7 +84,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -106,7 +106,7 @@ try: ) print("The get response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Website.get: %s\n" % e) ``` @@ -141,7 +141,7 @@ Name | Type | Description | Notes | ```python from foundry.v2 import FoundryClient -from foundry import PalantirRPCException +import foundry from pprint import pprint foundry_client = FoundryClient( @@ -163,7 +163,7 @@ try: ) print("The undeploy response:\n") pprint(api_response) -except PalantirRPCException as e: +except foundry.PalantirRPCException as e: print("HTTP error when calling Website.undeploy: %s\n" % e) ``` diff --git a/docs/v2/geo/models/LinearRing.md b/docs/v2/geo/models/LinearRing.md index e03df8635..50a8bb4ae 100644 --- a/docs/v2/geo/models/LinearRing.md +++ b/docs/v2/geo/models/LinearRing.md @@ -15,7 +15,7 @@ clockwise. ## Type ```python -List[Position] +Annotated[List[Position], Len(min_length=4)] ``` diff --git a/docs/v2/geo/models/Position.md b/docs/v2/geo/models/Position.md index 3c7820381..dbe0ad6bb 100644 --- a/docs/v2/geo/models/Position.md +++ b/docs/v2/geo/models/Position.md @@ -18,7 +18,7 @@ elements MAY be ignored by parsers. ## Type ```python -List[Coordinate] +Annotated[List[Coordinate], Len(min_length=2, max_length=3)] ``` diff --git a/foundry/v2/admin/group.py b/foundry/v2/admin/group.py index 95b0459b0..ddc95ef4d 100644 --- a/foundry/v2/admin/group.py +++ b/foundry/v2/admin/group.py @@ -20,6 +20,7 @@ from typing import List from typing import Optional +from annotated_types import Len from pydantic import Field from pydantic import StrictInt from pydantic import StrictStr @@ -203,7 +204,7 @@ def get( @handle_unexpected def get_batch( self, - body: List[GetGroupsBatchRequestElementDict], + body: Annotated[List[GetGroupsBatchRequestElementDict], Len(min_length=1, max_length=500)], *, preview: Optional[PreviewMode] = None, request_timeout: Optional[Annotated[StrictInt, Field(gt=0)]] = None, @@ -213,7 +214,7 @@ def get_batch( The maximum batch size for this endpoint is 500. :param body: Body of the request - :type body: List[GetGroupsBatchRequestElementDict] + :type body: Annotated[List[GetGroupsBatchRequestElementDict], Len(min_length=1, max_length=500)] :param preview: preview :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. @@ -235,7 +236,9 @@ def get_batch( "Accept": "application/json", }, body=body, - body_type=List[GetGroupsBatchRequestElementDict], + body_type=Annotated[ + List[GetGroupsBatchRequestElementDict], Len(min_length=1, max_length=500) + ], response_type=GetGroupsBatchResponse, request_timeout=request_timeout, ), diff --git a/foundry/v2/admin/user.py b/foundry/v2/admin/user.py index 7e5e01e8c..648fabbd5 100644 --- a/foundry/v2/admin/user.py +++ b/foundry/v2/admin/user.py @@ -20,6 +20,7 @@ from typing import List from typing import Optional +from annotated_types import Len from pydantic import Field from pydantic import StrictInt from pydantic import validate_call @@ -137,7 +138,7 @@ def get( @handle_unexpected def get_batch( self, - body: List[GetUsersBatchRequestElementDict], + body: Annotated[List[GetUsersBatchRequestElementDict], Len(min_length=1, max_length=500)], *, preview: Optional[PreviewMode] = None, request_timeout: Optional[Annotated[StrictInt, Field(gt=0)]] = None, @@ -147,7 +148,7 @@ def get_batch( The maximum batch size for this endpoint is 500. :param body: Body of the request - :type body: List[GetUsersBatchRequestElementDict] + :type body: Annotated[List[GetUsersBatchRequestElementDict], Len(min_length=1, max_length=500)] :param preview: preview :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. @@ -169,7 +170,9 @@ def get_batch( "Accept": "application/json", }, body=body, - body_type=List[GetUsersBatchRequestElementDict], + body_type=Annotated[ + List[GetUsersBatchRequestElementDict], Len(min_length=1, max_length=500) + ], response_type=GetUsersBatchResponse, request_timeout=request_timeout, ), diff --git a/foundry/v2/geo/models/_linear_ring.py b/foundry/v2/geo/models/_linear_ring.py index 2e493efac..7c035d6de 100644 --- a/foundry/v2/geo/models/_linear_ring.py +++ b/foundry/v2/geo/models/_linear_ring.py @@ -17,9 +17,12 @@ from typing import List +from annotated_types import Len +from typing_extensions import Annotated + from foundry.v2.geo.models._position import Position -LinearRing = List[Position] +LinearRing = Annotated[List[Position], Len(min_length=4)] """ A linear ring is a closed LineString with four or more positions. diff --git a/foundry/v2/geo/models/_position.py b/foundry/v2/geo/models/_position.py index dc63ae3de..44f7f6212 100644 --- a/foundry/v2/geo/models/_position.py +++ b/foundry/v2/geo/models/_position.py @@ -17,9 +17,12 @@ from typing import List +from annotated_types import Len +from typing_extensions import Annotated + from foundry.v2.geo.models._coordinate import Coordinate -Position = List[Coordinate] +Position = Annotated[List[Coordinate], Len(min_length=2, max_length=3)] """ GeoJSon fundamental geometry construct. diff --git a/pyproject.toml b/pyproject.toml index 227046402..3379f8a7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,7 @@ python = "^3.9" requests = "^2.25.0" pydantic = "^2.1.0" typing-extensions = ">=4.7.1" +annotated-types = ">=0.7.0" [tool.poetry.extras] cli = ["click"]