Metaphor-python is a Python client library for interacting with the Metaphor API, a search engine optimized for Large Language Models (LLMs). It enables neural search and content retrieval, providing clean HTML content from search results. The library is currently at version 0.1.23 and is under active development, indicated by its 'Alpha' status on PyPI. While no explicit release cadence is documented, updates are released as new features and improvements to the Metaphor API are made available.
pip install metaphor-pythonVerified import paths — ran on the pinned version, not inferred.
Initializes the Metaphor client using an API key from an environment variable and performs a basic search query, printing the title, URL, and a snippet of the content for the top results.
Ensure the 'METAPHOR_API_KEY' environment variable is correctly set with your valid API key before initializing the Metaphor client. Alternatively, pass the key directly to the `Metaphor()` constructor: `metaphor = Metaphor(api_key='your_key')`.
Monitor the official GitHub repository for changes and consult release notes (if available) when upgrading to new versions. Pin the version of `metaphor-python` in your `requirements.txt` to avoid unexpected breakage.
Verify that your `METAPHOR_API_KEY` environment variable holds the correct and active API key obtained from the Metaphor website. Re-initialize the `Metaphor` client after updating the key.
Consult the official Metaphor API documentation and the `metaphor-python` library's source or examples to ensure you are using the correct method names and arguments. The main methods are `search()`, `find_similar()`, and `get_contents()` (from the search results).
No dependency data recorded yet.