Skip to main content

AGB Python SDK

Project description

AGB Python SDK

AGB Python SDK provides a convenient way to interact with the AGB cloud service.

Features

  • Create and manage sessions in the AGB cloud environment
  • Access session information
  • Work with file system, command execution, and code execution modules
  • Browser automation with AI-powered natural language operations
  • Advanced browser configuration (stealth mode, proxies, fingerprinting)
  • Structured data extraction from web pages

Installation

pip install agbcloud-sdk

Quick Start

from agb import AGB
from agb.session_params import CreateSessionParams

# Initialize AGB with your API key
agb = AGB(api_key="your-api-key")

# Create a session
params = CreateSessionParams(
    image_id="agb-code-space-1",
)
result = agb.create(params)

if result.success:
    session = result.session

    # Execute Python code
    code_result = session.code.run_code("print('Hello AGB!')", "python")
    print(code_result.result)

    # Execute shell command
    cmd_result = session.command.execute_command("ls -la")
    print(cmd_result.output)

    # Work with files
    session.file_system.write_file("/tmp/test.txt", "Hello World!")
    file_result = session.file_system.read_file("/tmp/test.txt")
    print(file_result.content)

    # Clean up
    agb.delete(session)
else:
    print(f"Failed to create session: {result.error_message}")

Documentation

For comprehensive documentation, guides, and examples, visit:

📚 Complete Documentation

Development

Prerequisites

  • Python 3.10 or higher
  • pip

Setup

  1. Clone the repository:

    git clone https://github.com/agbcloud/agbcloud-sdk.git
    cd agbcloud-sdk
    
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:

    pip install -e ."[dev,test]"
    

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

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

agbcloud_sdk-0.3.0.tar.gz (92.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agbcloud_sdk-0.3.0-py3-none-any.whl (129.1 kB view details)

Uploaded Python 3

File details

Details for the file agbcloud_sdk-0.3.0.tar.gz.

File metadata

  • Download URL: agbcloud_sdk-0.3.0.tar.gz
  • Upload date:
  • Size: 92.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for agbcloud_sdk-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f5de3b8d394913bf5fc59a076cec262dd5c1af556497b4169bf50caf52604b72
MD5 3132bd77171e682001f28806638030ba
BLAKE2b-256 22d573d54a66327063c562b489d853538558aefbc0c80a151a299f3d1b04c6e8

See more details on using hashes here.

File details

Details for the file agbcloud_sdk-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: agbcloud_sdk-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 129.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for agbcloud_sdk-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bafe3c3db740c95f41494c2519c8fbea30a21be3a170554027c8199a52badf24
MD5 78ddc4d287e94ced9676bf3bd27a24cd
BLAKE2b-256 b14badb1eefa93e0350b6ee8de8d573c0737944b96bb2544dea033ea0d73f31b

See more details on using hashes here.

Supported by

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