replicate-python  by replicate

Python SDK for Replicate

Created 3 years ago
877 stars

Top 41.0% on SourcePulse

GitHubView on GitHub
Project Summary

This Python client library enables seamless integration with the Replicate platform, allowing developers to run machine learning models directly from their Python code or Jupyter notebooks. It provides a high-level API for executing predictions, streaming outputs, managing predictions, and interacting with models and collections on Replicate.

How It Works

The client leverages HTTP requests to interact with the Replicate API. Key features include synchronous and asynchronous execution of models, with support for streaming output via Server-Sent Events (SSE) for real-time results. A notable design choice is the introduction of FileOutput objects, which provide an iterable interface for efficient handling of model outputs, particularly files, improving performance and developer experience.

Quick Start & Requirements

Highlighted Details

  • Supports both synchronous and asynchronous model execution.
  • Enables streaming of model outputs for real-time consumption.
  • Introduces FileOutput objects for efficient file handling.
  • Allows background prediction execution with webhook notifications.
  • Facilitates model composition for creating prediction pipelines.

Maintenance & Community

The project is maintained by Replicate. Further community interaction details are not explicitly provided in the README.

Licensing & Compatibility

The README does not specify a license. Compatibility for commercial use or closed-source linking is not detailed.

Limitations & Caveats

The FileOutput.read() method does not currently accept a size argument. The README also notes that the url attribute of FileOutput may not always return HTTP URLs in future versions, recommending the use of iterator or read() methods.

Health Check
Last Commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
1
Star History
7 stars in the last 30 days

Explore Similar Projects

Starred by Assaf Elovic Assaf Elovic(Cofounder of Tavily), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
3 more.

airweave by airweave-ai

1.4%
4k
Semantic MCP server for AI agents
Created 10 months ago
Updated 9 hours ago
Feedback? Help us improve.