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()

# Modify / Filter / etc


# 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.1.0.tar.gz (32.9 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.1.0-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: c3voc_schedule_tools-1.1.0.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for c3voc_schedule_tools-1.1.0.tar.gz
Algorithm Hash digest
SHA256 6dc7b57f9ca5c09f9e147bfc544509b9ec92972e66e5725d78143615c98694e7
MD5 e69e506d9ba2d0141945a39d5fb31582
BLAKE2b-256 7a69023190aaa63c2dd1c9db2ca9ae2e8f16c511fefd5cb877579f06fa0b661e

See more details on using hashes here.

Provenance

The following attestation bundles were made for c3voc_schedule_tools-1.1.0.tar.gz:

Publisher: publish.yml on voc/schedule

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for c3voc_schedule_tools-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8fda3dad7b69ec2187bb10e0c60e412389b42951d70fdc49b6580c04f6b9948
MD5 d21205c5988f02529080ac5a6e07d452
BLAKE2b-256 3575182bd275fa1724a657fc6a0b589f8e70ac2266724459bbdc0b970e55fcaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for c3voc_schedule_tools-1.1.0-py3-none-any.whl:

Publisher: publish.yml on voc/schedule

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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