Skip to main content

No project description provided

Project description

Python library for accessing Zimbra SOAP (https://wiki.zimbra.com/wiki/SOAP_API_Reference_Material_Beginning_with_ZCS_8). Currently this library split into 2 parts: Zmprov and Mailbox.

not all zmprov command(s) has been implemented, because i add them only based on customer/project needs

but you can add your own by extending OZSoap which is base of Zmprov and Mailbox for example creating new COS (Class Of Service)

from ozpy.base import OZSoap

class NewClass(OZSoap):

        def create_cos(self, name):
                body = {"name": [{
                  "_content": name
                }]}
                return self.send("CreateCos", body)

or directly call the soap method (by omitting Request suffix)

# zmsoap_obj is an instance from class OZSoap

zmsoap_obj.CreateCos(
        name=[{"_content": "barudong"}]
)

you can use zmsoap to get the parameters in soap body by using –verbose and –json

zmsoap -z CreateCosRequest/name=new_cos  --json --verbose

Examples

fetch all account

from ozpy.zmprov import Zmprov

zmprov = Zmprov(
        username="admin@mail.com",
        password="superpassword",
        soapurl="https://192.168.113.75:7071/service/admin/soap"
)
print zmprov.gaa()

Sending email

from ozpy.mailbox import Mailbox

mbx = Mailbox(
        username="user1@mail.com",
        password="superpassword",
        soapurl="https://192.168.113.75/service/soap"
)
mbx.sendMail('admin@mail.com', 'This is subject', 'Email content')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ozpy-0.6-py2-none-any.whl (8.2 kB view details)

Uploaded Python 2

File details

Details for the file ozpy-0.6-py2-none-any.whl.

File metadata

File hashes

Hashes for ozpy-0.6-py2-none-any.whl
Algorithm Hash digest
SHA256 bf20681c1b8325e1a1dea0bcc401f184a5bdcd842b4eff9f023f97e20a510d58
MD5 120fa71242655c18e97eeff3f79d7a13
BLAKE2b-256 4a753944341ac3f9eb26e1233345caae6e6f554d2160cd349f63af1c1036fdd0

See more details on using hashes here.

Supported by

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