Skip to main content

Library to generate, convert and validate [schedule files](https://c3voc.de/wiki/schedule) for events which use the [pretalx](https://github.com/pretalx/pretalx), [frab][frab-website] or every other system able to generate schedule.json or CSV files in the correct format.

Project description

C3VOC Schedule Tools

PyPI version License: EUPL-1.2 Python 3.10+

A Python library for generating, converting, and validating schedule files for conferences and events.

Originally developed for the Chaos Computer Club events (C3), this library supports multiple schedule formats and conference management systems including pretalx, frab.

Features

  • Integration: Direct integration with pretalx, frab, and other conference planning systems
  • Schedule Validation: Built-in validation against schedule XML schema
  • Flexible Data Sources: Support for web APIs, local files, and custom data sources
  • Multiple Converters: Built-in converters for various data sources and formats

Installation

pip install c3voc-schedule-tools

Quick Start

Basic Schedule Creation

from voc import Schedule, Event, Room

# Create a new schedule
schedule = Schedule.from_template(
    name="My Conference 2024",
    conference_title="My Conference",
    conference_acronym="MC24",
    start_day=25,
    days_count=3,
    timezone="Europe/Berlin"
)

# Add rooms, generate your own global unique ids e.g. via `uuidgen`
schedule.add_rooms([
    {"name": "Main Hall", "guid": "67D04C40-B35A-496A-A31C-C0F3FF63DAB7"},
    {"name": "Workshop Room", "guid": "5564FBA9-DBB5-4B6B-A0F0-CCF6C9F1EBD7"}
])

# Add an event
event = Event({
    "id": "event-1",
    "title": "Opening Keynote",
    "abstract": "Welcome to the conference",
    "date": "2024-12-25T10:00:00+01:00",
    "duration": "01:00",
    "room": "Main Hall",
    "track": "Keynotes",
    "type": "lecture",
    "language": "en",
    "persons": [{"public_name": "Jane Doe"}]
})
schedule.add_event(event)

# Export to JSON
schedule.export('schedule.json')

Loading from Pretalx

from voc import PretalxConference, Schedule

# Load conference data from pretalx
conference = PretalxConference(
    url="https://pretalx.example.com/event/my-conference/",
    data={"name": "My Conference"}
)

# Get the schedule
schedule = conference.schedule()

# Export to different formats
schedule.export('schedule.json')
schedule.export('schedule.xml')

Working with Existing Schedules

from voc import Schedule

# Load from URL
schedule = Schedule.from_url("https://example.com/schedule.json")

# Load from file
schedule = Schedule.from_file("schedule.json")

# Filter events by track
track_events = schedule.events(filter=lambda e: e.get('track') == 'Security')

# Get all rooms
rooms = schedule.rooms()

# Get events for a specific day
day_1_events = schedule.day(1).events()

API Reference

Core Classes

Schedule

The main schedule container that holds conference metadata, days, rooms, and events.

Key Methods:

  • Schedule.from_url(url) - Load schedule from URL
  • Schedule.from_file(path) - Load schedule from file
  • Schedule.from_template(...) - Create from template
  • add_event(event) - Add an event to the schedule
  • add_rooms(rooms) - Add rooms to the schedule
  • export(filename) - Export to file
  • validate() - Validate against XML schema

Event

Represents a single conference event/talk.

Properties:

  • guid - Global unique event identifier
  • id - Local event identifier, deprecated
  • title - Event title
  • abstract - Event description
  • date - Start date/time
  • duration - Event duration
  • room - Room name
  • track - Track/category
  • persons - List of speakers

Room

Represents a conference room / lecture hall / etc.

Properties:

  • name - Room name
  • guid - Global unique room identifier

Conference Planning Systems

PretalxConference

Integration with pretalx conference management system.

conference = PretalxConference(
    url="https://pretalx.example.com/event/",
    data={"name": "Conference Name"}
)
schedule = conference.schedule()

GenericConference

Base class for generic conference data sources.

conference = GenericConference(
    url="https://example.com/schedule.json",
    data={"name": "Conference Name"}
)

WebcalConference

Import from iCal/webcal sources.

from voc import WebcalConference

conference = WebcalConference(url="https://example.com/events.ics")
schedule = conference.schedule(template_schedule)

Supported Formats

Input Formats

  • JSON: schedule.json format
  • iCal: RFC 5545 iCalendar format
  • Pretalx API: Direct API integration
  • CSV: Custom CSV formats (see examples in parent folder)

Output Formats

  • JSON: C3VOC schedule.json
  • XML: CCC / Frab schedule XML aka vnd.c3voc.schedule+xml
  • iCal: RFC 5545 format (TODO?)

Configuration

Environment Variables

  • PRETALX_TOKEN - API token for pretalx integration
  • C3DATA_API_URL - C3data API endpoint
  • C3DATA_TOKEN - C3data authentication token

Validation

The library includes built-in validation against the schedule XML schema:

# Validate a schedule
try:
    schedule.validate()
    print("Schedule is valid")
except ScheduleException as e:
    print(f"Validation error: {e}")

Examples

TBD, see parent folder

License

This project is licensed under the EUPL-1.2 License - see the LICENSE file for details.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

c3voc_schedule_tools-1.0.0.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

c3voc_schedule_tools-1.0.0-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file c3voc_schedule_tools-1.0.0.tar.gz.

File metadata

  • Download URL: c3voc_schedule_tools-1.0.0.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Darwin/24.6.0

File hashes

Hashes for c3voc_schedule_tools-1.0.0.tar.gz
Algorithm Hash digest
SHA256 022c3ae3de40a0ef9cea0733d5c796b243b35ab1ec44d23de4a92a6d7b9bc77c
MD5 05f90ae8bb319e9064c978e7f0c14793
BLAKE2b-256 001ba02a8921ba7fe84e74d19026673f8a9763cea0a9ce35bc24e46bfb53d1e4

See more details on using hashes here.

File details

Details for the file c3voc_schedule_tools-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for c3voc_schedule_tools-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1e906aecfc0d29376b4cacf42d3e7677ccaf61f0ede0ea4b6a1f9962d7e9ea9
MD5 4305d4f9c7d0d2b82bd358f7cb394835
BLAKE2b-256 500bdf057724ce28079a7626a44381c5a55f654bf5e3c114d7cd70c9058b9622

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page