replicate-python  by replicate

Python SDK for Replicate

Created 3 years ago
867 stars

Top 41.4% 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

3 weeks ago

Responsiveness

1 day

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

Explore Similar Projects

Starred by Adam Wolff Adam Wolff(Claude Code Core; MTS at Anthropic), Samuel Colvin Samuel Colvin(Founder and Author of Pydantic), and
5 more.

anthropic-sdk-python by anthropics

0.5%
2k
Python SDK for Anthropic's REST API
Created 2 years ago
Updated 1 day ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Gregor Zunic Gregor Zunic(Cofounder of Browser Use), and
2 more.

airweave by airweave-ai

0.5%
3k
Semantic MCP server for AI agents
Created 8 months ago
Updated 16 hours ago
Feedback? Help us improve.