mag-safe-finder recommends the perfect MagSafe cable based on your inputs, highlighting compatibility, pros/cons, and care tips.
Project description
Mag-Safe-Finder
A Python package that helps users find the perfect replacement for their lost or damaged MagSafe cable. The package processes user input to generate a structured list of recommended MagSafe cables, highlighting key features, compatibility, and potential drawbacks. It also provides troubleshooting tips and maintenance advice.
Installation
You can install the package via pip:
pip install mag_safe_finder
Usage
Here's a basic example of how to use the package:
from mag_safe_finder import mag_safe_finder
user_input = "I need a durable MagSafe cable for my MacBook Pro that won't fray easily."
response = mag_safe_finder(user_input=user_input)
print(response)
Using a Custom LLM
By default, the package uses ChatLLM7 from langchain_llm7 (see PyPI). However, you can pass your own LangChain-compatible LLM instance (based on LangChain documentation):
Using OpenAI
from langchain_openai import ChatOpenAI
from mag_safe_finder import mag_safe_finder
llm = ChatOpenAI()
response = mag_safe_finder(user_input="Your input here", llm=llm)
Using Anthropic
from langchain_anthropic import ChatAnthropic
from mag_safe_finder import mag_safe_finder
llm = ChatAnthropic()
response = mag_safe_finder(user_input="Your input here", llm=llm)
Using Google Generative AI
from langchain_google_genai import ChatGoogleGenerativeAI
from mag_safe_finder import mag_safe_finder
llm = ChatGoogleGenerativeAI()
response = mag_safe_finder(user_input="Your input here", llm=llm)
Parameters
user_input(str): The user input text to process.llm(Optional[BaseChatModel]): The LangChain LLM instance to use. If not provided, the defaultChatLLM7will be used.api_key(Optional[str]): The API key for LLM7. If not provided, the package will try to use theLLM7_API_KEYenvironment variable.
API Key for LLM7
The default rate limits for LLM7 free tier are sufficient for most use cases. If you need higher rate limits, you can:
- Set the
LLM7_API_KEYenvironment variable, or - Pass the API key directly:
mag_safe_finder(..., api_key="your_api_key")
You can get a free API key by registering at https://token.llm7.io/.
Issues
If you encounter any issues or have feature requests, please open an issue on GitHub.
Author
- Eugene Evstafev - hi@euegne.plus
- GitHub: chigwell
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mag_safe_finder-2025.12.21232119.tar.gz.
File metadata
- Download URL: mag_safe_finder-2025.12.21232119.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f07390eaa4580f332b1ebd8ecc476fe69e14e59d71734ca8e647191795ee06d3
|
|
| MD5 |
ba75051b8aeec4c15640e5953b4652f7
|
|
| BLAKE2b-256 |
f99775d065c99ca85c7164625b121da67f091919d405e2cb528ca02a7416839e
|
File details
Details for the file mag_safe_finder-2025.12.21232119-py3-none-any.whl.
File metadata
- Download URL: mag_safe_finder-2025.12.21232119-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
769bd19a534dfff16fda4c7c92be0ee08a1431af7dde730d1c082e7d03129504
|
|
| MD5 |
c93603c4000bb9cc8ee31edae80cbdfb
|
|
| BLAKE2b-256 |
76681a55c9e841808f45a0524a91ae21a367bf0579a46934cd8cc770fdcb9cff
|