{"id":46669891,"url":"https://github.com/llacroix/overlaymodule","last_synced_at":"2026-03-08T21:50:39.705Z","repository":{"id":64470828,"uuid":"576065757","full_name":"llacroix/overlaymodule","owner":"llacroix","description":"OverlayModule","archived":false,"fork":false,"pushed_at":"2023-03-06T21:51:01.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T16:59:53.189Z","etag":null,"topics":["module-loader","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/llacroix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-08T23:41:09.000Z","updated_at":"2023-05-19T15:23:25.000Z","dependencies_parsed_at":"2023-02-12T05:01:33.305Z","dependency_job_id":null,"html_url":"https://github.com/llacroix/overlaymodule","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/llacroix/overlaymodule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llacroix%2Foverlaymodule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llacroix%2Foverlaymodule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llacroix%2Foverlaymodule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llacroix%2Foverlaymodule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/llacroix","download_url":"https://codeload.github.com/llacroix/overlaymodule/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llacroix%2Foverlaymodule/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30274852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["module-loader","python"],"created_at":"2026-03-08T21:50:38.259Z","updated_at":"2026-03-08T21:50:39.699Z","avatar_url":"https://github.com/llacroix.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"OverlayModule\n=============\n\nThis module finder makes it possible to load modules with overlays. This\ncan be useful in cases you try to customize some kind of application in places\nat moment that is out of your control.\n\nFor example, it is useful when you want to customize an application that make\nextensive uses of global. This module will allow you to load an overlay over\na module that is being loaded right after the module has been loaded.\n\nLet say you have this module `a.b`. You'd want to customize the class `a.b:Application`.\nTo make sure that something that inherits later from `a.b:Application` will in fact\ninherit from `o.overlay.a.b:Application`.\n\nWhen the module is being loaded it will first load `a.b` then it will execute the module\n`o.overlay.a.b` on top of the module `a.b`.\n\nIn short, this is more or less monkey patching on steroid.\n\nHow to use:\n-----------\n\nFor the script using it:\n\n    import importlib\n    from overlaymodule import OverlayFinder\n\n    module_spec = importlib.util.find_spec('a')\n    module_path = odoo_spec.submodule_search_locations[0]\n\n    sys.meta_path.insert(\n        0,\n        OverlayFinder(\n            'a',\n            module_path,\n            overlays=[\n                \"o.overlay\",\n            ]\n        )\n    )\n\n    from a.b import Application, OldApplication\n\n\nA module overlay `o.overlay.a.b`\n\n    # since a.b is already loaded, it's possible to import it within itself!\n    from a.b import Application as OldApplication\n\n    class Application(OldApplication):\n        pass\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllacroix%2Foverlaymodule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllacroix%2Foverlaymodule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllacroix%2Foverlaymodule/lists"}