Skip to main content

Async API wrapper for Vision Browser

Project description

Vision Browser Python API Wrapper

PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

visionbrowser-0.0.1.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

visionbrowser-0.0.1-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page