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 hashes)
Built Distribution
DigiKala-1.0-py3-none-any.whl
(17.2 kB
view hashes)