Metadata-Version: 2.5
Name: langchain-playstore
Version: 0.1.0
Summary: LangChain retriever integration for Google Play Store — fetch app details and retrieve user reviews.
Project-URL: Homepage, https://github.com/urraf/langchain-playstore
Project-URL: Repository, https://github.com/urraf/langchain-playstore
Project-URL: Documentation, https://github.com/urraf/langchain-playstore#readme
Project-URL: Bug Tracker, https://github.com/urraf/langchain-playstore/issues
Author: Farhan
License-Expression: MIT
License-File: LICENSE
Keywords: ai,google play,langchain,llm,playstore,rag,retriever,reviews
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: google-play-scraper>=1.2.4
Requires-Dist: langchain-core>=0.2.0
Provides-Extra: dev
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Description-Content-Type: text/markdown

# 🚀 langchain-playstore

[![PyPI version](https://badge.fury.io/py/langchain-playstore.svg)](https://badge.fury.io/py/langchain-playstore)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**LangChain retrievers for the Google Play Store** — fetch app details and retrieve user reviews as LangChain `Document` objects. **No API keys required**.

Perfect for building RAG applications that can analyze app store feedback, monitor sentiment, or scrape competitor features.

## ✨ Features

| Retriever | What it does | API Key Required? |
|---|---|---|
| `PlayStoreAppRetriever` | Fetch full metadata/details of an app | ❌ No! |
| `PlayStoreReviewsRetriever` | Fetch user reviews for an app | ❌ No! |

## 📦 Installation

```bash
pip install langchain-playstore
```

## 🚀 Quick Start

### Fetch App Details

```python
from langchain_playstore import PlayStoreAppRetriever

retriever = PlayStoreAppRetriever(
    lang="en",      # Default is "en"
    country="us"    # Default is "us"
)

# You can pass the app package ID or a full Play Store URL
docs = retriever.invoke("com.google.android.youtube")

app_metadata = docs[0].metadata
print(f"Name: {app_metadata['title']}")
print(f"Developer: {app_metadata['developer']}")
print(f"Score: {app_metadata['score']} / 5.0")
print(f"Installs: {app_metadata['installs']}")
```

### Fetch App Reviews

```python
from langchain_playstore import PlayStoreReviewsRetriever

retriever = PlayStoreReviewsRetriever(
    lang="en",
    country="us",
    max_results=5,
    sort="helpfulness", # "helpfulness", "newest", "rating"
)

docs = retriever.invoke("https://play.google.com/store/apps/details?id=com.whatsapp")

for doc in docs:
    print(f"⭐ {doc.metadata['score']} / 5")
    print(f"💬 {doc.page_content}")
    print(f"👍 {doc.metadata['thumbs_up']} upvotes\n")
```

## 📄 License

MIT — see [LICENSE](LICENSE) for details.
