Registry / type-stubs / types-vobject

types-vobject

JSON →
library0.9.9.20260518pypypiunverified

The `types-vobject` library provides type annotations (stubs) for the `vobject` library, enabling static type checkers like MyPy or Pyright to analyze code that uses `vobject` for potential type-related errors. It does not provide any runtime functionality itself. As part of the `typeshed` project, it is frequently updated to reflect changes in `vobject` and improvements in typing quality. The current version is 0.9.9.20260408.

pip install types-vobject
INSTALL
IMPORT
SIG · TYPES-VOBJECT
T
types-vobject
type-stubspythonv0.9.9.20260518
Install
1.7s avg
Import
72ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.9.20260518 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.075s · 21.9MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.7s · import 0.068s · 22MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

vobject
import vobject_stubs as vobject
import vobject-stubs as vobject

This quickstart demonstrates how to use the `vobject` library with type hints. It shows creating a simple VCALENDAR with an event, adding properties, and serializing it. With `types-vobject` installed, a type checker will provide autocompletion and error checking for `vobject` objects and methods.

import vobject from vobject.base import Component, VEvent from typing import cast, List # Install 'vobject' and 'types-vobject' first: # pip install vobject types-vobject def create_simple_calendar() -> Component: """Creates a VCALENDAR with a single VEVENT using type hints.""" # 'calendar' is inferred as vobject.base.Component calendar = vobject.newFromBehavior('vcalendar') # Add an event component event: Component = calendar.add('vevent') # Accessing the event via vevent_list is type-safe due to stubs event_list: List[VEvent] = calendar.vevent_list first_event = event_list[0] # first_event is inferred as VEvent first_event.add('dtstart').value = '20231027T100000' first_event.add('dtend').value = '20231027T110000' first_event.add('summary').value = 'Meeting with client' first_event.add('description').value = 'Discuss project roadmap and next steps.' return calendar if __name__ == '__main__': my_calendar = create_simple_calendar() print(my_calendar.serialize()) # Accessing properties with type safety first_event: VEvent = my_calendar.vevent_list[0] print(f"\nEvent Summary: {first_event.summary.value}") print(f"Event Description: {first_event.description.value}") print(f"Event Start: {first_event.dtstart.value}")
Debug
Known issues
gotchaInstalling `types-vobject` provides only type annotations for static analysis; it does not add any new runtime objects, functions, or classes to your Python environment. You must install the actual `vobject` library (`pip install vobject`) to use its functionalities.
fix
Always install `vobject` (e.g., `pip install vobject`) alongside `types-vobject` if you intend to run the code.
affects: All versions
gotchaThe type stubs provided by `types-vobject` are generated from a specific version of the `vobject` library. Using significantly different versions of `vobject` and `types-vobject` can lead to incorrect type checking results (e.g., missing attributes or incorrect signatures) or even runtime errors if type hints mislead you.
fix
Ensure your `vobject` and `types-vobject` versions are relatively close. If you encounter type checking issues, try upgrading both packages to their latest compatible versions or checking the `typeshed` repository for which `vobject` version the stubs target.
affects: All versions
Upgrade
Version history
0.9.9.20260518latest on PyPI · released May 18, 2026
Audit
Dependencies
vobjectoptionalThe stubs are useless without the actual `vobject` library installed for runtime execution.
Agent activity
41 hits · last 30 days
node
38
OpenAI (training)
1
Resources
types-vobject — pip install types-vobject · libregistry