Browserness Python SDK
The official Python SDK for the Browserness API, allowing you to programmatically create and manage remote browser instances.
Installation
pip install browserness
Or if you're installing from source:
pip install .
Quick Start
import os
from browserness import Browserness
from browserness.core.api_error import ApiError
# Initialize the client
# Set your API key as an environment variable named BROWSERNESS_API_KEY
api_key = os.environ.get("BROWSERNESS_API_KEY")
# If you have an API key, you can pass it in the headers
headers = {"Authorization": f"Bearer {api_key}"} if api_key else None
client = Browserness(headers=headers)
try:
# List all browsers (will fail without valid API key)
browsers = client.browsers.list_browsers()
print(browsers)
except ApiError as e:
if e.status_code == 401:
print("Authentication failed. Please set the BROWSERNESS_API_KEY environment variable.")
print("You can get an API key at https://browserness.com")
else:
print(f"API Error: {e}")
except Exception as e:
print(f"Unexpected error: {e}")
Async Support
The SDK also includes an async client:
import asyncio
import os
from browserness import AsyncBrowserness
from browserness.core.api_error import ApiError
async def main():
# Initialize the async client
# Set your API key as an environment variable named BROWSERNESS_API_KEY
api_key = os.environ.get("BROWSERNESS_API_KEY")
headers = {"Authorization": f"Bearer {api_key}"} if api_key else None
client = AsyncBrowserness(headers=headers)
try:
# List all browsers (will fail without valid API key)
browsers = await client.browsers.list_browsers()
print(browsers)
except ApiError as e:
if e.status_code == 401:
print("Authentication failed. Please set the BROWSERNESS_API_KEY environment variable.")
print("You can get an API key at https://browserness.com")
else:
print(f"API Error: {e}")
except Exception as e:
print(f"Unexpected error: {e}")
asyncio.run(main())
Documentation
For detailed documentation, please refer to the API documentation.
License
This SDK is licensed under the MIT License. See the LICENSE file for more details.
Metadata
Release files for browserness 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| browserness-0.0.3.tar.gz | 27.6 kB | Without provenance | Details for browserness-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| browserness-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for browserness-0.0.3-py3-none-any.whl |
Total release size: 65.7 kB
Release files / browserness-0.0.3.tar.gz
| Download URL | browserness-0.0.3.tar.gz |
|---|---|
| Size | 27.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee9c7b600e932568e22986142a20bb7d1a95af6be645a204fcd8b2a58071f38a
|
|
BLAKE2b-256 checksum How to use checksums |
e887fe698a3f30087040549d9929d4b873c9f95f4e8bf2956e8a0557bb36849c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Release files / browserness-0.0.3-py3-none-any.whl
| Download URL | browserness-0.0.3-py3-none-any.whl |
|---|---|
| Size | 38.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58a45519a45b1510e3c53a5bd92b551f36ac1f9867736d55f5a8cb97806707a7
|
|
BLAKE2b-256 checksum How to use checksums |
731c606a1de5d57e3ea759999924324c789050c4db0085cfd94cae7085c766cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Security for browserness 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.