I would like to use Python and SQLalchemy to construct queries and create reports for Civicrm. Has anyone mapped the Classes and Relationships in order to use the ORM capabilities of SQLAlchemy?


Directly accessing the SQL tables is certainly possible, but not a recommended approach. Reporting (ie read only) is safer than attempting to write to the tables but there can be many tables to join correctly depending on what you are trying to do.

If the standard reports and the various reports extensions don't provide what you need, try getting your data via the API.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.