Install & Compatibility
Where this runs
tested against v5.199.99.21 · 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
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 7.717s · 43.3MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 6.3s · import 7.130s · 45MB
43MB installed
● package 43MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
UsersUser
✓ from vkbottle_types.objects import UsersUser
Commonly used Pydantic model for VK user profiles.
MessagesMessage
✓ from vkbottle_types.objects import MessagesMessage
Represents the raw message object from the VK API, frequently used in vkbottle message handlers.
APIMethods
✓ from vkbottle_types.methods import APIMethods
Provides type hints for VK API methods, useful for type-checking vkbottle's API object.
BaseModel
✓ from vkbottle_types.base_model import BaseModel
The base Pydantic model from which all vkbottle-types objects inherit.
This quickstart demonstrates how to instantiate and interact with Pydantic models provided by `vkbottle-types`. These models allow for strong type-hinting and validation of VK API objects, which are typically received or sent when using the `vkbottle` library.
import json
from vkbottle_types.objects import UsersUser, MessagesMessage
# Example 1: Instantiating a User type
user_data = {
"id": 12345,
"first_name": "Alex",
"last_name": "Example",
"is_closed": False,
"can_access_closed": True
}
user: UsersUser = UsersUser(**user_data)
print(f"User ID: {user.id}, Full Name: {user.first_name} {user.last_name}")
print(f"User JSON: {user.json(indent=2)}")
# Example 2: Demonstrating another type's structure
message_payload_data = {
"id": 1,
"peer_id": 2000000001,
"from_id": 12345,
"date": 1678886400,
"text": "Hello, vkbottle-types!",
"random_id": 0,
"attachments": [],
"fwd_messages": [],
"important": False,
"is_hidden": False,
"out": 0,
"conversation_message_id": 1
}
message_payload: MessagesMessage = MessagesMessage(**message_payload_data)
print(f"Message text: '{message_payload.text}' from user {message_payload.from_id}")
# These types are primarily used for type hinting and data validation
# in vkbottle applications, not for direct API calls.
Errors
Common errors & fixes
AttributeError: 'MessagesMessage' object has no attribute 'some_new_field'
The VK API has introduced a new field that is not yet reflected in your installed `vkbottle-types` version, or the field name was misspelled.
fixUpdate `vkbottle-types` to the latest version (`pip install --upgrade vkbottle-types`) or verify the field name against official VK API documentation.
TypeError: __init__() got an unexpected keyword argument 'old_field_name'
The VK API schema (and thus `vkbottle-types`) has removed or renamed a field that you are attempting to provide during model instantiation.
fixReview the `vkbottle-types` model definition (e.g., in its source code) or VK API documentation for the correct and current field names. Remove or rename the problematic argument.
ImportError: cannot import name 'SomeType' from 'vkbottle_types.objects'
The specified type name is incorrect, misspelled, or the type has been moved/renamed in a newer version of `vkbottle-types`.
fixConsult the `vkbottle-types` documentation or explore the `vkbottle_types` package content (e.g., using an IDE's autocomplete or `dir()`) to find the correct import path and symbol name.
Upgrade
Version history
5.199.99.21latest on PyPI · released Jun 2, 2026
Audit
Dependencies
No dependency data recorded yet.