{"library":"time-machine","type":"library","category":null,"description":"time-machine is a Python library that enables 'time travel' in your tests by mocking Python's standard library functions that return the current date or datetime. It achieves this efficiently using C extensions, providing a fast and robust solution for time-dependent testing. The library is actively maintained, with version 3.2.0 released in December 2025.","language":"python","status":"active","version":"3.2.0","tags":["testing","time","mock","datetime","pytest"],"last_verified":"Tue Jun 09","install":[{"cmd":"pip install time-machine","imports":["from time_machine import travel","from time_machine import is_travelling","from time_machine import naive_mode"]}],"homepage":null,"github":"https://github.com/adamchainz/time-machine","docs":"https://time-machine.readthedocs.io/","changelog":"https://time-machine.readthedocs.io/en/latest/changelog.html","pypi":"https://pypi.org/project/time-machine/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":1.7,"avg_import_s":0.18,"wheel_type":"wheel"},"url":"https://checklist.day/v1/registry/time-machine/compatibility"}}