From b6d06903bc4a970bfaf4d76442877b0f32e48774 Mon Sep 17 00:00:00 2001 From: Alexandre Henrique Afonso Campos Date: Sat, 10 Aug 2024 20:20:29 -0300 Subject: [PATCH] Add instructions for testing server --- test-server/.gitignore | 1 + test-server/README.md | 34 ++++++++++++++++++++++++++++++++++ test-server/requirements.txt | 1 + 3 files changed, 36 insertions(+) create mode 100644 test-server/.gitignore create mode 100644 test-server/README.md create mode 100644 test-server/requirements.txt diff --git a/test-server/.gitignore b/test-server/.gitignore new file mode 100644 index 00000000..f7275bbb --- /dev/null +++ b/test-server/.gitignore @@ -0,0 +1 @@ +venv/ diff --git a/test-server/README.md b/test-server/README.md new file mode 100644 index 00000000..8b57ef08 --- /dev/null +++ b/test-server/README.md @@ -0,0 +1,34 @@ +# Test Server + +This is the testing server for swarms. You can use this server to mock rest calls. You can replace any agent that has rest calls with this. Even if the agent has a client (SDK), in the end of the day it may expose a REST API for interaction. + +## Requirements + +- [Pip](https://pypi.org/project/pip/) +- [venv](https://docs.python.org/3/library/venv.html) + +## Get started + +Make sure you are in the `test-server` folder. + +- Create a virtual environment + +```bash +$ python -m venv venv +``` + +If you are using Windows, use `c:\>python -m venv c:\path\to\myenv`. + +- Active it + +```bash +$ source venv/bin/activate +``` + +or `C:\> \Scripts\activate.bat` where `` is the same as `c:\path\to\myenv`. + +- Install dependencies + +```bash +$ pip install -r requirements.txt +``` diff --git a/test-server/requirements.txt b/test-server/requirements.txt new file mode 100644 index 00000000..13712cc1 --- /dev/null +++ b/test-server/requirements.txt @@ -0,0 +1 @@ +fastapi[standard]