Skip to main content

calendario_ics

Módulo de Python para gestionar eventos en archivos .ics del calendario.
Python module to manage events in calendar .ics files.

Proporciona operaciones CRUD (crear, leer, actualizar, eliminar) sobre eventos almacenados en archivos iCalendar (.ics) en el directorio del calendario.
Provides CRUD (create, read, update, delete) operations on events stored in iCalendar (.ics) files in the calendar directory.

Todas las funciones devuelven (bool, str) o (uid, str) según corresponda.
All functions return (bool, str) or (uid, str) as appropriate.


Plataformas Soportadas (Probado con:) / Supported Platforms (Tested with:)

Esta herramienta ha sido probada oficialmente con los siguientes calendarios locales: This tool has been officially tested with the following local calendars:

Sistema Operativo Aplicación Estado
Linux KOrganizer (KDE Plasma 6) ✅ Probado
Windows Rainlendar Lite 2.24.1 (Windows 10/11) ✅ Probado
macOS No soportado actualmente ❌ Pendiente

Instalación / Installation

pip install calendario_ics

Con script / With script

# Para Linux / For Linux
# Copiar el script al directorio donde están los .py
chmod +x install.sh
./install.sh
# Para Windows / For Windows
# Abrir PowerShell
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\install.ps1

Configuración avanzada / Advanced configuration

Puedes especificar una ruta personalizada para los archivos .ics usando la variable de entorno CALENDARIO_ICS_DIR.
You can specify a custom path for the .ics files using the CALENDARIO_ICS_DIR environment variable.

# Linux / macOS
export CALENDARIO_ICS_DIR="/ruta/a/tus/calendarios"
# Windows (PowerShell)
$env:CALENDARIO_ICS_DIR="C:\ruta\a\tus\calendarios"
# Windows (CMD)
set CALENDARIO_ICS_DIR=C:\ruta\a\tus\calendarios

Si no se define, el agente intentará detectar automáticamente la ruta según tu sistema operativo:

Linux: ~/.local/share/apps/korganizer/

Windows:  %USERPROFILE%\.rainlendar2\ (o su subcarpeta Calendar)

macOS: No hay una ruta estándar para archivos ICS sueltos; usa la variable de entorno.

If not set, the agent will try to auto-detect the path based on your OS:

Linux: ~/.local/share/apps/korganizer/

Windows: %USERPROFILE%\.rainlendar2\ 

macOS: No standard path for loose ICS files; use the environment variable.

Uso como librería / Usage as a library

import calendario_ics as cal
# Listar calendarios disponibles / List available calendars
print(cal.listar_calendarios())
# Listar eventos de hoy / List today's events
print(cal.listar_eventos(start="2026-08-05", end="2026-08-05"))
# Listar eventos en un rango / List events in a range
print(cal.listar_eventos(start="2026-08-01", end="2026-08-10"))
# Agregar un evento / Add an event
uid, msg = cal.agregar_evento(
    evento={
        "summary": "Reunión con equipo / Team meeting",
        "description": "Revisar avances del proyecto / Review project progress",
        "dtstart": cal.parsear_fecha_hora("2026-08-05 10:00"),
        "dtend": cal.parsear_fecha_hora("2026-08-05 11:30"),
        "location": "Oficina virtual / Virtual office",
        "priority": 5,
    }
)
print(msg)  # Evento agregado con UID: agente-1234567890.1234
# Mostrar un evento por su UID / Show an event by UID
print(cal.mostrar_evento("agente-1234567890.1234"))
# Modificar un evento / Modify an event
ok, msg = cal.modificar_evento(
    "agente-1234567890.1234",
    summary="Reunión importante / Important meeting",
    dtstart=cal.parsear_fecha_hora("2026-08-06 11:00")
)
print(msg)  # Evento agente-1234567890.1234 modificado.
# Eliminar un evento / Delete an event
ok, msg = cal.eliminar_evento("agente-1234567890.1234")
print(msg)  # Evento agente-1234567890.1234 eliminado.

Uso como CLI / Usage as CLI

# Listar calendarios / List calendars
calendario-cli calendars
# Listar eventos de hoy / List today's events
calendario-cli list --start 2026-08-05 --end 2026-08-05
# Listar eventos en un rango / List events in a range
calendario-cli list --start 2026-08-01 --end 2026-08-10
# Agregar evento / Add event
calendario-cli add --summary "Reunión con equipo / Team meeting" --description "Revisar avances / Review progress" --dtstart "2026-08-05 10:00" --dtend "2026-08-05 11:30" --location "Oficina virtual / Virtual office" --priority 5
# Mostrar evento / Show event
calendario-cli show agente-1234567890.1234
# Modificar evento / Modify event
calendario-cli modify agente-1234567890.1234 --summary "Reunión importante / Important meeting" --dtstart "2026-08-06 11:00"
# Eliminar evento / Delete event
calendario-cli delete agente-1234567890.1234

LICENSE

MIT License

Copyright (c) 2026 Reinel G. Paredes

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Download files

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

Source Distribution

calendario_ics-2.0.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

calendario_ics-2.0.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file calendario_ics-2.0.0.tar.gz.

File metadata

  • Download URL: calendario_ics-2.0.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for calendario_ics-2.0.0.tar.gz
Algorithm Hash digest
SHA256 500ac60f95d0a1afb57c08b0c72fe451ab0e473a1a3fb2a1270b2ecb9b50f04f
MD5 4d0c3b1be86824bed63ce517651f0e72
BLAKE2b-256 4071cdcfdff3cfda227b1381c562471cdabd730ca36520a362428dc6ddfac5fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for calendario_ics-2.0.0.tar.gz:

Publisher: publish.yml on rgparedess/calendario_ics

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

File details

Details for the file calendario_ics-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: calendario_ics-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for calendario_ics-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 179275e3ae9f831d63898e6c07fab3a1bab2da35ab560081f7ec4da667da14ab
MD5 124de1451fb8f8e46fa1cd4f03fa554a
BLAKE2b-256 d39dadf1a7a668500c8993cd5544d22d3e0dac5bf9c9a5ace394ccdb57b13029

See more details on using hashes here.

Provenance

The following attestation bundles were made for calendario_ics-2.0.0-py3-none-any.whl:

Publisher: publish.yml on rgparedess/calendario_ics

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 Sentry Error logging StatusPage Status page