https://github.com/daedalus/execd
https://github.com/daedalus/execd
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/daedalus/execd
- Owner: daedalus
- License: mit
- Created: 2026-05-07T19:40:08.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2026-05-08T13:45:22.000Z (about 2 months ago)
- Last Synced: 2026-05-08T14:33:42.660Z (about 2 months ago)
- Language: Python
- Size: 25.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
**execd** — HTTP REST API execution daemon with Python client library.
[](https://pypi.org/project/execd/)
[](https://pypi.org/project/execd/)
[](https://codecov.io/gh/daedalus/execd)
[](https://github.com/astral-sh/ruff)
[](https://deepwiki.com/daedalus/execd)
## Install
```bash
pip install execd
```
## Usage
### Start the Server
```bash
execd-server --host localhost --port 8080
```
### Use the Client
```python
from execd import ExecClient
client = ExecClient(host="localhost", port=8080)
# Submit a task
task_id = client.submit_task("print('hello world')")
# Wait for completion
task = client.wait_for_task(task_id)
print(task["status"]) # "completed"
print(task["result"]) # "Executed: print('hello world')"
# Get task status
task = client.get_task(task_id)
# Delete task
client.delete_task(task_id)
```
### CLI Client
```bash
# Submit a task
execd-client submit "print('hello')"
# Get task status
execd-client get
# Delete a task
execd-client delete
```
## API
### REST Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/tasks` | POST | Submit a new task |
| `/tasks/{id}` | GET | Get task status and result |
| `/tasks/{id}` | DELETE | Cancel/remove a task |
### Python API
- `ExecServer(host, port)` - HTTP REST API server
- `ExecClient(host, port)` - Client for interacting with server
- `submit_task(code)` - Submit task, returns task_id
- `get_task(task_id)` - Get task status
- `delete_task(task_id)` - Delete task
- `wait_for_task(task_id, timeout)` - Wait for task completion
## Development
```bash
git clone https://github.com/daedalus/execd.git
cd execd
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint + type check (prospector runs ruff check + mypy together)
prospector --with-tool ruff --with-tool mypy src/
semgrep --config=auto --severity=ERROR src/
```