AmoCRM python 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)
Нужна помощь (особенно для документировании). Если есть желание помочь - welcome! Пулреквесты приветствуются!
Metadata
Release files for amocrm-api 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| amocrm_api-0.1.1.tar.gz | 11.2 kB | Without provenance | Details |
Release files / amocrm_api-0.1.1.tar.gz
| Download URL | amocrm_api-0.1.1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
173e10ba625c68769c441b2eb7b509c7ae4e52386468b14e4d4cf8d85fb95328
|
|
BLAKE2b-256 checksum How to use checksums |
a2c6770e8124ad17e3fd5d49b984ab6324d72b37891b303d71ffa2fa8f83ce95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for amocrm-api 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.