{"id":19686322,"url":"https://github.com/closeio/freezefrog","last_synced_at":"2025-09-12T04:39:39.776Z","repository":{"id":57432204,"uuid":"53440469","full_name":"closeio/freezefrog","owner":"closeio","description":"Python library to efficiently mock datetimes in unit tests","archived":false,"fork":false,"pushed_at":"2023-01-31T11:03:15.000Z","size":26,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-09-03T11:51:50.838Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/closeio.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-08T19:48:25.000Z","updated_at":"2024-09-26T14:05:19.000Z","dependencies_parsed_at":"2023-02-16T18:25:26.649Z","dependency_job_id":null,"html_url":"https://github.com/closeio/freezefrog","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/closeio/freezefrog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/closeio%2Ffreezefrog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/closeio%2Ffreezefrog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/closeio%2Ffreezefrog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/closeio%2Ffreezefrog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/closeio","download_url":"https://codeload.github.com/closeio/freezefrog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/closeio%2Ffreezefrog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274754115,"owners_count":25342938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T18:27:31.659Z","updated_at":"2025-09-12T04:39:39.720Z","avatar_url":"https://github.com/closeio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==========\nFreezeFrog\n==========\n.. image:: https://circleci.com/gh/closeio/freezefrog/tree/master.svg?style=svg\u0026circle-token=010565a97316df8a248f0f32d584357021a3873b\n    :target: https://circleci.com/gh/closeio/freezefrog/tree/master\n\n*FreezeFrog* lets you mock datetimes in tests.\n\n(Interested in working on projects like this? `Close`_ is looking for `great engineers`_ to join our team.)\n\n.. _Close: https://close.com\n.. _great engineers: https://jobs.close.com\n\n.. contents:: Contents\n\nWhy FreezeFrog?\n---------------\n\nFreezeFrog is a Python library that lets you mock datetimes in tests. Its goal\nis to be simple and fast.\n\n* In comparison to certain other time freezing libraries, FreezeFrog doesn't\n  loop through all imported modules, making it fast even for larger projects.\n\n* FreezeFrog currently supports mocking the following basic methods:\n\n  * ``datetime.datetime.now``\n\n  * ``datetime.datetime.utcnow``\n\n  * ``time.time``\n\n* FreezeFrog supports both ``datetime`` and ``pytz`` timezone objects.\n\nUsage\n-----\n\nUse the ``FreezeTime`` context manager to freeze the time. Pass the desired\n``datetime`` object to the constructor, and the timezone to mock the system's\ntimezone (defaults to `datetime.timzone.utc`). The constructor also takes the\n``fold`` argument (``0`` by default), which defines whether an ambiguous time\nrefers to its first or second appearance, and the ``tick`` argument\n(``False`` by default), which makes the clock start ticking.\n\n.. code:: python\n\n  import datetime\n\n  from freezefrog import FreezeTime\n\n  with FreezeTime(datetime.datetime(2014, 1, 1)):\n      # The clock is frozen.\n      # Always prints 2014-01-01 00:00:00\n      print(datetime.datetime.utcnow())\n\n  with FreezeTime(datetime.datetime(2014, 1, 1), tick=True):\n      # The clock starts ticking immediately.\n      # Example output: 2014-01-01 00:00:00.000005\n      print(datetime.datetime.utcnow())\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloseio%2Ffreezefrog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloseio%2Ffreezefrog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloseio%2Ffreezefrog/lists"}