Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

A python client for AgileCRM

Project description

Python library for Agile CRM based on the rest-api documentation.

Status

We use this in production for Screenly, and it works fine. Still a bit rough around the corners, but it does indeed work.

Installation

Clone the repo as a sub-module inside your project.

Install the Python requirements.

$ pip install agilecrm

Configuration

In order to use the module, you need to set the following environment variables:

  • AGILECRM_APIKEY
  • AGILECRM_EMAIL
  • AGILECRM_DOMAIN

Usage

First, you need to import the module. This may vary depending on your paths etc, but something like:

import agilecrm

Creating a user

Simply create a new user. Despite what is claimed in the documentation, all variables appear to be optional.

agilecrm.create_contact(
    first_name='John',
    last_name='Doe',
    email='john@doe.com',
    tags=['signed_up'],
    company='Foobar Inc')

You can also use custom fields (must be created in Agile CRM first):

agilecrm.create_contact(
    first_name='John',
    custom = {
      'SomeField': 'Foobar'
    }

Update a contact

Update a user object.

agilecrm.update_contact(
    first_name='Steve',
    last_name='Smith',
    email='john@doe.com',
    tags=['name_updated'],
    company='Foobar2 Inc')

Get a user (by email)

This will get the user by email and return the user object as JSON.

agilecrm.get_contact_by_email('john@doe.com')

Get a user (by UUID)

This will get the user by UUID and return the user object as JSON.

agilecrm.get_contact_by_uuid(1234)

Add a tag

This will add the tag ‘awesome_user’ to the user ‘john@doe.com’. Both variables are required.

agilecrm.add_tag('john@doe.com', 'awesome_user')

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
agilecrm-0.0.3-py2.py3-none-any.whl (5.9 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Nov 25, 2016
agilecrm-0.0.3.tar.gz (4.9 kB) Copy SHA256 hash SHA256 Source None Nov 25, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page