django_program.sponsors.sync

Sponsor sync service for pulling sponsors from the PSF API.

Classes

SponsorSyncService

Sync sponsors from the PSF sponsorship API.

class django_program.sponsors.sync.SponsorSyncService[source]

Bases: object

Sync sponsors from the PSF sponsorship API.

Parameters:

conference (Conference) – The conference to sync sponsors for.

Raises:

ValueError – If the conference does not support PSF sponsor sync.

__init__(conference)[source]

Initialize the sync service for a conference.

Parameters:

conference (Conference) – The conference to sync sponsors for.

Raises:

ValueError – If the conference does not support PSF sponsor sync.

sync_sponsors()[source]

Fetch sponsors from the PSF API and create/update local records.

Return type:

int

Returns:

The number of sponsors synced.

sync_all()[source]

Run all sync operations and return result counts.

Return type:

dict[str, int]

Returns:

A dict mapping entity names to sync counts.