Lazy import and install on demand Python packages.
Project description
deferred-import
Lazy import and install on demand Python packages.
- Package will be loaded only when you use it in the first time. Deferring it makes module loading much faster.
- If module is missed, the package will be automatically installed. It allows to make some project dependencies optional and install them on demand.
Installation
python3 -m pip install --user deferred-import
Usage
from deferred_import import deferred_import
requests = deferred_import('requests')
attr = deferred_import('attr', package='attrs')
requests.get('http://httpbin.org/status/200')
# <Response [200]>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
deferred-import-0.1.0.tar.gz
(3.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deferred-import-0.1.0.tar.gz.
File metadata
- Download URL: deferred-import-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f03d2be2465e15797d3b556040a56bab61d6a5baa9936b767713b19e9221ed9
|
|
| MD5 |
954c28b2cbe2c6940afd23af11c07817
|
|
| BLAKE2b-256 |
1fea520d8632a1dc5bb437739045665e642b9be04e1cc3e07607b463e5a76992
|
File details
Details for the file deferred_import-0.1.0-py3-none-any.whl.
File metadata
- Download URL: deferred_import-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
261cc26159009d134501b43a94a4b723b4b064dc81f62e545c63d4a86e9332f1
|
|
| MD5 |
abbaeef88bc3091ab59d02d158be33d2
|
|
| BLAKE2b-256 |
9e5c39896a2af70994e0b7ed2765fcc9813cabf48b03269f0e5a49034df927cc
|