https://github.com/graycodeai/hawk-sdk-python
Python SDK for the Hawk AI coding agent
https://github.com/graycodeai/hawk-sdk-python
Last synced: 27 days ago
JSON representation
Python SDK for the Hawk AI coding agent
- Host: GitHub
- URL: https://github.com/graycodeai/hawk-sdk-python
- Owner: GrayCodeAI
- License: mit
- Created: 2026-05-14T15:59:38.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-06-07T09:32:01.000Z (28 days ago)
- Last Synced: 2026-06-07T11:17:43.416Z (28 days ago)
- Language: Python
- Size: 172 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
Hawk SDK for Python
Official Python client for the Hawk daemon API
---
The Hawk SDK for Python provides an idiomatic client for interacting with the [Hawk](https://github.com/GrayCodeAI/hawk) daemon API. It supports both synchronous and async operations, including streaming.
## Features
- **Sync and async** - Use `HawkClient` or `AsyncHawkClient`
- **Streaming support** - Real-time response streaming
- **Context managers** - Automatic resource cleanup
- **Type hints** - Full type annotations for IDE support
- **Error handling** - Detailed exception types
## Installation
```bash
pip install hawk-sdk
```
## Quick Start
```python
from hawk import HawkClient
with HawkClient() as client:
# Health check
health = client.health()
print(f"Version: {health.version}")
# Chat
response = client.chat("Explain decorators in Python")
print(response.response)
```
## Async Usage
```python
from hawk import AsyncHawkClient
async with AsyncHawkClient() as client:
response = await client.chat("Hello!")
print(response.response)
```
## Streaming
```python
with HawkClient() as client:
with client.chat_stream("Write a haiku") as stream:
for event in stream.events():
print(event.data, end="", flush=True)
```
## Examples
See the [examples/](examples/) directory for complete runnable examples.
## Contributing
Contributions are welcome — please read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request.
## License
MIT - see [LICENSE](LICENSE) for details.