Skip to main content

Python Bitrix24 API

Project description

https://github.com/moshkov/python_bitrix24

https://img.shields.io/pypi/v/python_bitrix24.svg https://img.shields.io/pypi/dm/python_bitrix24.svg https://img.shields.io/pypi/l/python_bitrix24.svg

Зависимости

  • Python 2.7+, 3.4+

  • 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

  1. Проверка отвера API на корректность

  2. Остальной функционал API Bitrix24

  3. Тесты

  4. Документация

Project details


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.1.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file python_bitrix24-0.1.1.tar.gz.

File metadata

File hashes

Hashes for python_bitrix24-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3a3e957caf5073009338bde86d5dcf1fad6d9df6f53b1258f6c33b3f8c1d43a1
MD5 717c620476b29067753aa8064b58e6ac
BLAKE2b-256 d950624291d4bdb8071fbbfcb4bd7ad116fb606eb408305d1a6c1d824603c1fa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page