Python Pipedrive API帮助程序

pypedrive-helper的Python项目详细描述


Pipedrive REST API帮助程序

这是Pipedrive的RESTAPI的帮助程序库。目前,helper能够添加、更新和删除人员、产品和交易。在

此库可在pypi.org网站要安装:

python -m pip install pypedrive-helper

入门

在中安装所有库要求.txt在

要安装: 目前只有一个需求,那就是request库。在

^{pr2}$

要在安装后开始使用类,请执行以下操作:

from pypedrivehelper.helper import PipedriveHelper

先决条件

需要您的Pipedrive API令牌才能使用此助手的所有方法。在

以str格式创建PipedriveHelper类的疯狂时提供一个API令牌。在

示例用法

创建类的实例时,请提供str类型的API标记

pipedrive_api = PipedriveHelper(api_key)

使用函数时。提供dict类型的参数。有关函数用法的详细信息,请参阅docstrings。在

data = {
    "title": "test title 2"
  }

pipedrive_api.add_deal(data)

文档字符串

以下信息也可以作为docstring在库中找到。使用help()查看它们。在

A class that simplifies the use of the Pipedrive REST API

    ...
    Constructors
    ----------
    api_token : str
        your pipedrive api token.

    Attributes
    ----------
    product_url : str
        api url for all product methods
    person_url : str
        api url for all product methods
    deal_url : str
        api url for all deal methods
    org_url : str
        api url for all org methods
    person_fields_url : str
        api url for all personfield methods
    product_fields_url : str
        api url for all productfield methods
    deal_fields_url : str
        api url for all dealfield methods
    org_fields_url : str
        api url for all orgfield methods

    Methods
    -------
    add_person(self, person_args: dict) returns dict
        Add a single person to contacts in Piprdrive
    add_product(self, product_args: dict) returns dict
        Add a single person to products in Piprdrive
    update_product(self, product_args: dict, product_id: str) returns dict
        Updates an existing product in Pipedrive.
    delete_product(self, product_id: str) returns dict
        Deletes an existing product in Pipedrive.

添加人员

Adds a single contact in Pipedrive. Returns REST result status and API rate limit info.

Parameters
        ----------
        person_args : dict
            Values for each column for a single contact. Accepts default fields and custom fields.

        Usage
        ----------
            data = {
              "name": Luke, # where "name" is a sample of a default field
              "74f20ffc505c9708d4f0958333b0cc1df74a2ee9": 92, # where "74f20ffc505c970..." is a sample of custom field
            }

更新人员

Updates an existing contact in Pipedrive. Returns REST result status and API rate limit info.

Parameters
        ----------
        person_args : dict
            Values for each column for a single contact. Accepts default fields and custom fields.
        product_id : str
            Pipedrive product id

        Usage
        ----------
            Only add the fields/customfields you want to update.

              data = {
                "name": John, # where "name" is a sample of a default field
                "74f20ffc505c9708d4f0958333b0cc1df74a2ee9": 92, # where "74f20ffc505c970..." is a sample of a custom field
                }
              update_product(data, "1")

删除人员

Deletes an existing contact in Pipedrive. Returns REST result status and API rate limit info.

Parameters
        ----------
        person_id : str
            Pipedrive person id

        Usage
        ----------
            delete_person("1") # where "1" is the pipedrive person id

添加产品

Add a single row to products in Piprdrive. Returns API call status and API rate limit info.

Parameters
        ----------
        product_args : dict
            Values for each column for a single contact. Accepts default fields and custom fields.

        Usage
        ----------
            data = {
              "name": "SCPH-90006", # where "name" is a sample of a default field
              "74f20ffc505c9708d4f0958333b0cc1df74a2ee9": 92, # where "74f20ffc505c970..." is a sample of custom field
              }
            add_product(data)

更新产品

Updates an existing product in Pipedrive.Returns REST result status and API rate limit info.

Parameters
        ----------
        product_args : dict
            Values for each column for a single contact. Accepts default fields and custom fields.
        product_id : str
            Pipedrive product id

        Usage
        ----------
            Only add the fields/customfields you want to update.

              data = {
                "name": "SCPH-90006", # where "name" is a sample of a default field
                "74f20ffc505c9708d4f0958333b0cc1df74a2ee9": 92, # where "74f20ffc505c970..." is a sample of a custom field
                }
              update_product(data, "1")

删除产品

Deletes an existing product in Pipedrive. Returns REST result status and API rate limit info.

Parameters
        ----------
        product_id : str
            Pipedrive product id

        Usage
        ----------
            delete_product("1") # where "1" is the pipedrive product id

添加交易

Creates a single deal to Pipedrive. Returns REST result status and API rate limit info.

Parameters
        ----------
        deal_args : dict
            Values for each column for a single deal. Accepts default fields and custom fields.

        Usage
        ----------
            data = {
              "title": John's Deal, # where "name" is a sample of a default field
              "74f20ffc505c9708d4f0958333b0cc1df74a2ee9": 92, # where "74f20ffc505c970..." is a sample of custom field
            }

更新交易

Updates an existing deal in Pipedrive.Returns REST result status and API rate limit info.

Parameters
        ----------
        deal_args : dict
            Values for each column for a single deal. Accepts default fields and custom fields.

        Usage
        ----------
            data = {
              "title": John's Deal, # where "name" is a sample of a default field
              "74f20ffc505c9708d4f0958333b0cc1df74a2ee9": 92, # where "74f20ffc505c970..." is a sample of custom field
            }

删除交易

Deletes an existing deal in Pipedrive. Returns REST result status and API rate limit info.

Parameters
        ----------
        deal_id : str
            Pipedrive product id

        Usage
        ----------
            delete_deal("1") # where "1" is the pipedrive product id

版本控制

我们使用SemVer进行版本控制。有关可用版本,请参阅tags on this repository。在

作者

许可证

这个项目是由麻省理工学院授权的

麻省理工学院执照

版权所有(c)2020 Kristan Sangalang

兹免费准许任何人取得复制品 本软件及其相关文档文件(“软件”)的 在软件中不受限制,包括但不限于权利 使用、复制、修改、合并、发布、分发、再授权和/或出售 软件的副本,并允许软件的使用者 根据以下条件提供:

上述版权声明和本许可声明应包括在所有 软件的副本或大部分。在

本软件按“原样”提供,无任何形式的保证,明示或 包括但不限于适销性保证, 特定目的的适用性和非侵犯性。在任何情况下 作者或版权持有人应对任何索赔、损害赔偿或其他 无论是在合同诉讼、侵权诉讼或其他诉讼中,由以下原因引起的责任:, 与软件、软件的使用或其他交易有关

致谢

  • 希望有机会创建这个模块
  • 感谢我的导师激励我变得更好

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
由于java的原因,maven无法运行代码。lang.NoClassDefFoundError:com/fasterxml/jackson/annotation/JsonMerge   Android项目中的java Creative SDK图像编辑器UI   java如何在Android Studio中使用DataOutputStream上传文件并将其他参数传递到web服务器   java倒计时服务打开时崩溃   java将RubyonRails项目转换为JRubyonRails项目   java我的图库意图是不显示图像?为什么?   java如何在春季启动时跳过mongodb/   java@Autowired在Spring中是如何实现的   甲骨文Akka java。util。同时发生的timeoutexception线程池频繁超时   java maven依赖项对spring启动应用程序有何影响?   java Firestore执行复合查询,未截获事件“已修改”   java ItemStreamException:未能初始化读取器,原因是:IllegalStateException:流已初始化。重新开放前关闭   java将空标记解组到集合的新实例中   使用AspectJ的java新手:无法调用aspect   java查找棋类游戏的所有组合   你为什么要这样做and==与Java中的equals方法不一样吗?   如何对使用JavaUUID的代码进行单元测试?