Skip to main content

pyrestmock

Mock REST APIs

Installation

pip install pyrestmock

💡 Usage Examples

Basic Operations

from pylib_restmock import MockServer

# Create mock server
server = MockServer()
server.add_route("GET", "/api/data", {"result": "success"})
response = server.request("GET", "/api/data")

AI/ML Use Cases

from pylib_restmock import MockServer

# Mock AI API for testing
mock_ai_api = MockServer()
mock_ai_api.add_route("POST", "/api/predict", {"prediction": "cat"})

📚 API Reference

See package documentation for complete API reference.

🤖 AI Agent Friendly

This package is optimized for AI agents and code generation tools:

  • Clear function names and signatures
  • Comprehensive docstrings with examples
  • Type hints for better IDE support
  • Common use cases documented
  • Zero dependencies for reliability

License

MIT

Release files for pylib-restmock 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylib-restmock 0.1.0
File Size Uploaded
pylib_restmock-0.1.0.tar.gz 2.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylib-restmock 0.1.0
File Interpreter ABI Platform
pylib_restmock-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.0 kB

Release files / pylib_restmock-0.1.0.tar.gz

Download URL pylib_restmock-0.1.0.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4193f6144cbbddfca0d2ece88aec61ab026201e67470fb19221f41852f13b294
BLAKE2b-256 checksum
How to use checksums
b38e9d44a9b17aa73c00be02f96e427ebcabdfb3e7db6bf57a17ae95ef99ad83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / pylib_restmock-0.1.0-py3-none-any.whl

Download URL pylib_restmock-0.1.0-py3-none-any.whl
Size 1.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
09191d44f214fdba61ea0e15745b2ac1474e42455f6c0a5c50bcf553d347435e
BLAKE2b-256 checksum
How to use checksums
31d15ac509e5a60942147a5ef6a396854c2670fddd9f273c976286d38e5a80cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page