Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

imitatus

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imitatus

A zero-dependency, sophisticated mock HTTP server for development and testing

  • 0.1.1
  • PyPI
  • Socket score

Maintainers
1

Imitatus

A sophisticated mock HTTP server for development and testing. Imitatus (Latin for "imitation") provides a powerful way to simulate HTTP services with precision and flexibility.

Python Version License

Features

  • 🔐 Token-based authentication system
  • 🎯 Full HTTP method coverage (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, TRACE, CONNECT)
  • 💾 Intelligent in-memory state management
  • 📊 Request logging and analytics
  • 🛡️ CORS support out of the box
  • 🧪 Ready-to-use test collection
  • ⚡ Zero external dependencies

Quick Start

# Install
git clone https://github.com/serkanaltuntas/imitatus.git
cd imitatus
pip install -r requirements.txt

# Run
python -m imitatus.server --port 8000

Basic Usage

  1. Start the server:
python -m imitatus.server
  1. Authenticate:
curl -X POST http://localhost:8000/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": "password"}'
  1. Make requests:
curl http://localhost:8000/api/items \
  -H "Authorization: Bearer your-token-here"

API Overview

Authentication

  • POST /api/login: Get authentication token
{
  "username": "admin",
  "password": "password"
}

Core Endpoints

  • GET /api/items: List all items
  • POST /api/items: Create item
  • GET /api/items/{id}: Get specific item
  • PUT /api/items/{id}: Full update
  • PATCH /api/items/{id}: Partial update
  • DELETE /api/items/{id}: Delete item

System Endpoints

  • GET /debug/vars: System state and metrics
  • OPTIONS /api/items: Available methods and API info

Dependencies

Prerequisites

  • Python 3.8+
  • pip

Production

Imitatus is designed to have zero production dependencies. It uses only Python's standard library components for all core functionality. This design choice provides several benefits:

  • 🔒 Enhanced security with no third-party dependency risks
  • ⚡ Fast and lightweight installation
  • 🎯 No version conflicts with other packages
  • 📦 Maximum portability across Python environments

Development

For development and testing, we use several high-quality tools:

# Install development dependencies
pip install -r requirements-dev.txt

# Install testing dependencies
pip install -r requirements-test.txt

See requirements-dev.txt and requirements-test.txt for the complete list of development and testing dependencies.

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Built with precision by Serkan Altuntas

Support

  • Submit issues via GitHub
  • Review documentation

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc