move-coop / parsons

A python library of connectors for the progressive community.
https://www.parsonsproject.org/
Other
259 stars 131 forks source link

Create CiviCRM Class #70

Open elyse-weiss opened 4 years ago

elyse-weiss commented 4 years ago

Some helpful existing documentation: https://github.com/4ndygu/civicrm_osdi

felipealbertao commented 2 years ago

Here is a sample snippet using civipy: https://github.com/ananelson/civipy/

import os

os.environ["CIVI_REST_BASE"] = "https://civicrm-url/sites/all/modules/civicrm/extern/rest.php"
os.environ["CIVI_USER_KEY"] = "user_key"
os.environ["CIVI_SITE_KEY"] = "site_key"

from civipy.base import CiviCRMBase 

return_str = CiviCRMBase._get('Contact', last_name='Parsons')
print(return_str)
joemcl commented 2 years ago

hi and thanks @felipealbertao , will check out the snippet.

Also noting here that CiviCRM has an API, that concern was raised in a meeting just now...

felipealbertao commented 2 years ago

I've been exploring CiviCRM's API, and I'm impressed. It's very well thought out and easy to use.

If we can make CiviCRM more integrated with other tools like Spoke, CiviCRM has a huge potential to serve as an alternative to expensive, closed-source and anti-democratic election solutions like PDI and VAN

joemcl commented 2 years ago

There is a newish integration with Spoke, still in review. See https://github.com/MoveOnOrg/Spoke/pull/2076 . Wanna take it for a spin? cc: @johntwyman . It doesn't use a Parsons connector.

johntwyman commented 2 years ago

Yep, we have a working CiviCRM-Spoke integration up and running. We're making extensive use of it at the moment.

The Pull Request needs another update and a final bit of polish. But the code is ready to use if people wish.

Grab the contact-loaders/civicrm directory and the relevant action-handlers from here if you're interested in giving it a spin.

joemcl commented 2 years ago

Hi @johntwyman @felipealbertao might y'all be available today at 6:00 p.m. US Eastern Time/ 3:00 p.m. US Pacific Time/ 8:00 a.m. Sydney time?

felipealbertao commented 2 years ago

I'm available at 3p PST 👍

joemcl commented 2 years ago

Great @felipealbertao , are you on the progcode Slack yet?

joemcl commented 2 years ago

If not, please sign up here - https://progco.de/join

felipealbertao commented 2 years ago

Where are we meeting? I have only until 3:30p PST

joemcl commented 2 years ago

@felipealbertao I'm sorry, let's catch up on the other chat thread