📅 dalec-caldav
Django Aggregate a Lot of External Content -- CalDav
Aggregate last event from a given CalDav instance.
Plugin of 🤖 dalec.
Installation
pip install dalec-caldav
In django settings INSTALLED_APPS, add:
INSTALLED_APPS = [
...
"dalec",
"dalec_prime",
"dalec_caldav",
...
]
Usage
General usage:
{% load dalec %}
{% dalec "caldav" content_type [channel=None] [channel_object=None] [template=None] [ordered_by=None] %}
Events
Retrieves latest updated events of all calendars accessible for the current user:
{% dalec "caldav" "event" %}
Retrieves latest updated events of a calendar defined by an url:
{% dalec "caldav" "event" channel="url" channel_object="https://nextcloud.org/remote.php/dav/public-calendars/<calendarID>" %}
Settings
Django settings must define:
DALEC_CALDAV_BASE_URL: CalDav instance url (ex:https://caldav.org/)DALEC_CALDAV_API_USERNAME: CalDav username (ex:admin)DALEC_CALDAV_API_PASSWORD: CalDav user password (ex:azeazeaezdfqsmlkrjzr)
Some other settings are optionnal:
DALEC_CALDAV_SERCH_EVENT_START_TIMEDELTA
Default to timedelta(days=-1). When fetching events from calendar, only events that are newer
from this timedelta will be retrieved. It avoid to retrieve a huge amount of past events.
DALEC_CALDAV_SERCH_EVENT_END_TIMEDELTA
Default to timedelta(days=365). When fetching events from calendar, only events that are older
from this timedelta will be retrieved. It avoid to retrieve a huge amount of past events.
Tests
This dalec uses Radicale as tiny python caldav server wich can runs
inside tox out of the box.
If you want to test with other caldavs servers, you can add a local_settings.py file in
tests/ folder and add a dict conf of extra calendars DALEC_EXTRA_CALDAV_URLS:
DALEC_EXTRA_CALDAV_URLS = {
"nextclould-v27-public": {
"url": "https://nextcloud.example.com/remote.php/dav/public-calendars/saiGzyBYcWct24W8/",
},
"nextclould-v27-auth": {
"url": "https://nextcloud.example.com/remote.php/dav/calendars/username/calendarname/",
"username": "username",
"password": "secret",
},
"my-other-caldav-events": {
"url": "https://caldav.example.com/xxx/",
},
}
This will perform simple test to check the proxy seems to work with this type of caldav server:
- try to fetch events
- assert there is at least 1 event fetched.
If your calendar has no event, test will fail.
Metadata
Release files for dalec-caldav 0.2.0
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 | |
|---|---|---|---|---|
| dalec-caldav-0.2.0.tar.gz | 9.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dalec_caldav-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.6 kB
Release files / dalec-caldav-0.2.0.tar.gz
| Download URL | dalec-caldav-0.2.0.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4002a48df768f1298b8206de4fe7b4d31a1a7b1f7cb4d6b4fbec421666cf7edb
|
|
BLAKE2b-256 checksum How to use checksums |
fadb3c9e9821619c79b42331e7a815aae2ab848a395105934f1b2b7e10804570
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Release files / dalec_caldav-0.2.0-py3-none-any.whl
| Download URL | dalec_caldav-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d405c54fce5146eba121dce5b18f59d0ebd71edabf5286dabaadc5a1b504f24b
|
|
BLAKE2b-256 checksum How to use checksums |
f3eda986c6dbd4de4502d2dadd25add615f69efadb271c97c3974997843743c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Security for dalec-caldav 0.2.0
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.