Skip to main content

GroupWise Python Client

Auto-generated Python package for the GroupWise WSDL/XSD schemas.

Generation code: https://github.com/rhulha/GWSoapApiClientGenerator

Usage

import sys
import config
from gwsoap.service.groupwise_client import GroupWiseClient
from gwsoap.methods.LoginRequest import LoginRequest
from gwsoap.methods.LogoutRequest import LogoutRequest
from gwsoap.methods.GetFolderListRequest import GetFolderListRequest
from gwsoap.methods.GetItemsRequest import GetItemsRequest
from gwsoap.types.PlainText import PlainText
from gwsoap.soap.request_context import RequestContext
from gwsoap.soap.exceptions import SoapFaultException

try:
    client = GroupWiseClient(config.GW_SOAP_URL)

    print(f"Connecting to {config.GW_SOAP_URL} as {config.GW_USER} …")
    login_req = LoginRequest(
        auth=PlainText(username=config.GW_USER, password=config.GW_PASSWORD),
        application="GWSoapDemo",
        language="en",
    )
    login_resp = client.login(login_req)

    session = login_resp.session
    print(f"  Version : {login_resp.gw_version}  build {login_resp.build}")
    if login_resp.userinfo:
        ui = login_resp.userinfo
        print(f"  user.name    : {ui.name}")
        print(f"  user.email    : {ui.email}")
        print(f"  user.uuid    : {ui.uuid}")
        print(f"  user.recip_type    : {ui.recip_type}")
        

    ctx = RequestContext(session_id=session)

    print("\nTop-level folders:")
    folder_resp = client.get_folder_list(GetFolderListRequest(parent="folders", recurse=False), ctx)
    folders = folder_resp.folders.folder if folder_resp.folders else []
    if folders:
        for f in folders:
            fid   = f.id
            fname = f.name or f.display_name
            ftype = type(f).__name__
            print(f"  [{ftype}]  {fname}  (id={fid})")

    print("\nFirst 10 items in mailbox:")
    items_resp = client.get_items(GetItemsRequest(container="mailbox", count=10), ctx)
    items = items_resp.items.item if items_resp.items else []
    if items:
        for item in items:
            iid      = item.id
            subject  = item.subject
            itype    = type(item).__name__
            print(f"  [{itype}] {subject!r}  id={iid}")

    client.logout(LogoutRequest(), ctx)
    print("Done.")

except SoapFaultException as e:
    print(f"SOAP Fault: {e.faultcode} - {e.faultstring}")
    

Metadata

Release files for gwsoap 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gwsoap 1.0.4
File Size Uploaded
gwsoap-1.0.4.tar.gz 83.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gwsoap 1.0.4
File Interpreter ABI Platform
gwsoap-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 391.5 kB

Release files / gwsoap-1.0.4.tar.gz

Download URL gwsoap-1.0.4.tar.gz
Size 83.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b0715a2f05885110b5c9bacfd249978b245bee04c86b24de60f1c818fd8e542a
BLAKE2b-256 checksum
How to use checksums
5131514fd539794feb1d0793e0bce5ffe1bf3628a234d78e7110fa18898cf92a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / gwsoap-1.0.4-py3-none-any.whl

Download URL gwsoap-1.0.4-py3-none-any.whl
Size 308.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8d6832446401d10cc7238cd9294b8d97f3103e3ca055175feef0b1d545db687
BLAKE2b-256 checksum
How to use checksums
36268a564e4e25bd0acaa8fe051206c003638a8d1bf5d17951e00f4dddfe334e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page