Exchange 的 Python 开发包 PyExchange

码农软件 · 软件分类 · 网络工具包 · 2019-02-25 12:11:45

软件介绍

PyExchange 是微软 Exchange 服务的 Python 封装。Python 应用可以使用它来与 Exchange 服务进行各种交互。该库目前还不完善,只支持日程信息。

示例代码:

from pyexchange import Exchange2010Service, ExchangeNTLMAuthConnection
from datetime import datetime
from pytz import timezone

URL = u'https://your.email.server.com.here/EWS/Exchange.asmx'
USERNAME = u'YOURDOMAIN\\yourusername'
PASSWORD = u"12345? That's what I have on my luggage!"

# Set up the connection to Exchange
connection = ExchangeNTLMAuthConnection(url=URL,
                                        username=USERNAME,
                                        password=PASSWORD)

service = Exchange2010Service(connection)


# You can set event properties when you instantiate the event...
event = service.calendar().new_event(
  subject=u"80s Movie Night",
  attendees=[u'your_friend@friendme.domain', u'your_other_friend@their.domain'],
  location = u"My house",
)

# ...or afterwards
event.start=timezone("US/Pacific").localize(datetime(2013,1,1,15,0,0))
event.end=timezone("US/Pacific").localize(datetime(2013,1,1,21,0,0))

event.html_body = u"""<html>
    <body>
        <h1>80s Movie night</h1>
        <p>We're watching Spaceballs, Wayne's World, and
        Bill and Ted's Excellent Adventure.</p>
        <p>PARTY ON DUDES!</p>
    </body>
</html>"""

# Connect to Exchange and create the event
event.create()

本文地址:https://www.codercto.com/soft/d/97.html

无处不在的算法

无处不在的算法

[德]贝特霍尔德·弗金、赫尔穆特·阿尔特 / 机械工业出版社 / 2018-1-1

本书以简单易懂的写作风格,通过解决现实世界常见的问题来介绍各种算法技术,揭示了算法的设计与分析思想。全书共有41章,分为四大部分,图文并茂,把各种算法的核心思想讲得浅显易懂。本书可作为高等院校算法相关课程的本科生教材,也可作为研究人员、专业技术人员的常备参考书。一起来看看 《无处不在的算法》 这本书的介绍吧!

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

html转js在线工具
html转js在线工具

html转js在线工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具