dedalus-sdk-python  by dedalus-labs

Python SDK for AI API interaction

Created 3 months ago
520 stars

Top 60.4% on SourcePulse

GitHubView on GitHub
Project Summary

The Dedalus Python SDK offers a streamlined interface to the Dedalus REST API for Python 3.8+ applications. It provides both synchronous and asynchronous clients, leveraging httpx and generated with Stainless for robust type safety and comprehensive API coverage. This SDK simplifies integration, enabling developers to efficiently utilize Dedalus services.

How It Works

The SDK acts as a typed wrapper around the Dedalus REST API, utilizing httpx for HTTP communication. It supports both synchronous and asynchronous operations, with the latter offering an optional aiohttp backend for enhanced concurrency. Generated with Stainless, the library provides Pydantic models for responses and TypedDicts for requests, enhancing developer experience through autocompletion and static analysis.

Quick Start & Requirements

  • Installation: pip install --pre dedalus_labs (Note: --pre indicates pre-release).
  • Prerequisites: Python 3.8+. An API key is required, recommended via DEDALUS_API_KEY environment variable or .env file.
  • Documentation: REST API docs at docs.dedaluslabs.ai; library API in api.md.
  • Optional: pip install --pre dedalus_labs[aiohttp] for aiohttp integration.

Highlighted Details

  • Dual sync/async clients powered by httpx (or aiohttp).
  • Comprehensive error handling with specific APIConnectionError and APIStatusError subclasses.
  • Automatic retries (default 2x) with exponential backoff for transient network and server errors.
  • Configurable timeouts (default 1 min) and retry counts (max_retries).
  • Supports streaming responses via Server-Sent Events (SSE).
  • Handles file uploads using bytes, PathLike, or (filename, content, media_type) tuples.
  • Typed requests/responses (Pydantic, TypedDict) improve developer experience and catch errors early.
  • Advanced features include raw response access, custom request capabilities, and HTTP client configuration (proxies, transports).

Maintenance & Community

The project encourages contributions via its contributing documentation. Versioning generally follows SemVer, with notes on specific exceptions for minor version releases. Feedback is welcomed via GitHub issues. No specific community channels (e.g., Discord, Slack) are listed.

Licensing & Compatibility

The license type is not explicitly stated in the README, which may require further investigation for commercial use or closed-source integration.

Limitations & Caveats

The --pre flag in the installation command suggests the library may be in a pre-release state. The absence of explicit licensing information is a potential adoption blocker. While SemVer is generally followed, certain backwards-incompatible changes might be released as minor versions.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
5
Issues (30d)
0
Star History
714 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.