Skip to main content

memimport for Python 3

operating system Python implementation Python versions licenses development status
latest tag build status latest version package format monthly downloads

memimport is a part of py2exe, which helps import Python extensions from memory, e.g. extensions from Zip files or Web.

This repo via CI to build it as Python extensions, beacause the original has been built into the py2exe runstubs, only run with script, no REPL.

Development of memimport is hosted here: https://github.com/SeaHOH/memimport.
Development of py2exe is hosted here: https://github.com/py2exe/py2exe.

Installation

pip install memimport

Usage

import zipextimporter
import sys

sys.path.insert(0, 'path/to/libs.zip')

then

zipextimporter.install()            # default, prefer `hook=False`, `hook=True` as fallback

or

zipextimporter.install(hook=False)  # better compatibility, monkey patch `zipimport.zipimporter`
                                    # equal to empty argument, `hook=True` as fallback

or

zipextimporter.install(hook=True)   # not recommend, install to `sys.path_hooks`

then

import ext_mod_in_zip      # now, support __init__.pyd in packages

ext_mod_in_zip             # <module 'ext_mod_in_zip' from 'path\\to\\libs.zip\\ext_mod_in_zip\\__init__.pyd'>
ext_mod_in_zip.__file__    # 'path\\to\\libs.zip\\ext_mod_in_zip\\__init__.pyd'>
ext_mod_in_zip.__loader__  # <ZipExtensionImporter object 'path\to\libs.zip\'>

import py_mod_in_zip

py_mod_in_zip              # <module 'py_mod_in_zip' from 'path\\to\\libs.zip\\py_mod_in_zip\\__init__.py'>
py_mod_in_zip.__file__     # 'path\\to\\libs.zip\\py_mod_in_zip\\__init__.py'>
py_mod_in_zip.__loader__   # <zipimporter object 'path\to\libs.zip\'>

More usage see source or use help function.

Release files for memimport 0.13.0.0.post8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for memimport 0.13.0.0.post8
File Size Uploaded
memimport-0.13.0.0.post8.tar.gz 41.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for memimport 0.13.0.0.post8
File
memimport-0.13.0.0.post8-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
memimport-0.13.0.0.post8-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details
memimport-0.13.0.0.post8-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
memimport-0.13.0.0.post8-cp310-cp310-win32.whl CPython 3.10 CPython 3.10 Windows x86-32 Details
memimport-0.13.0.0.post8-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
memimport-0.13.0.0.post8-cp39-cp39-win32.whl CPython 3.9 CPython 3.9 Windows x86-32 Details
memimport-0.13.0.0.post8-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
memimport-0.13.0.0.post8-cp38-cp38-win32.whl CPython 3.8 CPython 3.8 Windows x86-32 Details
memimport-0.13.0.0.post8-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
memimport-0.13.0.0.post8-cp37-cp37m-win32.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-32 Details
memimport-0.13.0.0.post8-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
memimport-0.13.0.0.post8-cp36-cp36m-win32.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-32 Details

Total release size: 332.2 kB

Release files / memimport-0.13.0.0.post8.tar.gz

Download URL memimport-0.13.0.0.post8.tar.gz
Size 41.4 kB
Tags Source
SHA-256 checksum
How to use checksums
875be02e6fc08e791ba3e5d52c869b469a9032eb4ff8ab3583592f2c02baeb96
BLAKE2b-256 checksum
How to use checksums
e4364a102b03b1ddc7222a4377e40a495887734b18baa4e77c3e32d77dc69cad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

Release files / memimport-0.13.0.0.post8-cp311-cp311-win_amd64.whl

Download URL memimport-0.13.0.0.post8-cp311-cp311-win_amd64.whl
Size 25.8 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
801e71e07db9b0e056b0e47b70a48ce151cc62c3108dafd76976f0d581b17074
BLAKE2b-256 checksum
How to use checksums
2201034f71b36500d2b677ec4491b2384eac35e688217a5e2c5a7d1ddc48187d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

Release files / memimport-0.13.0.0.post8-cp311-cp311-win32.whl

Download URL memimport-0.13.0.0.post8-cp311-cp311-win32.whl
Size 24.5 kB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
be08ffac8c073338a586e09fa38b0e8cc390c6a530a223c654cabfc5b380bf31
BLAKE2b-256 checksum
How to use checksums
eda0e120cc36f4e5930b969ece45af9d195661c015e6a62fadd2cd7a61672ca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

Release files / memimport-0.13.0.0.post8-cp310-cp310-win_amd64.whl

Download URL memimport-0.13.0.0.post8-cp310-cp310-win_amd64.whl
Size 25.8 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
edaccedaf1a23418283de7cb5a8d556b88aaac9f816fbb70dca5dfa89abc14b1
BLAKE2b-256 checksum
How to use checksums
b85b275b0225f50fd369405318a3b31610ed285f62161ba1d19d09dd0e950376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

Release files / memimport-0.13.0.0.post8-cp310-cp310-win32.whl

Download URL memimport-0.13.0.0.post8-cp310-cp310-win32.whl
Size 24.6 kB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
8c2608e3ee6d4641d4fdda7fcf722ae1339e6ed42a046e95a1cc199d5ed52926
BLAKE2b-256 checksum
How to use checksums
6cec19cdbb821a7650cdee17a1e5a0b58a5ea41f0892ca786672814a08be65be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

Release files / memimport-0.13.0.0.post8-cp39-cp39-win_amd64.whl

Download URL memimport-0.13.0.0.post8-cp39-cp39-win_amd64.whl
Size 25.8 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
73236b2e72fb2b328c9fac937f7d0a2cd591f32b44f6aa31262b8e78eb963d07
BLAKE2b-256 checksum
How to use checksums
7e7c3d3855b0c4fcfc383e36f099436fe5af099e810c46c7c6a28291b44352f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

Release files / memimport-0.13.0.0.post8-cp39-cp39-win32.whl

Download URL memimport-0.13.0.0.post8-cp39-cp39-win32.whl
Size 24.6 kB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
0723545ea2593fa9478ad05e542c226411fbcb2d7288a0389f71f155b141e09c
BLAKE2b-256 checksum
How to use checksums
1a14aa10b4315301942ff7280a8a507e332c1eba941ea350dd9d28ee6f76a2b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

Release files / memimport-0.13.0.0.post8-cp38-cp38-win_amd64.whl

Download URL memimport-0.13.0.0.post8-cp38-cp38-win_amd64.whl
Size 25.8 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
3c78536be24f858dd123f822be68d63b2eaeeaa0f2e706b21304a5440415b585
BLAKE2b-256 checksum
How to use checksums
edbf5f4c7983c495091f078e3458dbecb65fc8b70e0d8733786f8f69e258827d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

Release files / memimport-0.13.0.0.post8-cp38-cp38-win32.whl

Download URL memimport-0.13.0.0.post8-cp38-cp38-win32.whl
Size 24.5 kB
Tags CPython 3.8 Windows x86-32
SHA-256 checksum
How to use checksums
46db8e94fd6467c64391204ae8542d2d02617bc132b982d7826d9a3e5a1b6168
BLAKE2b-256 checksum
How to use checksums
792142c62776c5d05b178a2691509755843f1be12c840cea148ba8f000f3bde6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

Release files / memimport-0.13.0.0.post8-cp37-cp37m-win_amd64.whl

Download URL memimport-0.13.0.0.post8-cp37-cp37m-win_amd64.whl
Size 25.8 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
f9b8d63cbdc5bc52af858ec068af68d48096b8f01bf560b01b860a65b5dbf128
BLAKE2b-256 checksum
How to use checksums
fc09f5777e143f8a544677b63b21b671a0c178d7f22a99252d3db7dae5af7c7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

Release files / memimport-0.13.0.0.post8-cp37-cp37m-win32.whl

Download URL memimport-0.13.0.0.post8-cp37-cp37m-win32.whl
Size 24.5 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
30e6bc8f30b5f8916c8cc3b9b0b1b5821a3373ec3a3fa87660ab4665f4c93b7d
BLAKE2b-256 checksum
How to use checksums
cc823468fc278e834d875eeb2f3d814a521959b38f37c5dbeb05c1fc6fe9dccb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

Release files / memimport-0.13.0.0.post8-cp36-cp36m-win_amd64.whl

Download URL memimport-0.13.0.0.post8-cp36-cp36m-win_amd64.whl
Size 20.3 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
01e8be88b3a0f6db486d8e72488f7ae56fec4344e9789203a5012ae8463b5215
BLAKE2b-256 checksum
How to use checksums
48a8e3c96c91e1dcefad9ca59327cd947eafaacd922d6711395277a2c1e5bc7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9

Release files / memimport-0.13.0.0.post8-cp36-cp36m-win32.whl

Download URL memimport-0.13.0.0.post8-cp36-cp36m-win32.whl
Size 18.8 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
9f9460500bbce8c2a3b21be7e8960b2d898475d30a5021d6beb9e17ec39db141
BLAKE2b-256 checksum
How to use checksums
06d22ca2d104886c12643fe084e3353511eeca6615b30c8a4e66ebdaaab17d33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.9
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page