Package: pypedrive-helper
Pipedrive REST API HelperThis is a helper library for Pipedrive's rest API. At the moment, the helper is capable of Add, Update, and Delete for Persons, Products, and Deals.This library is available in pypi.org to install:python -m pip install pypedrive-helperGetting StartedInstall all libraries in requirements.txtTo install:
There is only one requirement for the moment, that is therequestlibrary.pip install -r requirements.txtTo start using the class the after installing:from pypedrivehelper.helper import PipedriveHelperPrerequisitesYour Pipedrive API Token is required to use all the methods of this helper.Provide an API token when creating an insance of thePipedriveHelperclass, in str format.Sample UsageWhen creating an instance of a class, provide the API token of type str.pipedrive_api = PipedriveHelper(api_key)When using functions. Provide the parameters of type dict. For details of function usage refer to the docstrings.data = {
    "title": "test title 2"
  }

pipedrive_api.add_deal(data)Doc StringsThe information below can also be found within the library as docstrings. Usehelp()to view them.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.Add PersonAdds 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
            }Update PersonUpdates 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")Delete PersonDeletes 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 idAdd ProductAdd 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)Update ProductUpdates 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")Delete ProductDeletes 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 idAdd DealCreates 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
            }Update DealUpdates 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
            }Delete DealDeletes 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 idVersioningWe useSemVerfor versioning. For the versions available, see thetags on this repository.AuthorsKristan Eres-kristan-devLicenseThis project is licensed under the MIT LicenseMIT LicenseCopyright (c) 2020 Kristan SangalangPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THEAcknowledgmentsTo pipedrive for the opportunity to create this moduleTo my mentor for inspiring me to be better