{"id":20515358,"url":"https://github.com/guilt/reimportlib","last_synced_at":"2025-03-05T23:20:46.256Z","repository":{"id":57460932,"uuid":"193560687","full_name":"guilt/reimportlib","owner":"guilt","description":"reimportlib: Refactored Imports.","archived":false,"fork":false,"pushed_at":"2020-05-26T07:12:47.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T10:13:51.260Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/reimportlib/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guilt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-24T18:45:43.000Z","updated_at":"2020-05-26T07:11:25.000Z","dependencies_parsed_at":"2022-09-17T04:30:50.225Z","dependency_job_id":null,"html_url":"https://github.com/guilt/reimportlib","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guilt%2Freimportlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guilt%2Freimportlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guilt%2Freimportlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guilt%2Freimportlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guilt","download_url":"https://codeload.github.com/guilt/reimportlib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242118499,"owners_count":20074588,"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","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-15T21:21:07.192Z","updated_at":"2025-03-05T23:20:46.217Z","avatar_url":"https://github.com/guilt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reimportlib: refactored imports\n\nreimportlib is used to help with refactored old code\nwhere the imports were moved out, but you still wish\nto get legacy packages/classes to work, because you\nhad serialized them at a point in time but they aren't\navailable today.\n\n## Main Features\n\n* Very compact\n* Few Dependencies\n\n## Usage\n\n```python\n    import reimportlib\n    __import__ = reimportlib.import_\n\n    reimportlib.configure() # Reads mappings in .reimport.json\n    reimportlib.remap('foo.bar.', 'examples.foo.') # Notice the . at the end\n    \n    print(reimportlib.get_remapped_name('foo.bar.C')) # 'examples.foo.C'\n\n    print(reimportlib.import_module('foo.bar.B'))\n    print(reimportlib.import_from('foo.bar.D', 'c'))\n    reimportlib.instantiate('foo.bar.D', 'Foo', *[4], val=True)\n```\n\nAnd then it should automatically be able to import or instantiate\nthe new classes as required. Do check the provided test.py with\nthis distribution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguilt%2Freimportlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguilt%2Freimportlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguilt%2Freimportlib/lists"}