Skip to content

Commit

Permalink
Add README of example directory (#2383)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._

### Type of change

- [x] Documentation Update

---------

Signed-off-by: Jin Hai <[email protected]>
Co-authored-by: writinwaters <[email protected]>
  • Loading branch information
JinHai-CN and writinwaters authored Dec 17, 2024
1 parent a76149c commit 2d92dcb
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Examples

## Python SDK examples

The Python scripts in the current directory provides the examples of the infinity SDK API. Before running these scripts, please ensure that the correct version of infinity SDK is installed. If you are using the server version of Infinity, you can use the following command to install it

```shell
pip install infinity-sdk==0.5.0.dev7
```

To use Infinity locally as a Python module, install the Infinity Embedded SDK:

```shell
pip install infinity-embedded-sdk==0.5.0.dev7
```

Once the installation completes, run some simple examples:

```shell
python simple_example.py
```

## HTTP examples

We provide several SHELL scripts in the **/example/http** directory, and you need to install `curl` to run these scripts. For Debian or Ubuntu users, use the following command:

```shell
sudo apt install curl
```

The HTTP APIs work only with the Infinity server. Ensure that an Infinity server is running properly before executing these scripts:

```shell
bash http/create_list_show_database.sh
```

0 comments on commit 2d92dcb

Please sign in to comment.