Async API wrapper for Vision Browser
Project description
Vision Browser Python API Wrapper
<img src="https://img.shields.io/pypi/v/visionbrowser.svg" alt="PyPI Version" />
<img src="https://img.shields.io/pypi/pyversions/visionbrowser.svg" alt="Python Versions" />
<img src="https://img.shields.io/pypi/status/visionbrowser.svg" alt="Development Status" />
<img src="https://img.shields.io/pypi/l/visionbrowser.svg" alt="License" />
Asynchronous Python library for interacting with the Vision Browser API. Allows you to manage browser profiles, folders, and other entities through a convenient interface.
Installation
pip install visionbrowser
Usage example
import asyncio
import visionbrowser
async def main():
vb_api = visionbrowser.Api()
profiles = await vb_api.get_launched_profiles(token='YOUR_API_TOKEN')
print(profiles)
if __name__ == '__main__':
asyncio.run(main())
Available methods
We have a complete list of available functions in the original API documentation. You can view them on the website https://docs.browser.vision.
To use each method you need, you need to define its class.
Example:
import visionbrowser
vb_api = visionbrowser.Api() # For API
vb_profiles = visionbrowser.Profiles() # For Profiles
vb_folders = visionbrowser.Folders() # For Folders
# And other
Error handling
The library raises the following exceptions:
-
visionbrowser.exceptions.FailedConnection
: Error connecting to the API. -
visionbrowser.exceptions.APIError
: Error returned by the Vision Browser API.
There are also warnings. They are not fully implemented, but there is an example.
await visionbrowser.Api.start_profile(token=token, profile_id=profile_id, folder_id=folder_id)
# If your browser was already launched inside the Vision App, then you cannot launch it through the API, and the code will display:
# WARNING:visionbrowser.api:The port was found to be empty after the application/process returned. Most likely the profile was launched inside Vision, or some other issue occurred.
Examples
See usage examples in the examples
folder.
Contributing
We will gladly welcome all comments and wishes. 😊\
If you want to contact me, please send me a private message on Github (europecdc).
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
Built Distribution
File details
Details for the file visionbrowser-0.0.3.tar.gz
.
File metadata
- Download URL: visionbrowser-0.0.3.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 605f0ffbe7fdfd86c68cc0d05dd90c90eedac9b6c28cabac7ad9e9b7c7fcfcfb |
|
MD5 | 6d64bbff2622066d5471ccd67ff84861 |
|
BLAKE2b-256 | 3e1be0a9ead72f79734ca14b47f8bcd9e9cdcb4639700256683c8a77e6a78f04 |
File details
Details for the file visionbrowser-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: visionbrowser-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b9fb97672d798dc2d04995c60cb7d53b471a76e1b285d531b8ccbd34903d9bf |
|
MD5 | afaf54a8a0ffb575b50b0b403c5fcd75 |
|
BLAKE2b-256 | cf69ba3968b5ea133c291830193dbee46cb5e1856a4176fb8ac11543d3ee911b |