Python Bitrix24 API
Project description
https://github.com/moshkov/python_bitrix24
Зависимости
Python 2.7+
requests
Установка
$ pip install python_bitrix24
Если используется Django, то в настройках проекта можно указать BITRIX24_API_LOGIN, BITRIX24_API_PASSWORD и BITRIX24_API_MAIN_USER_NAME.
Описание
Python Bitrix24 API
Позволяет работать с API Bitrix24. В текущей версии реализовано только добавление лида.
Использование
from python_bitrix24.bitrix24 import Bitrix24Connection
bitrix24Connection = Bitrix24Connection('YOU_BITRIX24_API_LOGIN', 'YOU_BITRIX24_API_PASSWORD', 'YOU_BITRIX24_API_MAIN_USER_NAME')
b24_result = bitrix24Connection.add_lead('My dear Lead, {
'NAME': 'Vasya Pupkin',
'EMAIL_OTHER': 'lead@email.local',
'UF_CRM_123456789': 'additional information',
'UF_CRM_123456788': 'additional information 2',
})
if b24_result.get('error', '') == '201' == 0:
print 'success'
...
Для Django (если в настройках заданы BITRIX24_API_LOGIN, BITRIX24_API_PASSWORD и BITRIX24_API_MAIN_USER_NAME):
from python_bitrix24.python_bitrix24_django import bitrix24Connection
b24_result = bitrix24Connection.add_lead('My dear Lead, {
'NAME': 'Vasya Pupkin',
'EMAIL_OTHER': 'lead@email.local',
'UF_CRM_123456789': 'additional information',
'UF_CRM_123456788': 'additional information 2',
})
if b24_result.get('error', '') == '201' == 0:
print 'success'
...
...
TODO
Проверка отвера API на корректность
Остальной функционал API Bitrix24
Тесты
Документация
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python_bitrix24-0.1.0.tar.gz
(4.5 kB
view details)
File details
Details for the file python_bitrix24-0.1.0.tar.gz
.
File metadata
- Download URL: python_bitrix24-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b07b6e0b92603333b04bc93d9f6747293e5297c96cde244c642649a78f9267d0 |
|
MD5 | 437bdc278d43d57e074d336fc28416c7 |
|
BLAKE2b-256 | 8f03f250ccd7ccc06bc476714676c0006d52a433f9ba904ace99f7e74a380a3c |