https://github.com/banool/import_times
Prints import times to stderr like 3.7 does, but without having 3.7.
https://github.com/banool/import_times
Last synced: about 1 year ago
JSON representation
Prints import times to stderr like 3.7 does, but without having 3.7.
- Host: GitHub
- URL: https://github.com/banool/import_times
- Owner: banool
- License: mit
- Created: 2019-08-03T01:13:58.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-05T07:25:51.000Z (almost 7 years ago)
- Last Synced: 2025-03-14T23:43:23.902Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Import Times ⏱⏱⏱
This package lets you print out import times like you were using the `-X importtime` runtime flag to Python 3.7, but with Python < 3.7 (I've tested it as working with 3.4+).
Put the following at the top of your main module:
```
from import_times import enable_import_times
enable_import_times()
```
Caveats:
- The timing information is probably different because 3.7 does its timing in `import.c` directly.
- You can't get timing information for things imported before any of your code is run (of course).
I haven't put this on PyPI yet, so to install this you can put this in your Pipfile:
```
import_times = {editable = true,git = "https://github.com/banool/import_times.git"}
```
or this in your requirements.txt:
```
git+git://github.com/banool/import_times.git
```
Good luck!! 🤠🤠🤠