{"id":17717271,"url":"https://github.com/bwesterb/py-demandimport","last_synced_at":"2025-07-28T05:34:22.514Z","repository":{"id":62567580,"uuid":"9731167","full_name":"bwesterb/py-demandimport","owner":"bwesterb","description":"Lazy import python modules for low start-up time.  (Taken from mercurial.)","archived":false,"fork":false,"pushed_at":"2024-07-15T10:56:04.000Z","size":40,"stargazers_count":50,"open_issues_count":5,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-29T22:16:08.463Z","etag":null,"topics":["lazy","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bwesterb.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-04-28T14:38:46.000Z","updated_at":"2024-12-12T21:52:45.000Z","dependencies_parsed_at":"2024-10-25T17:11:27.429Z","dependency_job_id":"b1054141-6543-4fdc-bf51-106e42f408b8","html_url":"https://github.com/bwesterb/py-demandimport","commit_stats":{"total_commits":56,"total_committers":3,"mean_commits":"18.666666666666668","dds":0.0357142857142857,"last_synced_commit":"ca9c11635407b4b012c4b70f6fe03729b924eacd"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/bwesterb/py-demandimport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwesterb%2Fpy-demandimport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwesterb%2Fpy-demandimport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwesterb%2Fpy-demandimport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwesterb%2Fpy-demandimport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bwesterb","download_url":"https://codeload.github.com/bwesterb/py-demandimport/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwesterb%2Fpy-demandimport/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267468546,"owners_count":24092334,"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-07-28T02:00:09.689Z","response_time":68,"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":["lazy","python"],"created_at":"2024-10-25T14:19:37.541Z","updated_at":"2025-07-28T05:34:22.492Z","avatar_url":"https://github.com/bwesterb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"demandimport\n************\n\nDelays loading of modules until they are actually used.  Perfect for Python\napps that need to be snappy like command-line utils.  Source-code derived\nfrom mercurial.\n\nTo enable, write\n\n.. code:: python\n\n   import demandimport; demandimport.enable()\n\nImports of the following form will be delayed\n\n.. code:: python\n\n   import a, b.c\n   import a.b as c\n   from a import b, c # a will be loaded immediately, though\n\nThese imports with not be delayed\n\n.. code:: python\n\n   from a import *\n   b = __import__(a)\n\nDelayed loading will confuse some third-party modules.  In that case you\ncan disable the delay for just that module.  For example\n\n.. code:: python\n\n   demandimport.ignore('Crypto.PublicKey._fastmath')\n\nThere are also versions that can be used with ``with``\n\n.. code:: python\n\n   with demandimport.enabled():\n      # do something\n      with demandimport.disabled():\n         import troublesome.module\n      with demandimport.ignored('test'):\n         import other.troublemaker\n\nInstallation\n============\n\nTo install ``demandimport``, simply run::\n\n   pip install demandimport\n\nAttribution\n===========\n\nOlivia Mackall \u003colivia@selenic.com\u003e is the original author of the module in\nMercurial on which this module is based.  Bas Westerbaan \u003cbas@westerbaan.name\u003e\nmaintains it now.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwesterb%2Fpy-demandimport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbwesterb%2Fpy-demandimport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwesterb%2Fpy-demandimport/lists"}