Skip to main content

kommo-python

kommo-python is an API wrapper for Kommo CRM, written in Python.
This library uses Oauth2 for authentication.

Installing

pip install kommo-python

Usage

from kommo.client import Client
client = Client(client_id, client_secret, code, domain, redirect_uri)

To obtain and set an access token and set it, follow this instructions:

  1. Get authorization url
url = client.authorization_url(state=None)
# This call generates the url necessary to display the pop-up window to perform oauth authentication
# param state(code) is required for direct request for oauth, for local test isn't necessary
  1. Get access token
access_token = client.get_access_token(code, domain)
# This call generates the oauth validation and get the access token and refresh token.
# Must send the code and domain generated from get authorization url. 
  1. Refresh access token
refresh_token = client.refresh_access_token(refresh_token)
# "refresh_token" is the token refresh in response after login with oauth with the above url.
  1. Set token
client.set_token(access_token)
# It is necessary to be able to use the library's actions.

##Actions for get data

  • Get account info
client.get_account_info()
# Returns a json with the account information where the application was configured.
  • Get list of companies
client.list_companies()
# Returns a json with the list of companies.
  • Get custom fields for company
client.get_custom_fields_company()
# Returns a json with the list of custom fields for company.
  • Get list of contacts
client.list_contacts()
# Returns a json with the list of contacts.
  • Get custom fields for contact
client.get_custom_fields_contacts()
# Returns a json with the list of custom fields for contact.
  • Get list of leads
client.list_leads()
# Returns a json with the list of leads.
  • Get custom fields for lead
client.get_custom_fields_leads()
# Returns a json with the list of custom fields for lead.
  • Get list of tasks
client.list_tasks()
# Returns a json with the list of tasks.
  • Get custom fields for task
client.get_custom_fields_tasks()
# Returns a json with the list of custom fields for tast.

##Actions for send data

  • Create company
client.create_company(name: str = None, company_name: str = None, 
                      phone: str = None, email: str = None,
                      custom_fields: list = None)
# Allows you to create a company in the configured application.
  • Create contact
client.create_contact(self, name: str = None, first_name: str = None, 
                      last_name: str = None,
                      custom_fields: list = None)
# Allows you to create a contact in the configured application.
  • Create lead
client.create_lead(self, name: str = None, first_name: str = None, 
                   last_name: str = None,
                   custom_fields: list = None)
# Allows you to create a lead in the configured application.
  • Create lead
client.create_task(self, name: str = None, first_name: str = None, 
                   last_name: str = None,
                   custom_fields: list = None)
# Allows you to create a task in the configured application.

##Actions for webhook

  • List webhooks
client.list_webhooks()
# Allows list webhooks in the configured application.
  • Create webhook
client.create_webhook(event_type: str = None, url: str = None)
# Allows create a webhook in the configured application.
  • Delete webhook
client.delete_webhook(uuid: str = None)
# Allows delete a webhook in the configured application.

Metadata

Release files for kommo-python 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kommo-python 0.1.2
File Size Uploaded
kommo_python-0.1.2.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kommo-python 0.1.2
File Interpreter ABI Platform
kommo_python-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.1 kB

Release files / kommo_python-0.1.2.tar.gz

Download URL kommo_python-0.1.2.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b8afaa0608ab402eb246f88c8a3488efa5ef5ec940ff292dbe1a7ddfc0a54ca5
BLAKE2b-256 checksum
How to use checksums
6df1df3b129ee4c93e3031ee7586817e6b6e5d348fc0e1fd0cebfb79ac119e79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / kommo_python-0.1.2-py3-none-any.whl

Download URL kommo_python-0.1.2-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f04d8a91a45b24cd9ddbd7da4d11a8471b3d1de4865e22d573ec57ee5e28c45d
BLAKE2b-256 checksum
How to use checksums
fb2fb094f633fbcbd9719cedb365dd2b291fd28cb2506faf592f4984d8994435
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page