How tgalal/yowsup works
Yowsup is a Python library for building WhatsApp clients. A client configures a profile, constructs a layered protocol stack, authenticates, and exchanges protocol traffic; separate registration requests handle account setup. The layers cover messaging and several social, media, and session features, with Axolotl providing encryption and profile-backed key state. Edges are limited to relationships shown by excerpts, SOURCE INDEX references, or the README; unsampled feature-layer internals are represented by their exact directories without inferred call chains.
Main entry points: yowstack.py Layered Stack · profile.py Client Profile · layer.py Noise Handshake · coder Binary Codec
Components 21
Profiles & Registration
- Client Profile
yowsup/profile/profile.py - Config Management
yowsup/config/manager.py - Account Registration
yowsup/registration
Connection & Encoding
- HTTP Requests
yowsup/common/http/warequest.py - Response Parsing
yowsup/common/http/waresponseparser.py - Layered Stack
yowsup/stacks/yowstack.py - Authentication
yowsup/layers/auth/layer_authentication.py - Network Transport
yowsup/layers/network/layer.py - Noise Handshake
yowsup/layers/noise/layer.py - Binary Codec
yowsup/layers/coder - Protocol Tree
yowsup/structs/protocoltreenode.py
WhatsApp Protocols
- Messages
yowsup/layers/protocol_messages - Media Transfer
yowsup/layers/protocol_media - Contacts Sync
yowsup/layers/protocol_contacts - Group Chats
yowsup/layers/protocol_groups - Presence & Chatstate
yowsup/layers/protocol_presence - Other Protocols
yowsup/layers/protocol_iq
Session Security
- Axolotl Manager
yowsup/axolotl/manager.py - SQLite Key Store
yowsup/axolotl/store/sqlite/liteaxolotlstore.py
Other components
- Client Application
- WhatsApp Service
Connections 21
- Client Application → Client Profile: configures
- Client Profile → Config Management: loads and saves
yowsup/profile/profile.py - Client Application → Account Registration: requests account setup
- Account Registration → HTTP Requests: sends requests
yowsup/registration/coderequest.py - HTTP Requests → Response Parsing: parses responses
yowsup/common/http/warequest.py - Client Profile → Axolotl Manager: creates manager
yowsup/profile/profile.py - Layered Stack → Authentication: constructs
yowsup/stacks/yowstack.py - Layered Stack → Network Transport: constructs
yowsup/stacks/yowstack.py - Layered Stack → Noise Handshake: constructs
yowsup/stacks/yowstack.py - Layered Stack → Binary Codec: constructs
yowsup/stacks/yowstack.py - Layered Stack → Messages: constructs
yowsup/stacks/yowstack.py - Layered Stack → Media Transfer: constructs
yowsup/stacks/yowstack.py - Layered Stack → Contacts Sync: constructs
yowsup/stacks/yowstack.py - Layered Stack → Group Chats: constructs
yowsup/stacks/yowstack.py - Layered Stack → Presence & Chatstate: constructs
yowsup/stacks/yowstack.py - Noise Handshake → Network Transport: uses transport
yowsup/layers/noise/layer.py - Noise Handshake → Authentication: uses authentication
yowsup/layers/noise/layer.py - Noise Handshake → Binary Codec: uses encoding
yowsup/layers/noise/layer.py - Binary Codec → Protocol Tree: encodes protocol nodes
- Client Profile → WhatsApp Service: supports client communication
- Axolotl Manager → SQLite Key Store: uses persistent store
yowsup/axolotl/manager.py