mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-06 13:30:41 +02:00
docs: updates documentation
This commit is contained in:
parent
bd6220cb9e
commit
9e852c17ac
19
README.md
19
README.md
@ -14,6 +14,7 @@
|
|||||||
- [Connecting to the Service via Python Client](#connecting-to-the-service-via-python-client)
|
- [Connecting to the Service via Python Client](#connecting-to-the-service-via-python-client)
|
||||||
- [Tab Completion Support](#tab-completion-support)
|
- [Tab Completion Support](#tab-completion-support)
|
||||||
- [Integration within Another Service](#integration-within-another-service)
|
- [Integration within Another Service](#integration-within-another-service)
|
||||||
|
- [RESTful API](#restful-api)
|
||||||
- [Understanding the Component System](#understanding-the-component-system)
|
- [Understanding the Component System](#understanding-the-component-system)
|
||||||
- [Built-in Type and Enum Components](#built-in-type-and-enum-components)
|
- [Built-in Type and Enum Components](#built-in-type-and-enum-components)
|
||||||
- [Method Components](#method-components)
|
- [Method Components](#method-components)
|
||||||
@ -209,6 +210,24 @@ In this setup, the `MyService` class has a `proxy` attribute that connects to a
|
|||||||
The `block_until_connected=False` argument allows the service to start up even if the initial connection attempt fails.
|
The `block_until_connected=False` argument allows the service to start up even if the initial connection attempt fails.
|
||||||
This configuration is particularly useful in distributed systems where services may start in any order.
|
This configuration is particularly useful in distributed systems where services may start in any order.
|
||||||
|
|
||||||
|
### RESTful API
|
||||||
|
The `pydase` RESTful API allows for standard HTTP-based interactions and provides access to various functionalities through specific routes.
|
||||||
|
|
||||||
|
For example, you can get a value like this:
|
||||||
|
|
||||||
|
```python
|
||||||
|
import json
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
response = requests.get(
|
||||||
|
"http://<hostname>:<port>/api/v1/get_value?access_path=<full_access_path>"
|
||||||
|
)
|
||||||
|
serialized_value = json.loads(response.text)
|
||||||
|
```
|
||||||
|
|
||||||
|
For more information, see [here](https://pydase.readthedocs.io/en/stable/user-guide/interaction/main/#restful-api).
|
||||||
|
|
||||||
<!--usage-end-->
|
<!--usage-end-->
|
||||||
|
|
||||||
## Understanding the Component System
|
## Understanding the Component System
|
||||||
|
@ -2,13 +2,21 @@
|
|||||||
|
|
||||||
The `pydase` RESTful API allows for standard HTTP-based interactions and provides access to various functionalities through specific routes. This is particularly useful for integrating `pydase` services with other applications or for scripting and automation.
|
The `pydase` RESTful API allows for standard HTTP-based interactions and provides access to various functionalities through specific routes. This is particularly useful for integrating `pydase` services with other applications or for scripting and automation.
|
||||||
|
|
||||||
|
For example, you can get a value like this:
|
||||||
|
|
||||||
|
```python
|
||||||
|
import json
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
response = requests.get(
|
||||||
|
"http://<hostname>:<port>/api/v1/get_value?access_path=<full_access_path>"
|
||||||
|
)
|
||||||
|
serialized_value = json.loads(response.text)
|
||||||
|
```
|
||||||
|
|
||||||
To help developers understand and utilize the API, we provide an OpenAPI specification. This specification describes the available endpoints and corresponding request/response formats.
|
To help developers understand and utilize the API, we provide an OpenAPI specification. This specification describes the available endpoints and corresponding request/response formats.
|
||||||
|
|
||||||
## OpenAPI Specification
|
## OpenAPI Specification
|
||||||
**Base URL**:
|
|
||||||
|
|
||||||
```
|
|
||||||
http://<hostname>:<port>/api/
|
|
||||||
```
|
|
||||||
|
|
||||||
<swagger-ui src="./openapi.yaml"/>
|
<swagger-ui src="./openapi.yaml"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user