Skip to content

Commit 3c4162d

Browse files
committed
Added usage to the example
1 parent 7c6e701 commit 3c4162d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ class CodeExecClient(APIClient):
2828
# Also note the / prefix in the url
2929
return Post("/execute", params={'lang':language, 'code':code})
3030

31+
32+
# Using the API client
33+
from httpx import Client
34+
client = CodeExecClient(session=Client())
35+
response = client.run("py", "print('hello world!')")
36+
3137
```
3238

3339
## Documentation is under works

0 commit comments

Comments
 (0)