You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/doc_entrypoint.md
+34-16Lines changed: 34 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,29 +21,43 @@ You can install `osparc` directly from PyPI:
21
21
pip install osparc
22
22
```
23
23
24
-
## Usage
25
24
26
-
To get started with `osparc`, import the package and follow the examples in the [documentation](https://github.com/your-username/osparc/wiki).
25
+
## Getting Started with `osparc`
27
26
27
+
To begin using `osparc`, simply import the package and refer to the detailed examples provided in the [official documentation](https://github.com/your-username/osparc/wiki).
28
28
29
-
```python
30
-
from osparc import ApiClient, UsersApi
29
+
### API Key/Secret Setup
30
+
31
+
Before interacting with the osparc API, you need to generate an API key-secret pair from your osparc account. Follow the [instructions here](https://docs.osparc.io/#/docs/platform_introduction/profile?id=preferences) to create the key and secret.
32
+
33
+
Once generated, you can configure them by either:
34
+
35
+
1. Setting environment variables:
36
+
-`OSPARC_API_KEY`
37
+
-`OSPARC_API_SECRET`
38
+
39
+
Or,
40
+
41
+
2. Explicitly creating a `osparc.Configuration` instance and passing it to the `osparc.ApiClient`.
31
42
32
-
cfg = Configuration(
33
-
host=os.environ["OSPARC_API_HOST"],
34
-
username=os.environ["OSPARC_API_KEY"],
35
-
password=os.environ["OSPARC_API_SECRET"],
36
-
)
43
+
### Minimal Example
37
44
38
-
withApiClient(cfg) as api_client:
45
+
Here’s a minimal script demonstrating how to interact with the osparc API to retrieve your user profile:
0 commit comments