Registry / type-stubs / discord-protos

discord-protos

JSON →
library1.2.229pypypi✓ verified 80d ago

Type stubs and Python bindings for Discord's internal protobuf definitions used in user settings and account data. Version 1.2.183 is the latest, following Discord's internal proto changes closely. Released on PyPI with no fixed cadence.

pip install discord-protos
INSTALL
IMPORT
SIG · DISCORD-PROTOS
D
discord-protos
type-stubspythonv1.2.229
Install
2.0s avg
Import
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.229 · 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.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 22MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.0s · import 0.000s · 23MB
20MB installed
● package 20MB
Code
Verified usage

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

AcknowledgedApplicationDisclosures
from discord_protos import AcknowledgedApplicationDisclosures
from discord_protos.user_settings import UserSettings
ApplicationUserRoleConnection
from discord_protos import ApplicationUserRoleConnection
from discord_protos.user_settings import UserSettings
FrecencyUserSettings
from discord_protos import FrecencyUserSettings
from discord_protos.user_settings import UserSettings

Deserialize a Discord user settings protobuf from file bytes.

import os from discord_protos.user_settings import UserSettings # Load serialized protobuf bytes with open('user_settings.bin', 'rb') as f: data = f.read() settings = UserSettings() settings.ParseFromString(data) print(settings.discord_status) print(settings.theme)
Debug
Known issues
breakingDirect import of protobuf classes from top-level package fails; use submodule paths.
fix
Use `from discord_protos.<submodule> import <Class>` matching the proto file name.
affects: all
deprecatedThe package may be abandoned; last update was June 2023 and no commit since.
fix
Consider forking or using the protos from the official Discord data exports directly.
affects: >=1.0.0
gotchaProtobuf field names use snake_case (e.g., `discord_status`) not camelCase as in JavaScript.
fix
Always check the .proto files or generated Python stubs for exact field names.
affects: all
Upgrade
Version history
1.2.229latest on PyPI · released Jun 18, 2026
Audit
Dependencies
protobufrequiredRuntime dependency for protobuf message classes
betterprotooptionalUsed for generating async-friendly protobuf types (optional if using pure protobuf)
Agent activity
39 hits · last 30 days
node
34
OpenAI (training)
1
Resources
discord-protos — pip install discord-protos · libregistry