a fun project
Project description
CU API
I use Copper's API a lot for work, so a module of functions to work with in in Python. This is my attempt to turn these functions into a package that can be used by others.
Installation
If you are already in a Notebook, you can still the package to your environment with python:
!pip install cu_api
This package is designed to be a user friendly wrapper for the Copper CRM API to make interacting witth and pulling data easier.
Or install the package to your environment in the command line:
Install
You can install the cu_api package through PyPI:
pip install cu_api
Queries and Searching
To get most information from the Copper API, you need to search for it. You can define what companies, people, opportunities, etc. you are interested in by specifying various filters. These can be values in Custom Fields that you defined, or standard fields on each record type.
This package makes this easier uses a Query object to hold the various filters you would like to use.
Since, I work in Advertising. Let's assume that I would like to pull the information for all Advertisers in the CRM. We can first create a new query:
from cu_api import Query
Advertisers = Query()
Then we can add a filter to search for companies that have the "Live" value in the "Campaign Status" field:
Advertisers['Campaign Satus'] = 'Live'
## Or, if you know the id of the custom field:
Advertisers[2938821] = 'Live'
We can also add other filters to check only get Advertisers in California and from a specific sales person:
Advertisers['state'] = 'CA'
Advertisers['owner'] = 'Jim Halpert'
Your Advertisers query can then used with the search function to get data from Copper.
How to use
Start by importing all the modules you’ll need for your project. The
cuapi_wrapper package is broken down into seperate modules for working
with companies, tasks, opportunities, users, etc.
For example, if we wanted to look at companies in copper, we should start by importing the copper_crm.companies module. We can then search these companies for those who are in California:
from cu_api import search
df = search.companies(Advertisers)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cu_api-0.0.3.tar.gz.
File metadata
- Download URL: cu_api-0.0.3.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a888603e3a4a1b67e349064dcebb9c487adb11913e458b17dede4f5bbe192bd6
|
|
| MD5 |
0696d0831da04fdbf49c583fcee9977f
|
|
| BLAKE2b-256 |
2090a951bc7edca7d5380aaeb5159fc9bafed9ed5839aa7146a1fa9401c4905d
|
File details
Details for the file cu_api-0.0.3-py3-none-any.whl.
File metadata
- Download URL: cu_api-0.0.3-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25c0b33592f9ac627155d1a08efe94363e0a7e34ef3b10a4ddc7f11ea886cc3b
|
|
| MD5 |
218dca3ffd47a0879443c839e58fa8a2
|
|
| BLAKE2b-256 |
dbb804427b806f3d0722b6634e2f943bf3d0083e71d751259abf76ffdab13b5b
|