{"id":13484706,"url":"https://github.com/spulec/freezegun","last_synced_at":"2026-10-19T00:10:19.451Z","repository":{"id":40949624,"uuid":"7106250","full_name":"spulec/freezegun","owner":"spulec","description":"Let your Python tests travel through time","archived":false,"fork":false,"pushed_at":"2025-08-19T19:29:42.000Z","size":920,"stargazers_count":4531,"open_issues_count":172,"forks_count":307,"subscribers_count":32,"default_branch":"master","last_synced_at":"2026-10-17T16:38:10.940Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spulec.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2012-12-11T05:11:00.000Z","updated_at":"2026-10-16T19:57:20.000Z","dependencies_parsed_at":"2022-09-13T08:12:02.991Z","dependency_job_id":"5fb7528c-d3a8-4eba-9128-42f7cab5a9d2","html_url":"https://github.com/spulec/freezegun","commit_stats":{"total_commits":472,"total_committers":127,"mean_commits":3.716535433070866,"dds":0.6292372881355932,"last_synced_commit":"5f171db0aaa02c4ade003bbc8885e0bb19efbc81"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"purl":"pkg:github/spulec/freezegun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spulec%2Ffreezegun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spulec%2Ffreezegun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spulec%2Ffreezegun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spulec%2Ffreezegun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spulec","download_url":"https://codeload.github.com/spulec/freezegun/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spulec%2Ffreezegun/sbom","scorecard":{"id":842786,"data":{"date":"2025-08-11","repo":{"name":"github.com/spulec/freezegun","commit":"c9bf52c5aa12ea1b5b8647a136a92504ea071f2f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5,"checks":[{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 4/17 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"23 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/spulec/freezegun/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/spulec/freezegun/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/spulec/freezegun/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/spulec/freezegun/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/spulec/freezegun/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/spulec/freezegun/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/spulec/freezegun/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/spulec/freezegun/release.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yaml:31","Warn: pipCommand not pinned by hash: .github/workflows/ci.yaml:32","Warn: pipCommand not pinned by hash: .github/workflows/ci.yaml:70","Warn: pipCommand not pinned by hash: .github/workflows/ci.yaml:73","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:32","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:33","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release.yml:15","Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 1.5.5 not signed: https://api.github.com/repos/spulec/freezegun/releases/238765353","Warn: release artifact 1.5.4 not signed: https://api.github.com/repos/spulec/freezegun/releases/236367961","Warn: release artifact 1.5.3 not signed: https://api.github.com/repos/spulec/freezegun/releases/231990352","Warn: release artifact 1.5.2 not signed: https://api.github.com/repos/spulec/freezegun/releases/220789293","Warn: release artifact 1.5.1 not signed: https://api.github.com/repos/spulec/freezegun/releases/155368007","Warn: release artifact 1.5.5 does not have provenance: https://api.github.com/repos/spulec/freezegun/releases/238765353","Warn: release artifact 1.5.4 does not have provenance: https://api.github.com/repos/spulec/freezegun/releases/236367961","Warn: release artifact 1.5.3 does not have provenance: https://api.github.com/repos/spulec/freezegun/releases/231990352","Warn: release artifact 1.5.2 does not have provenance: https://api.github.com/repos/spulec/freezegun/releases/220789293","Warn: release artifact 1.5.1 does not have provenance: https://api.github.com/repos/spulec/freezegun/releases/155368007"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:11"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T20:50:26.376Z","repository_id":40949624,"created_at":"2025-08-23T20:50:26.376Z","updated_at":"2025-08-23T20:50:26.376Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38335178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-17T02:00:06.547Z","response_time":57,"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-07-31T17:01:30.919Z","updated_at":"2026-10-19T00:10:19.202Z","avatar_url":"https://github.com/spulec.png","language":"Python","funding_links":[],"categories":["Testing","Python","Testing and Quality","资源列表","测试","Topics Index","Mock and Stub","Testing [🔝](#readme)","Testing Tools","Awesome Python","File Manipulation"],"sub_categories":["Testing","测试","Unit Testing","HTTP Clients"],"readme":"FreezeGun: Let your Python tests travel through time\n====================================================\n\n.. image:: https://img.shields.io/pypi/v/freezegun.svg\n   :target: https://pypi.python.org/pypi/freezegun/\n.. image:: https://github.com/spulec/freezegun/workflows/CI/badge.svg\n   :target: https://github.com/spulec/freezegun/actions\n.. image:: https://coveralls.io/repos/spulec/freezegun/badge.svg?branch=master\n   :target: https://coveralls.io/r/spulec/freezegun\n\nFreezeGun is a library that allows your Python tests to travel through time by mocking the datetime module.\n\nUsage\n-----\n\nOnce the decorator or context manager have been invoked, all calls to datetime.datetime.now(), datetime.datetime.utcnow(), datetime.date.today(), time.time(), time.localtime(), time.gmtime(), and time.strftime() will return the time that has been frozen. time.monotonic() and time.perf_counter() will also be frozen, but as usual it makes no guarantees about their absolute value, only their changes over time.\n\nDecorator\n~~~~~~~~~\n\n.. code-block:: python\n\n    from freezegun import freeze_time\n    import datetime\n    import unittest\n\n    # Freeze time for a pytest style test:\n\n    @freeze_time(\"2012-01-14\")\n    def test():\n        assert datetime.datetime.now() == datetime.datetime(2012, 1, 14)\n\n    # Or a unittest TestCase - freezes for every test, and set up and tear down code\n\n    @freeze_time(\"1955-11-12\")\n    class MyTests(unittest.TestCase):\n        def test_the_class(self):\n            assert datetime.datetime.now() == datetime.datetime(1955, 11, 12)\n\n    # Or any other class - freezes around each callable (may not work in every case)\n\n    @freeze_time(\"2012-01-14\")\n    class Tester(object):\n        def test_the_class(self):\n            assert datetime.datetime.now() == datetime.datetime(2012, 1, 14)\n\n    # Or method decorator, might also pass frozen time object as kwarg\n\n    class TestUnitTestMethodDecorator(unittest.TestCase):\n        @freeze_time('2013-04-09')\n        def test_method_decorator_works_on_unittest(self):\n            self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())\n\n        @freeze_time('2013-04-09', as_kwarg='frozen_time')\n        def test_method_decorator_works_on_unittest(self, frozen_time):\n            self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())\n            self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.date())\n\n        @freeze_time('2013-04-09', as_kwarg='hello')\n        def test_method_decorator_works_on_unittest(self, **kwargs):\n            self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())\n            self.assertEqual(datetime.date(2013, 4, 9), kwargs.get('hello').time_to_freeze.date())\n\nContext manager\n~~~~~~~~~~~~~~~\n\n.. code-block:: python\n\n    from freezegun import freeze_time\n\n    def test():\n        assert datetime.datetime.now() != datetime.datetime(2012, 1, 14)\n        with freeze_time(\"2012-01-14\"):\n            assert datetime.datetime.now() == datetime.datetime(2012, 1, 14)\n        assert datetime.datetime.now() != datetime.datetime(2012, 1, 14)\n\nRaw use\n~~~~~~~\n\n.. code-block:: python\n\n    from freezegun import freeze_time\n\n    freezer = freeze_time(\"2012-01-14 12:00:01\")\n    freezer.start()\n    assert datetime.datetime.now() == datetime.datetime(2012, 1, 14, 12, 0, 1)\n    freezer.stop()\n\nTimezones\n~~~~~~~~~\n\n.. code-block:: python\n\n    from freezegun import freeze_time\n\n    @freeze_time(\"2012-01-14 03:21:34\", tz_offset=-4)\n    def test():\n        assert datetime.datetime.utcnow() == datetime.datetime(2012, 1, 14, 3, 21, 34)\n        assert datetime.datetime.now() == datetime.datetime(2012, 1, 13, 23, 21, 34)\n\n        # datetime.date.today() uses local time\n        assert datetime.date.today() == datetime.date(2012, 1, 13)\n\n    @freeze_time(\"2012-01-14 03:21:34\", tz_offset=-datetime.timedelta(hours=3, minutes=30))\n    def test_timedelta_offset():\n        assert datetime.datetime.now() == datetime.datetime(2012, 1, 13, 23, 51, 34)\n\nNice inputs\n~~~~~~~~~~~\n\nFreezeGun uses dateutil behind the scenes so you can have nice-looking datetimes.\n\n.. code-block:: python\n\n    @freeze_time(\"Jan 14th, 2012\")\n    def test_nice_datetime():\n        assert datetime.datetime.now() == datetime.datetime(2012, 1, 14)\n\nFunction and generator objects\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nFreezeGun is able to handle function and generator objects.\n\n.. code-block:: python\n\n    def test_lambda():\n        with freeze_time(lambda: datetime.datetime(2012, 1, 14)):\n            assert datetime.datetime.now() == datetime.datetime(2012, 1, 14)\n\n    def test_generator():\n        datetimes = (datetime.datetime(year, 1, 1) for year in range(2010, 2012))\n\n        with freeze_time(datetimes):\n            assert datetime.datetime.now() == datetime.datetime(2010, 1, 1)\n\n        with freeze_time(datetimes):\n            assert datetime.datetime.now() == datetime.datetime(2011, 1, 1)\n\n        # The next call to freeze_time(datetimes) would raise a StopIteration exception.\n\n``tick`` argument\n~~~~~~~~~~~~~~~~~\n\nFreezeGun has an additional ``tick`` argument which will restart time at the given\nvalue, but then time will keep ticking. This is an alternative to the default\nparameters which will keep time stopped.\n\n.. code-block:: python\n\n    @freeze_time(\"Jan 14th, 2020\", tick=True)\n    def test_nice_datetime():\n        assert datetime.datetime.now() \u003e datetime.datetime(2020, 1, 14)\n\n``auto_tick_seconds`` argument\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nFreezeGun has an additional ``auto_tick_seconds`` argument which will autoincrement the\nvalue every time by the given amount from the start value. This is an alternative to the default\nparameters which will keep time stopped. Note that given ``auto_tick_seconds`` the ``tick`` parameter will be ignored.\n\n.. code-block:: python\n\n    @freeze_time(\"Jan 14th, 2020\", auto_tick_seconds=15)\n    def test_nice_datetime():\n        first_time = datetime.datetime.now()\n        auto_incremented_time = datetime.datetime.now()\n        assert first_time + datetime.timedelta(seconds=15) == auto_incremented_time\n\n\nManual ticks\n~~~~~~~~~~~~\n\nFreezeGun allows for the time to be manually forwarded as well.\n\n.. code-block:: python\n\n    def test_manual_tick():\n        initial_datetime = datetime.datetime(year=1, month=7, day=12,\n                                            hour=15, minute=6, second=3)\n        with freeze_time(initial_datetime) as frozen_datetime:\n            assert frozen_datetime() == initial_datetime\n\n            frozen_datetime.tick()\n            initial_datetime += datetime.timedelta(seconds=1)\n            assert frozen_datetime() == initial_datetime\n\n            frozen_datetime.tick(delta=datetime.timedelta(seconds=10))\n            initial_datetime += datetime.timedelta(seconds=10)\n            assert frozen_datetime() == initial_datetime\n\n.. code-block:: python\n\n    def test_monotonic_manual_tick():\n        initial_datetime = datetime.datetime(year=1, month=7, day=12,\n                                            hour=15, minute=6, second=3)\n        with freeze_time(initial_datetime) as frozen_datetime:\n            monotonic_t0 = time.monotonic()\n            frozen_datetime.tick(1.0)\n            monotonic_t1 = time.monotonic()\n            assert monotonic_t1 == monotonic_t0 + 1.0\n\n\nMoving time to specify datetime\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nFreezeGun allows moving time to specific dates.\n\n.. code-block:: python\n\n    def test_move_to():\n        initial_datetime = datetime.datetime(year=1, month=7, day=12,\n                                            hour=15, minute=6, second=3)\n\n        other_datetime = datetime.datetime(year=2, month=8, day=13,\n                                            hour=14, minute=5, second=0)\n        with freeze_time(initial_datetime) as frozen_datetime:\n            assert frozen_datetime() == initial_datetime\n\n            frozen_datetime.move_to(other_datetime)\n            assert frozen_datetime() == other_datetime\n\n            frozen_datetime.move_to(initial_datetime)\n            assert frozen_datetime() == initial_datetime\n\n\n    @freeze_time(\"2012-01-14\", as_arg=True)\n    def test(frozen_time):\n        assert datetime.datetime.now() == datetime.datetime(2012, 1, 14)\n        frozen_time.move_to(\"2014-02-12\")\n        assert datetime.datetime.now() == datetime.datetime(2014, 2, 12)\n\nParameter for ``move_to`` can be any valid ``freeze_time`` date (string, date, datetime).\n\n``real_asyncio`` parameter\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nFreezeGun has an additional ``real_asyncio`` parameter which allows asyncio event loops to see real monotonic time even though time.monotonic() is frozen. This is useful to avoid breaking asyncio.sleep() and other asyncio functions that rely on monotonic time.\n\n.. code-block:: python\n\n    @freeze_time(\"2012-01-14\", real_asyncio=True)\n    async def test_asyncio():\n        await asyncio.sleep(1)\n        assert datetime.datetime.now() == datetime.datetime(2012, 1, 14)\n\nAPI Documentation\n~~~~~~~~~~~~~~~~~\n\nHere is a succinct API documentation with all options listed:\n\n.. code-block:: python\n\n    freeze_time(time_to_freeze: Optional[_Freezable]=None, tz_offset: Union[int, datetime.timedelta]=0, ignore: Optional[List[str]]=None, tick: bool=False, as_arg: bool=False, as_kwarg: str='', auto_tick_seconds: float=0, real_asyncio: bool=False) -\u003e _freeze_time\n\n    _freeze_time(time_to_freeze_str: Optional[_Freezable], tz_offset: Union[int, datetime.timedelta], ignore: List[str], tick: bool, as_arg: bool, as_kwarg: str, auto_tick_seconds: float, real_asyncio: Optional[bool])\n\n    _freeze_time.start() -\u003e Union[StepTickTimeFactory, TickingDateTimeFactory, FrozenDateTimeFactory]\n\n    _freeze_time.stop() -\u003e None\n\n    _freeze_time.move_to(target_datetime: _Freezable) -\u003e None\n\n    _freeze_time.tick(delta: Union[datetime.timedelta, float]=datetime.timedelta(seconds=1)) -\u003e datetime.datetime\n\n    _freeze_time.decorate_class(klass: Type[T2]) -\u003e Type[T2]\n\n    _freeze_time.decorate_coroutine(coroutine: Callable[P, Awaitable[T]]) -\u003e Callable[P, Awaitable[T]]\n\n    _freeze_time.decorate_callable(func: Callable[P, T]) -\u003e Callable[P, T]\n\n    _freeze_time.__enter__() -\u003e Union[StepTickTimeFactory, TickingDateTimeFactory, FrozenDateTimeFactory]\n\n    _freeze_time.__exit__(*args: Any) -\u003e None\n\nDefault arguments\n~~~~~~~~~~~~~~~~~\n\nNote that FreezeGun will not modify default arguments. The following code will\nprint the current date. See `here \u003chttp://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments\u003e`_ for why.\n\n.. code-block:: python\n\n    from freezegun import freeze_time\n    import datetime as dt\n\n    def test(default=dt.date.today()):\n        print(default)\n\n    with freeze_time('2000-1-1'):\n        test()\n\n\nInstallation\n------------\n\nTo install FreezeGun, simply:\n\n.. code-block:: bash\n\n    $ pip install freezegun\n\nOn Debian systems:\n\n.. code-block:: bash\n\n    $ sudo apt-get install python-freezegun\n\n\nIgnore packages\n---------------\n\nSometimes it's desired to ignore FreezeGun behaviour for particular packages (i.e. libraries).\nIt's possible to ignore them for a single invocation:\n\n\n.. code-block:: python\n\n    from freezegun import freeze_time\n\n    with freeze_time('2020-10-06', ignore=['threading']):\n        # ...\n\n\nBy default FreezeGun ignores following packages:\n\n.. code-block:: python\n\n    [\n        'nose.plugins',\n        'six.moves',\n        'django.utils.six.moves',\n        'google.gax',\n        'threading',\n        'Queue',\n        'selenium',\n        '_pytest.terminal.',\n        '_pytest.runner.',\n        'gi',\n    ]\n\n\nIt's possible to set your own default ignore list:\n\n.. code-block:: python\n\n    import freezegun\n\n    freezegun.configure(default_ignore_list=['threading', 'tensorflow'])\n\n\nPlease note this will override default ignore list. If you want to extend existing defaults\nplease use:\n\n.. code-block:: python\n\n    import freezegun\n\n    freezegun.configure(extend_ignore_list=['tensorflow'])\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspulec%2Ffreezegun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspulec%2Ffreezegun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspulec%2Ffreezegun/lists"}