Skip to main content

Helps import Python extensions from memory, e.g. extensions from Zip files or Web.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memimport-0.13.0.0.post8.tar.gz (41.4 kB view details)

Uploaded Source

Built Distributions

memimport-0.13.0.0.post8-cp311-cp311-win_amd64.whl (25.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

memimport-0.13.0.0.post8-cp311-cp311-win32.whl (24.5 kB view details)

Uploaded CPython 3.11 Windows x86

memimport-0.13.0.0.post8-cp310-cp310-win_amd64.whl (25.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

memimport-0.13.0.0.post8-cp310-cp310-win32.whl (24.6 kB view details)

Uploaded CPython 3.10 Windows x86

memimport-0.13.0.0.post8-cp39-cp39-win_amd64.whl (25.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

memimport-0.13.0.0.post8-cp39-cp39-win32.whl (24.6 kB view details)

Uploaded CPython 3.9 Windows x86

memimport-0.13.0.0.post8-cp38-cp38-win_amd64.whl (25.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

memimport-0.13.0.0.post8-cp38-cp38-win32.whl (24.5 kB view details)

Uploaded CPython 3.8 Windows x86

memimport-0.13.0.0.post8-cp37-cp37m-win_amd64.whl (25.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

memimport-0.13.0.0.post8-cp37-cp37m-win32.whl (24.5 kB view details)

Uploaded CPython 3.7m Windows x86

memimport-0.13.0.0.post8-cp36-cp36m-win_amd64.whl (20.3 kB view details)

Uploaded CPython 3.6m Windows x86-64

memimport-0.13.0.0.post8-cp36-cp36m-win32.whl (18.8 kB view details)

Uploaded CPython 3.6m Windows x86

File details

Details for the file memimport-0.13.0.0.post8.tar.gz.

File metadata

  • Download URL: memimport-0.13.0.0.post8.tar.gz
  • Upload date:
  • Size: 41.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8.tar.gz
Algorithm Hash digest
SHA256 875be02e6fc08e791ba3e5d52c869b469a9032eb4ff8ab3583592f2c02baeb96
MD5 a20a3f87071ec4cefd11bff2e282e7ae
BLAKE2b-256 e4364a102b03b1ddc7222a4377e40a495887734b18baa4e77c3e32d77dc69cad

See more details on using hashes here.

File details

Details for the file memimport-0.13.0.0.post8-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: memimport-0.13.0.0.post8-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 801e71e07db9b0e056b0e47b70a48ce151cc62c3108dafd76976f0d581b17074
MD5 48aeadd3bbc190d470fb86ddaebe1342
BLAKE2b-256 2201034f71b36500d2b677ec4491b2384eac35e688217a5e2c5a7d1ddc48187d

See more details on using hashes here.

File details

Details for the file memimport-0.13.0.0.post8-cp311-cp311-win32.whl.

File metadata

  • Download URL: memimport-0.13.0.0.post8-cp311-cp311-win32.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 be08ffac8c073338a586e09fa38b0e8cc390c6a530a223c654cabfc5b380bf31
MD5 5512bd894e8fbabb167afd493ac2f3a0
BLAKE2b-256 eda0e120cc36f4e5930b969ece45af9d195661c015e6a62fadd2cd7a61672ca6

See more details on using hashes here.

File details

Details for the file memimport-0.13.0.0.post8-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: memimport-0.13.0.0.post8-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 edaccedaf1a23418283de7cb5a8d556b88aaac9f816fbb70dca5dfa89abc14b1
MD5 089bde32ce779bfe38e61ec7e706880d
BLAKE2b-256 b85b275b0225f50fd369405318a3b31610ed285f62161ba1d19d09dd0e950376

See more details on using hashes here.

File details

Details for the file memimport-0.13.0.0.post8-cp310-cp310-win32.whl.

File metadata

  • Download URL: memimport-0.13.0.0.post8-cp310-cp310-win32.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 8c2608e3ee6d4641d4fdda7fcf722ae1339e6ed42a046e95a1cc199d5ed52926
MD5 6251b8d6436ac3d97b9d5410a302a1a9
BLAKE2b-256 6cec19cdbb821a7650cdee17a1e5a0b58a5ea41f0892ca786672814a08be65be

See more details on using hashes here.

File details

Details for the file memimport-0.13.0.0.post8-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: memimport-0.13.0.0.post8-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 73236b2e72fb2b328c9fac937f7d0a2cd591f32b44f6aa31262b8e78eb963d07
MD5 fa60730779c0ace4fbffcf5be9f54a53
BLAKE2b-256 7e7c3d3855b0c4fcfc383e36f099436fe5af099e810c46c7c6a28291b44352f7

See more details on using hashes here.

File details

Details for the file memimport-0.13.0.0.post8-cp39-cp39-win32.whl.

File metadata

  • Download URL: memimport-0.13.0.0.post8-cp39-cp39-win32.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 0723545ea2593fa9478ad05e542c226411fbcb2d7288a0389f71f155b141e09c
MD5 2586019d7d999ee708288f6e699f576f
BLAKE2b-256 1a14aa10b4315301942ff7280a8a507e332c1eba941ea350dd9d28ee6f76a2b0

See more details on using hashes here.

File details

Details for the file memimport-0.13.0.0.post8-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: memimport-0.13.0.0.post8-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3c78536be24f858dd123f822be68d63b2eaeeaa0f2e706b21304a5440415b585
MD5 53d628f5a7bd1f73e14bfe31a7102db5
BLAKE2b-256 edbf5f4c7983c495091f078e3458dbecb65fc8b70e0d8733786f8f69e258827d

See more details on using hashes here.

File details

Details for the file memimport-0.13.0.0.post8-cp38-cp38-win32.whl.

File metadata

  • Download URL: memimport-0.13.0.0.post8-cp38-cp38-win32.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 46db8e94fd6467c64391204ae8542d2d02617bc132b982d7826d9a3e5a1b6168
MD5 e989ca1694e9d3938d47b9d5700ef87b
BLAKE2b-256 792142c62776c5d05b178a2691509755843f1be12c840cea148ba8f000f3bde6

See more details on using hashes here.

File details

Details for the file memimport-0.13.0.0.post8-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: memimport-0.13.0.0.post8-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f9b8d63cbdc5bc52af858ec068af68d48096b8f01bf560b01b860a65b5dbf128
MD5 387dd0b6d5d7ee3738bd77bffe39e7ea
BLAKE2b-256 fc09f5777e143f8a544677b63b21b671a0c178d7f22a99252d3db7dae5af7c7e

See more details on using hashes here.

File details

Details for the file memimport-0.13.0.0.post8-cp37-cp37m-win32.whl.

File metadata

  • Download URL: memimport-0.13.0.0.post8-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 30e6bc8f30b5f8916c8cc3b9b0b1b5821a3373ec3a3fa87660ab4665f4c93b7d
MD5 c48481f5580a915acb422bf8b6db6b08
BLAKE2b-256 cc823468fc278e834d875eeb2f3d814a521959b38f37c5dbeb05c1fc6fe9dccb

See more details on using hashes here.

File details

Details for the file memimport-0.13.0.0.post8-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: memimport-0.13.0.0.post8-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 01e8be88b3a0f6db486d8e72488f7ae56fec4344e9789203a5012ae8463b5215
MD5 284650561b8998aed11eb5ed5f925a2c
BLAKE2b-256 48a8e3c96c91e1dcefad9ca59327cd947eafaacd922d6711395277a2c1e5bc7c

See more details on using hashes here.

File details

Details for the file memimport-0.13.0.0.post8-cp36-cp36m-win32.whl.

File metadata

  • Download URL: memimport-0.13.0.0.post8-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using 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

File hashes

Hashes for memimport-0.13.0.0.post8-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 9f9460500bbce8c2a3b21be7e8960b2d898475d30a5021d6beb9e17ec39db141
MD5 39d18caddb0905c9fa66597dcbc91d78
BLAKE2b-256 06d22ca2d104886c12643fe084e3353511eeca6615b30c8a4e66ebdaaab17d33

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page