Skip to main content

Python API for Amocrm

Project description

==================
AmoCRM python API.
==================
------------------
Не поддерживается по причине полной незаинтересованности со стороны AmoCRM (deprecated!!!)
------------------
------------------
Могу оказать помощь по экспорту/импроту ваших данных из/в AmoCRM
------------------

.. image:: https://travis-ci.org/Krukov/amocrm_api.svg?branch=master
:target: https://travis-ci.org/Krukov/amocrm_api
.. image:: https://img.shields.io/coveralls/Krukov/amocrm_api.svg
:target: https://coveralls.io/r/Krukov/amocrm_api


Python AmoCRM API (http://www.amocrm.ru/) (human interface for easy using )


Installation
============

::

pip install amocrm_api


Usage
=====


There are 7 abstraction of 5 AmoCRM objects:

- Контакт - BaseContact
- Компания - BaseCompany
- Сделка - BaseLead
- Задача - (LeadTask, ContactTask)
- Событие - (LeadNote, ContactNote)

Settings
--------

First of all you need to define settings
Example::

from amocrm import BaseContact, amo_settings, fields
amo_settings.set('krukov@centrobit.ru', '4b332718c4c5944003af7e6389860ced', 'testcentrobit')


Custom field
------------

One of the features of AmoCRM in the presence of custom fields in a contact, company and lead objects

To define your custom field you need describe it

Example::

from amocrm import BaseContact, amo_settings, fields
amo_settings.set('krukov@centrobit.ru', '4b332718c4c5944003af7e6389860ced', 'testcentrobit')

class Contact(BaseContact):
position = fields.CustomField(u'Должность')
site = fields.CustomField(u'Сайт')
phone = fields.CustomField(u'Телефон', enum='WORK')

Ok, now it is ready to use and you can get, create or edit contacts

Example::

new_contact = Contact(name='Example2', company='ExampleCorp2', position='QA', phone='0001')
new_contact.site = 'http://example.com'
new_contact.save()

contact = Contact.objects.get(new_contact.id)
contact_search = Contact.objects.search('Example2')
assert contact.id == contact_search.id
print(contact.phone)
contact.phone = '8-800-00000000'
contact.save()
contact.create_task('New task, yeee', task_type=u'Звонок',
complete_till=datetime.datetime.now()+datetime.timedelta(days=3))
print(contact.notes)
print(contact.tasks)

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

amocrm_api-0.3.0.zip (18.1 kB view details)

Uploaded Source

File details

Details for the file amocrm_api-0.3.0.zip.

File metadata

  • Download URL: amocrm_api-0.3.0.zip
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for amocrm_api-0.3.0.zip
Algorithm Hash digest
SHA256 a232f089d64e90dfc4d62a271be24169ce99a89dc05516c297e08ed908f2c358
MD5 aa0a544462df37126a116a8ae4943fdc
BLAKE2b-256 ae499ecc2ef3e102c7081cdd65ef66ea32c55e65c424e24966d3832df69ecd89

See more details on using hashes here.

Supported by

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