aiosplinter-0.1.2
توضیحات
Asynchronous splinter wrapper Python library
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | aiosplinter-0.1.2 |
| نام | aiosplinter |
| نسخه کتابخانه | 0.1.2 |
| نگهدارنده | ['Roman Inflianskas'] |
| ایمیل نگهدارنده | ['infroma@gmail.com'] |
| نویسنده | Roman Inflianskas |
| ایمیل نویسنده | infroma@gmail.com |
| آدرس صفحه اصلی | https://github.com/rominf/aiosplinter |
| آدرس اینترنتی | https://pypi.org/project/aiosplinter/ |
| مجوز | Apache-2.0 |
# aiosplinter - asynchronous splinter wrapper Python library
Asynchronous [splinter](https://github.com/cobrateam/splinter) wrapper Python library
## Installation
To install from [PyPI](https://pypi.org/project/aiosplinter/) run:
```shell
$ pip install aiosplinter
```
## Usage
See `splinter` [documentation](https://splinter.readthedocs.io/en/latest/), because `aiosplinter` uses the same API as
`splinter` with 2 exceptions:
1. All functions are converted to coroutines, that means you have to add `await` keyword before all function calls.
2. To asynchronously create classes from `aiosplinter` use static method `create`.
Example (open https://google.com with `chrome`, make screenshot and show it in default browser):
```python
#!/usr/bin/env python
import asyncio
import webbrowser
from pathlib import Path
import aiosplinter
browser_name = 'chrome'
browser = asyncio.run(aiosplinter.Browser(driver_name=browser_name))
url = 'https://google.com'
asyncio.run(browser.visit(url=url))
screenshot_filename_base = str(Path('~/google.com_screenshot_').expanduser())
screenshot_filename = asyncio.run(browser.screenshot(name=screenshot_filename_base, full=True))
webbrowser.open(url=f'file://{screenshot_filename}')
asyncio.run(browser.quit())
```
نیازمندی
| مقدار | نام |
|---|---|
| >=0.1.2,<0.2.0 | poetry-version |
| >=0.9.0,<0.10.0 | splinter |
| - | aioify |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6,<4.0 | Python |
نحوه نصب
نصب پکیج whl aiosplinter-0.1.2:
pip install aiosplinter-0.1.2.whl
نصب پکیج tar.gz aiosplinter-0.1.2:
pip install aiosplinter-0.1.2.tar.gz