pychurchtools
This is a python wrapper for the ChurchTools API. The API from ChurchTools is provided using the Swagger toolset.
Note: This library is WIP. Some endpoints are not implemented at all and the others are only partly implemented.
Installation
To install from PyPI, you can use "pip install churchtools".
Type "pip uninstall churchtools" to remove the library.
Dependencies:
pydanticrequests
Usage
Authentication
Via a cookie
Login to churchtools in your browser and copy the cookie. The cookie object looks something like this:
cookie = {
'ChurchTools_ct_<church_name>': 'some_random_text',
}
Pass this object to the init function of the ChurchTools class or set the
field cookie in the ChurchTools object.
Via REST API
The ChurchTools class provides a method login to log you in and set the
cookie automatically.
ct.login('your_email', 'your_password')
Example
You can execute the following in a python script to test the functionality.
from churchtools import ChurchTools
c = ChurchTools('https://<church_name>.church.tools')
c.login('your_email', 'your_password')
events = c.events.list()
print('Upcoming event:', events[0].__repr__())
print(events[0].dict())
print()
me = c.general.whoami()
print('Logged in as:', me.__repr__())
print()
my_events = c.person.events(me.id)
print('Your next events:')
[print(f'- {e.__repr__()}') for e in my_events]
Notes
- Set the
debuggingfield from 0 - 2 for none to many debug messages. - Times are in UTC
Contributing
Linting
poetry install
pre-commit install --install-hooks
pre-commit run --all
Tests
- Create a CT instance here: https://ccp.church.tools/demo
- Set the environment variables
CHURCHTOOLS_URL,CHURCHTOOLS_USER&CHURCHTOOLS_PASSWORD - Run
pytest
Metadata
Release files for churchtools 0.5.4
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 | Actions |
|---|---|---|---|---|
| churchtools-0.5.4.tar.gz | 31.5 kB | Without provenance | Details for churchtools-0.5.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| churchtools-0.5.4-py3-none-any.whl | Python 3 | none | any | Details for churchtools-0.5.4-py3-none-any.whl |
Total release size: 73.8 kB
Release files / churchtools-0.5.4.tar.gz
| Download URL | churchtools-0.5.4.tar.gz |
|---|---|
| Size | 31.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ee67d70b046e2c78b7683ffd30195b016913fb9fb239543a2302424347860db
|
|
BLAKE2b-256 checksum How to use checksums |
0b91bcf200cd127edd6422b462183fbbe8ce135d3b4ff35e502f2ae289822957
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / churchtools-0.5.4-py3-none-any.whl
| Download URL | churchtools-0.5.4-py3-none-any.whl |
|---|---|
| Size | 42.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5379d14b4d7b2c030605ddf3c93e5e03c882d9528ff24d44290fbc35eb488a6
|
|
BLAKE2b-256 checksum How to use checksums |
6eb7faea4ce0db0cf9d3f22171a577f8dc26744ac84b136bafc3ff10800aceac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for churchtools 0.5.4
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.