replicate-python  by replicate

Python SDK for Replicate

created 3 years ago
850 stars

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

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
2
Star History
29 stars in the last 90 days

Explore Similar Projects

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

anthropic-sdk-python by anthropics

0.7%
2k
Python SDK for Anthropic's REST API
created 2 years ago
updated 22 hours ago
Feedback? Help us improve.