# TOROB Client
![PyPI](https://img.shields.io/pypi/v/torob-client)
![Daily Downloads](https://img.shields.io/pypi/dd/torob-client)
![Monthly Downloads](https://img.shields.io/pypi/dm/torob-client)
[![Telegram-Channel](https://img.shields.io/badge/Telegram--Channel-Ahura_Rahmani-blue)](https://t.me/Ahur4_Rahmani)
A Python client for interacting with the Torob API to fetch products data.
Here's a sample README for your Torob API client:
---
# Torob API Client
A Python client for interacting with the Torob API to fetch product data efficiently and easily.
## Features
- Fetch product suggestions
- Search for products with pagination
- Retrieve detailed information about specific products
- Access special offers
- Get price chart data for products
- Find similar products based on product keys
## Installation
To install the required dependencies, you can use pip:
```bash
pip install torob-client
```
## Usage
To use the Torob API Client, first, create an instance of the `Torob` class, and then call the desired method. Here’s a quick example:
```python
from torob_client import Torob
# Create an instance of the Torob client
client = Torob()
# Fetch product details
data = client.details("223801ab-2f16-4e27-96bd-83f653dd3e45", 5000)
print(data)
```
## Available Methods
### 1. `suggestion(q: str) -> dict`
Fetch product suggestions based on a query string.
**Parameters:**
- `q`: The query string to search for suggestions.
**Returns:**
- A dictionary containing the suggestion results.
### 2. `search(q: str, page: int = 0) -> dict`
Fetch paginated product search results.
**Parameters:**
- `q`: The query string to search for products.
- `page`: Page number for paginated results (default is 0).
**Returns:**
- A dictionary containing the search results.
### 3. `details(prk: str, search_id: int) -> dict`
Fetch detailed information for a specific product.
**Parameters:**
- `prk`: Product key identifier.
- `search_id`: Search identifier for the product.
**Returns:**
- A dictionary containing the product details.
### 4. `special_offers(page: int = 0) -> dict`
Fetch special offers with optional pagination.
**Parameters:**
- `page`: Page number for paginated results (default is 0).
**Returns:**
- A dictionary containing the special offers.
### 5. `price_chart(prk: str, search_id: int) -> dict`
Fetch price chart data for a specific product.
**Parameters:**
- `prk`: Product key identifier.
- `search_id`: Search identifier for the product.
**Returns:**
- A dictionary containing the price chart data.
### 6. `similar_product(prk: str, limit: int) -> dict`
Fetch similar products based on a product key.
**Parameters:**
- `prk`: Product key identifier.
- `limit`: Maximum number of similar products to retrieve.
**Returns:**
- A dictionary containing the similar products.
## Contributing
If you'd like to contribute to this project, feel free to fork the repository and submit a pull request. Your contributions are welcome!
---
Raw data
{
"_id": null,
"home_page": "https://github.com/ahur4/torob-client",
"name": "torob-client",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "webscraping, crawling, data science, data analyse",
"author": "Ahur4",
"author_email": "ahur4.rahmani@gmail.com",
"download_url": null,
"platform": null,
"description": "\r\n# TOROB Client\r\n\r\n![PyPI](https://img.shields.io/pypi/v/torob-client)\r\n![Daily Downloads](https://img.shields.io/pypi/dd/torob-client)\r\n![Monthly Downloads](https://img.shields.io/pypi/dm/torob-client)\r\n[![Telegram-Channel](https://img.shields.io/badge/Telegram--Channel-Ahura_Rahmani-blue)](https://t.me/Ahur4_Rahmani)\r\n\r\n\r\nA Python client for interacting with the Torob API to fetch products data.\r\nHere's a sample README for your Torob API client:\r\n\r\n---\r\n\r\n# Torob API Client\r\n\r\nA Python client for interacting with the Torob API to fetch product data efficiently and easily.\r\n\r\n## Features\r\n\r\n- Fetch product suggestions\r\n- Search for products with pagination\r\n- Retrieve detailed information about specific products\r\n- Access special offers\r\n- Get price chart data for products\r\n- Find similar products based on product keys\r\n\r\n## Installation\r\n\r\nTo install the required dependencies, you can use pip:\r\n\r\n```bash\r\npip install torob-client\r\n```\r\n\r\n## Usage\r\n\r\nTo use the Torob API Client, first, create an instance of the `Torob` class, and then call the desired method. Here\u00e2\u20ac\u2122s a quick example:\r\n\r\n```python\r\nfrom torob_client import Torob\r\n\r\n# Create an instance of the Torob client\r\nclient = Torob()\r\n\r\n# Fetch product details\r\ndata = client.details(\"223801ab-2f16-4e27-96bd-83f653dd3e45\", 5000)\r\nprint(data)\r\n```\r\n\r\n## Available Methods\r\n\r\n### 1. `suggestion(q: str) -> dict`\r\n\r\nFetch product suggestions based on a query string.\r\n\r\n**Parameters:**\r\n- `q`: The query string to search for suggestions.\r\n\r\n**Returns:**\r\n- A dictionary containing the suggestion results.\r\n\r\n### 2. `search(q: str, page: int = 0) -> dict`\r\n\r\nFetch paginated product search results.\r\n\r\n**Parameters:**\r\n- `q`: The query string to search for products.\r\n- `page`: Page number for paginated results (default is 0).\r\n\r\n**Returns:**\r\n- A dictionary containing the search results.\r\n\r\n### 3. `details(prk: str, search_id: int) -> dict`\r\n\r\nFetch detailed information for a specific product.\r\n\r\n**Parameters:**\r\n- `prk`: Product key identifier.\r\n- `search_id`: Search identifier for the product.\r\n\r\n**Returns:**\r\n- A dictionary containing the product details.\r\n\r\n### 4. `special_offers(page: int = 0) -> dict`\r\n\r\nFetch special offers with optional pagination.\r\n\r\n**Parameters:**\r\n- `page`: Page number for paginated results (default is 0).\r\n\r\n**Returns:**\r\n- A dictionary containing the special offers.\r\n\r\n### 5. `price_chart(prk: str, search_id: int) -> dict`\r\n\r\nFetch price chart data for a specific product.\r\n\r\n**Parameters:**\r\n- `prk`: Product key identifier.\r\n- `search_id`: Search identifier for the product.\r\n\r\n**Returns:**\r\n- A dictionary containing the price chart data.\r\n\r\n### 6. `similar_product(prk: str, limit: int) -> dict`\r\n\r\nFetch similar products based on a product key.\r\n\r\n**Parameters:**\r\n- `prk`: Product key identifier.\r\n- `limit`: Maximum number of similar products to retrieve.\r\n\r\n**Returns:**\r\n- A dictionary containing the similar products.\r\n\r\n## Contributing\r\n\r\nIf you'd like to contribute to this project, feel free to fork the repository and submit a pull request. Your contributions are welcome!\r\n\r\n---\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python client for interacting with the Torob API to fetch products data.",
"version": "1.0",
"project_urls": {
"Homepage": "https://github.com/ahur4/torob-client"
},
"split_keywords": [
"webscraping",
" crawling",
" data science",
" data analyse"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ee2b9fd0853e87311cc7abddc9ed7a13648459490c08feb83b6d68d74c5e509e",
"md5": "a05889d256c220e5124dd057968d5282",
"sha256": "7becf5fc1f185f0d1f3fe64b67e1e1212b30914fbccef6be779705875f526a4e"
},
"downloads": -1,
"filename": "torob_client-1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a05889d256c220e5124dd057968d5282",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5073,
"upload_time": "2024-09-22T16:18:15",
"upload_time_iso_8601": "2024-09-22T16:18:15.057651Z",
"url": "https://files.pythonhosted.org/packages/ee/2b/9fd0853e87311cc7abddc9ed7a13648459490c08feb83b6d68d74c5e509e/torob_client-1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-22 16:18:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ahur4",
"github_project": "torob-client",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "torob-client"
}