DigiKala library to connect and work with digikala.com!
Project description
DigiKala
Create session and work with Digikala API
Installation:
Install the DgiKala library from PyPI or GitHub.
pip install DigiKala
or
git clone https://github.com/NuoQTe/DigiKala.git
Crate session
import asyncio
from DigiKala import Client
async def main()
app = Client("NuoQTe")
await app.login()
await app.close()
asyncio.run(main())
or
import asyncio
from DigiKala import Client
async def main()
async with Client('NuoQTe',do_login=True) as app:
pass
asyncio.run(main())
Examples:
import asyncio
from DigiKala import Client , SearchFilter
async def main():
async with Client('NuoQTe',do_login=True) as app:
# Search in DigiKala
result = await app.search(SearchFilter(
query="Laptop",
classification="notebook-netbook-ultrabook",
has_selling_stock=True,
price_range=(50000000 , 80000000),
sort_code=4
))
product = await result.products[3].get_product()
product = product.product
print(product.variants)
# add product in my cart
await product.add_cart()
asyncio.run(main())
Capabilities
- login phone number or email with sent code or password
- logout
- crate session file
- search with all filters
- search wuth product ID
- get product comments
- get account information
- get cart information
- add product to cart
- remove product from the cart
License
This project is licensed under the MIT License. See the LICENSE file for details.
Developer
- Telegram: t.me/NuoQTe
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
digikala-1.0.tar.gz
(12.4 kB
view details)
Built Distribution
DigiKala-1.0-py3-none-any.whl
(17.2 kB
view details)
File details
Details for the file digikala-1.0.tar.gz
.
File metadata
- Download URL: digikala-1.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e419accc69c018c46caa56740f41cf286b2eec97e1fb5f373d74d79b5957b1a |
|
MD5 | 58a620d6aed7aa8aa2e1b8ff4ceea2d4 |
|
BLAKE2b-256 | ab011345846104964f3e4b53f42a9ad8866c9a160be1ae265f51321c3fd7f8da |
File details
Details for the file DigiKala-1.0-py3-none-any.whl
.
File metadata
- Download URL: DigiKala-1.0-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b58c5fbca0338ba4e882d3e14eba64cc0e31cccbdd5c9281bf0cdac54d72af5 |
|
MD5 | 45d6a79045be8e249d5f6bde4f306430 |
|
BLAKE2b-256 | cba2b61b012aeb3e1c9b84a19d1ec4f6c63bde855d51a060bec80bb30914b251 |