{"id":18497087,"url":"https://github.com/iomarmochtar/ozpy","last_synced_at":"2025-04-09T00:30:30.636Z","repository":{"id":53753740,"uuid":"94061197","full_name":"iomarmochtar/ozpy","owner":"iomarmochtar","description":"Python library for accessing Zimbra SOAP.","archived":false,"fork":false,"pushed_at":"2021-03-16T03:18:53.000Z","size":26,"stargazers_count":4,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T19:44:28.502Z","etag":null,"topics":["api","python-library","zimbra"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iomarmochtar.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-12T06:11:06.000Z","updated_at":"2023-03-16T12:07:50.000Z","dependencies_parsed_at":"2022-09-26T20:31:30.708Z","dependency_job_id":null,"html_url":"https://github.com/iomarmochtar/ozpy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iomarmochtar%2Fozpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iomarmochtar%2Fozpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iomarmochtar%2Fozpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iomarmochtar%2Fozpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iomarmochtar","download_url":"https://codeload.github.com/iomarmochtar/ozpy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247744332,"owners_count":20988783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","python-library","zimbra"],"created_at":"2024-11-06T13:33:21.014Z","updated_at":"2025-04-09T00:30:30.258Z","avatar_url":"https://github.com/iomarmochtar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"OZPY\n====\n\nPython (2.7+ including 3.X) library for accessing Zimbra SOAP (https://wiki.zimbra.com/wiki/SOAP_API_Reference_Material_Beginning_with_ZCS_8) by using builtin Python library (no dependency required).\nCurrently this library split into 2 parts: Zmprov and Mailbox.\n\nnot all zmprov command(s) has been implemented, because i add them only based on customer/project needs\n\nbut you can add your own by extending **OZSoap** which is base of **Zmprov** and **Mailbox**\nfor example creating new COS (Class Of Service)\n\n.. code-block:: python\n\n\tfrom ozpy.base import OZSoap\n\n\tclass NewClass(OZSoap):\n\n\t\tdef create_cos(self, name):\n\t\t\tbody = {\"name\": [{\n\t\t\t  \"_content\": name\n\t\t\t}]}\n\t\t\treturn self.send(\"CreateCos\", body)\n\nor directly call the soap method (by omitting Request suffix)\n\n.. code-block:: python\n\n\t# zmsoap_obj is an instance from class OZSoap\n\n\tzmsoap_obj.CreateCos(\n\t\tname=[{\"_content\": \"barudong\"}]\n\t)\n\nyou can use **zmsoap** to get the parameters in soap body by using **--verbose** and **--json**\n\n.. code-block:: bash\n\n\tzmsoap -z CreateCosRequest/name=new_cos  --json --verbose\n\nExamples\n--------\n\nfetch all account\n\n.. code-block:: python\n\n\tfrom ozpy.zmprov import Zmprov\n\n\tzmprov = Zmprov(\n\t\tusername=\"admin@mail.com\",\n\t\tpassword=\"superpassword\",\n\t\tsoapurl=\"https://192.168.113.75:7071/service/admin/soap\"\n\t)\n\tprint( zmprov.gaa() )\n\n\nSending email\n\n.. code-block:: python\n\n\tfrom ozpy.mailbox import Mailbox\n\n\tmbx = Mailbox(\n\t\tusername=\"user1@mail.com\",\n\t\tpassword=\"superpassword\",\n\t\tsoapurl=\"https://192.168.113.75/service/soap\"\n\t)\n\tmbx.sendMail('admin@mail.com', 'This is subject', 'Email content')\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiomarmochtar%2Fozpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiomarmochtar%2Fozpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiomarmochtar%2Fozpy/lists"}