mocket
A socket mock framework with gevent/asyncio/SSL support for Python.
Pricing
Free tier
Flat rate
Adoption
→StableLicense
Open Source
Data freshness
Aging · Jun 8, 2026Overview
What is mocket?
Mocket is a powerful tool that allows developers to mock network sockets in their Python applications, supporting gevent, asyncio, and SSL. It's essential for testing network interactions without actual network traffic.
Key differentiator
“Mocket stands out as the only Python library providing robust support for socket mocking with gevent, asyncio, and SSL, making it ideal for comprehensive network testing in Python applications.”
Capability profile
Capability Radar
Honest assessment
Strengths & Weaknesses
↑ Strengths
↓ Weaknesses
Mocket is primarily designed and optimized for Python, making it less suitable for multi-language projects.
The transition from v0.1 to v0.2 required significant rewrites of existing test cases due to API changes.
Setting up Mocket for complex asynchronous testing scenarios with gevent and asyncio can be intricate and error-prone.
Fit analysis
Who is it for?
✓ Best for
Python developers who need to mock socket operations for testing purposes.
Teams working on applications that require extensive network interaction testing.
Projects where secure (SSL) socket mocking is necessary for comprehensive testing.
✕ Not a fit for
Developers looking for a cloud-based service for managing their tests.
Projects that do not involve Python or require non-socket-related mocking.
Cost structure
Pricing
Free Tier
Available
Open source — free to use
Starts at
$0
Model
Flat rate
Enterprise
None
Performance benchmarks
How Fast Is It?
Ecosystem
Relationships
Next step
Get Started with mocket
Step-by-step setup guide with code examples and common gotchas.