Skip to content

Commit c13e464

Browse files
authored
DOCS-3578: Add custom API imports note (#4081)
1 parent 7ca4012 commit c13e464

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/operate/reference/advanced-modules/create-subtype.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,15 @@ Now that your resource API is defined, create a new model that implements your n
106106

107107
{{% /manualcard %}}
108108
{{< /cards >}}
109+
110+
{{% alert title="Note" color="note" %}}
111+
112+
After you define a new API and create a model that implements it, keep the following in mind when writing code against your new API:
113+
114+
- You can't use [SDKs](/dev/reference/sdks/) to call your new API unless you build out the client to support it.
115+
It is easiest to write code against your new API in the language you used to define it.
116+
- Since your API doesn't have built-in SDK support, you'll need a local copy of the module code on whatever machine is running client code against it.
117+
- Be sure to import the API definition from the module directory, for example in Python it would be of the form `from path.to.module.src.gizmo import Gizmo`.
118+
This example module written in Python uses a [Python script](https://github.com/viamrobotics/viam-python-sdk/blob/main/examples/complex_module/client.py) to call the custom API from within the module directory.
119+
120+
{{% /alert %}}

0 commit comments

Comments
 (0)