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.1.tar.gz (11.3 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.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gweasysoap-0.1.1.tar.gz
  • Upload date:
  • Size: 11.3 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.1.tar.gz
Algorithm Hash digest
SHA256 cadb77648d0a37f1f282b58cb78ecd19be149f0fdfd448043c49c49ff8e371d2
MD5 b95dcb4c54b429bdde127599f78cf70e
BLAKE2b-256 d8d7e7e8d3e9115b9922c527eabbe2ea0e8971f046122798b496d5984cf13d8e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gweasysoap-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 405c1ba780616bd3badca9074e90021a02a272d8427b3716ba016766ce938766
MD5 f42c4ef33482f8c7e312f451f5c97a4c
BLAKE2b-256 0f56646cb5c9b193e3990ff5707c007f48084d3c9f80b19197cee11d27cb06b3

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