--- id: time-machine version: "3.4.0" license: MIT license_treatment: permissive maintenance: active --- # time-machine — Travel through time in your tests. License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install time-machine uv add time-machine poetry add time-machine ## Description ============ time-machine ============ .. image:: https://img.shields.io/readthedocs/time-machine?style=for-the-badge :target: https://time-machine.readthedocs.io/en/latest/ .. image:: https://img.shields.io/github/actions/workflow/status/adamchainz/time-machine/main.yml.svg?branch=main&style=for-the-badge :target: https://github.com/adamchainz/time-machine/actions?workflow=CI .. image:: https://img.shields.io/badge/Coverage-100%25-success?style=for-the-badge :target: https://github.com/adamchainz/time-machine/actions?workflow=CI .. image:: https://img.shields.io/pypi/v/time-machine.svg?style=for-the-badge :target: https://pypi.org/project/time-machine/ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge :target: https://github.com/psf/black .. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge :target: https://github.com/pre-commit/pre-commit :alt: pre-commit ---- .. figure:: https://raw.githubusercontent.com/adamchainz/time-machine/main/docs/_static/logo.svg :alt: time-machine logo :align: center Documentation ============= Please see... ## AI interpretation — verify before relying Mocks and freezes time in tests, allowing you to travel to any datetime and control how time advances during test execution. Verdict: Production-ready time-mocking library with active maintenance, zero known vulnerabilities, and permissive MIT licensing. The medium install friction reflects platform-specific compiled wheels rather than dependency complexity. Suitable for test suites that need deterministic datetime control. [View on SkillFed](https://skillfed.io/packages/time-machine) · [View on PyPI](https://pypi.org/project/time-machine/)