https://github.com/noahmorrison/limp
Lazy imports in python
https://github.com/noahmorrison/limp
Last synced: about 1 year ago
JSON representation
Lazy imports in python
- Host: GitHub
- URL: https://github.com/noahmorrison/limp
- Owner: noahmorrison
- License: mit
- Created: 2015-06-19T03:32:51.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-06-19T03:37:17.000Z (about 11 years ago)
- Last Synced: 2025-03-30T11:41:35.089Z (about 1 year ago)
- Language: Python
- Size: 129 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# limp
Lazy imports in python
Just add ```import limp``` to the top of your imports and they'll only be imported when you use the module
```python
#!/usr/bin/python
import limp # Lazy imports begin now
import json
import sys
print('json' in sys.modules) # False
print(', '.join(json.loads('["Hello", "World!"]')))
print('json' in sys.modules) # True
```