跳转到主要内容

Pythonic包装器,用于 Contacts、Contact Lists 和 Contact Properties API 中的 HubSpot API 方法

项目描述

通过 HubSpot API 管理联系人的 Python 库

https://travis-ci.org/2degrees/hubspot-contacts.svg?branch=master https://coveralls.io/repos/2degrees/hubspot-contacts/badge.png?branch=master
下载

http://pypi.python.org/pypi/hubspot-contacts

赞助商

2degrees Limited.

hubspot-contacts 是一个高级的 Pythonic 包装器,用于 HubSpot API 中的 ContactsContact ListsContact Properties API 方法。

以下是它的使用示例

>>> from hubspot.connection import APIKey, PortalConnection
>>> from hubspot.contacts import Contact
>>> from hubspot.contacts.lists import get_all_contacts
>>>
>>> authentication_key = APIKey("your key")
>>>
>>> with PortalConnection(authentication_key, "Your App Name") as connection:
...     for contact in get_all_contacts(connection):
...         print contact
...
Contact(vid=1, email_address=u'foo@example.com', properties={u'lastname': u'Smith', u'company': u'ACME Ltd.', u'firstname': u'John', u'lastmodifieddate': datetime.datetime(2014, 5, 30, 15, 32, 7, 192000)}, related_contact_vids=[])
Contact(vid=2, email_address=u'bar@example.com', properties={u'lastname': u'Doe', u'company': u'Example Inc.', u'firstname': u'Alice', u'lastmodifieddate': datetime.datetime(2014, 5, 29, 15, 37, 52, 447000)}, related_contact_vids=[])

本项目正式支持在Python 2.7下运行,但可能与Python 2.6和Python 3兼容。

hubspot-contacts依赖于hubspot-connection,这是一个独立的库,用于抽象与HubSpot的低级通信,并负责身份验证等工作。

变更日志

版本1.0最终版(2014-11-20)

  • 在验证联系人列表模式(身份配置文件)时放宽了约束

版本1.0发布候选版2(2014-06-27)

  • 提高了对hubspot-connection的版本要求

  • 将“booleancheckbox”设为布尔属性的后备小部件

版本1.0发布候选版1(2014-06-27)

初始发布。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

hubspot-contacts-1.1.1.tar.gz (20.5 kB 查看哈希)

上传时间:

构建分布

hubspot_contacts-1.1.1-py2.7.egg (61.4 kB 查看哈希)

上传时间:

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面