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
{{ message }}
This repository was archived by the owner on Apr 29, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+52-21
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Simpletool
2
2
3
-
SimpleTool is a lightweight, async-first Python framework designed for creating simple, strict, and explicit type-safe tools with minimal complexity. It embodies some of the Python design Zen principles, such as "Simple is better than complex" and "Explicit is better than implicit".
3
+
SimpleTool is a lightweightPython framework designed for creating simple, strict, and explicit type-safe tools with minimal complexity. It supports both synchronous and asynchronous execution patterns, with the async functionality available in the dedicated `simpletool.asyncio` module. It embodies some of the Python design Zen principles, such as "Simple is better than complex" and "Explicit is better than implicit".
4
4
5
-
## ⚠️ Disclaimer [2025-01]
5
+
## ⚠️ Disclaimer [2025-03]
6
6
7
7
* 🛠️ __Under active development__: Expect frequent updates, bugs, and breaking changes.
8
8
* 🤓 __Check the release notes__: Always check the [release notes](./CHANGELOG.md) to verify if there are any breaking changes.
@@ -12,19 +12,14 @@ SimpleTool is a lightweight, async-first Python framework designed for creating
12
12
Simpletool is a powerful SDK that provides a structured approach to building tools with:
13
13
- Standardized input and output content types
14
14
- Automatic JSON schema generation
15
-
-Async support
15
+
-Both synchronous and asynchronous support
16
16
- Environment variable handling
17
-
- Timeout management (def. 60s)
18
-
19
-
20
-
21
-
## 💬 Example
22
-
Check out the [tool_example.py](./tool_example.py) to see how to use Simpletool to create a simple, type-safe tool.
@@ -101,16 +110,17 @@ The `SimpleTool` class provides a robust framework for building tools with the f
101
110
102
111
- Input model needs to be defined as child of `SimpleInputModel` Type and assign to `input_model` attribute inside `SimpleTool` - them magic begins and automaticly:
103
112
- Automatically creates output JSON schemas (`output_schema` / `output_model`) based on the defined `run` method typing
104
-
- Automatically creates input JSON schemas (`input_schem`a) based on the input model
113
+
- Automatically creates input JSON schemas (`input_schema`) based on the input model
105
114
106
-
-**Async Execution**:
107
-
- Native async/await support
115
+
-**Execution Models**:
116
+
-**Synchronous Execution**: Default mode with the standard `run` method
117
+
-**Asynchronous Execution**: Available via the `simpletool.asyncio` module with the `AsyncSimpleTool` class
108
118
- Configurable timeout management
109
-
-Contex manager for easy resource management release
119
+
-Context manager for easy resource management release
110
120
111
121
-**Environment Integration**:
112
-
- Easy retrieval of environment variables (`get_env`)
113
-
- Support for random API key selection from provided list (`get_env`)
122
+
- Easy retrieval of environment variables via the `env` parameter
123
+
- Support for random API key selection from provided list of API keys
114
124
115
125
### Content Types
116
126
@@ -133,7 +143,7 @@ pip install simpletool
133
143
134
144
## 🔄 Quick Start
135
145
136
-
### 🛠️ Creating a Tool
146
+
### 🛠️ Creating a Synchronous Tool
137
147
138
148
```python
139
149
from simpletool import SimpleTool, SimpleInputModel, Sequence, Field
0 commit comments