Skip to main content

A helper library for the GroupWise SOAP API (gwsoap).

Project description

gweasysoap

A small, pythonic helper library on top of the auto-generated gwsoap GroupWise SOAP client. It hides the request/context boilerplate and gives you simple methods for logging in, reading folders and items, sending mail, and creating appointments.

Installation

pip install gweasysoap

This pulls in gwsoap>=1.0.3.

Quick start

from gweasysoap import GWEasySoap

# Use it as a context manager so the session is always logged out.
with GWEasySoap.connect_trusted_app(
    "https://gw.example.com:7191/soap", "jdoe", "MyApp", "trusted-key"
) as gw:
    print("Logged in as", gw.user_name, gw.user_email)

    mailbox = gw.get_mailbox()
    for item in gw.get_folder_items(mailbox.id, count=20):
        print(item.subject)

    gw.send_mail(
        subject="Hello",
        body_text="Sent from gweasysoap",
        recipients=[{"display_name": "Jane", "email": "jane@example.com"}],
    )

Logging in

# Username / password
gw = GWEasySoap.connect(endpoint, "jdoe", "secret")

# Trusted application key (impersonate a specific user)
gw = GWEasySoap.connect_trusted_app(endpoint, "jdoe", "MyApp", "trusted-key")

# Trusted application key, first usable mailbox on the post office
gw = GWEasySoap.connect_any_user(endpoint, "MyApp", "trusted-key")

Each connect* factory raises GWEasySoapError on failure. The matching instance methods (login, login_trusted_app, login_with_any_user) return a boolean instead, if you prefer to manage the instance yourself.

Constructor options: application (the name reported to GroupWise), debug, and verify_ssl.

What you can do

  • Users / mailboxesget_user_list, get_user_mailboxes
  • Address bookget_system_address_book, get_address_book_entries
  • Foldersget_mailbox, get_trash_folder, get_calendar, get_system_folder, get_folder_list, get_shared_folder_by_name
  • Itemsget_items, get_folder_items, get_calendar_items, get_item, get_full_item, get_body, remove_item
  • Mailsend_mail
  • Appointmentscreate_appointment, create_appointment_in_folder, add_category
  • Sessionwhoami, user_name, user_email, logout

License

MIT

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

gweasysoap-0.1.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

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

gweasysoap-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file gweasysoap-0.1.0.tar.gz.

File metadata

  • Download URL: gweasysoap-0.1.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for gweasysoap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 44575ec15a6d80c6bc5a5e87a736add2e4cc0c669f0d770ac38ebd30a5e8727d
MD5 b2cfd2512009f02a61243fceaced6b38
BLAKE2b-256 888a9f275ac1dc225bad3f925d4e1adf8733acc31e670f5cff88513cece54285

See more details on using hashes here.

File details

Details for the file gweasysoap-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gweasysoap-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for gweasysoap-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73b16ca7519e7e9374cd9259d808bffdba34db6a5f9de39637b8bcb4a775f599
MD5 7e44ca4e26d0fa212effcbfb7a9d2837
BLAKE2b-256 57a762482c2c2a06dbfe023858281ca8e2a465af219ab68390b988c256f041ec

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