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.post4.tar.gz (32.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

memimport-0.13.0.0.post4-cp311-cp311-win_amd64.whl (24.0 kB view details)

Uploaded CPython 3.11Windows x86-64

memimport-0.13.0.0.post4-cp311-cp311-win32.whl (22.8 kB view details)

Uploaded CPython 3.11Windows x86

memimport-0.13.0.0.post4-cp310-cp310-win_amd64.whl (24.1 kB view details)

Uploaded CPython 3.10Windows x86-64

memimport-0.13.0.0.post4-cp310-cp310-win32.whl (22.8 kB view details)

Uploaded CPython 3.10Windows x86

memimport-0.13.0.0.post4-cp39-cp39-win_amd64.whl (24.0 kB view details)

Uploaded CPython 3.9Windows x86-64

memimport-0.13.0.0.post4-cp39-cp39-win32.whl (22.8 kB view details)

Uploaded CPython 3.9Windows x86

memimport-0.13.0.0.post4-cp38-cp38-win_amd64.whl (24.0 kB view details)

Uploaded CPython 3.8Windows x86-64

memimport-0.13.0.0.post4-cp38-cp38-win32.whl (22.8 kB view details)

Uploaded CPython 3.8Windows x86

memimport-0.13.0.0.post4-cp37-cp37m-win_amd64.whl (24.0 kB view details)

Uploaded CPython 3.7mWindows x86-64

memimport-0.13.0.0.post4-cp37-cp37m-win32.whl (22.8 kB view details)

Uploaded CPython 3.7mWindows x86

memimport-0.13.0.0.post4-cp36-cp36m-win_amd64.whl (25.0 kB view details)

Uploaded CPython 3.6mWindows x86-64

memimport-0.13.0.0.post4-cp36-cp36m-win32.whl (23.6 kB view details)

Uploaded CPython 3.6mWindows x86

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4.tar.gz
  • Upload date:
  • Size: 32.2 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.post4.tar.gz
Algorithm Hash digest
SHA256 548a5206b50d5daa20531bfe368aab00bee49e6505e58684b4b56ac071df2ee2
MD5 10b3347f941934652b19750ce424fb56
BLAKE2b-256 86cd6e86a7170f7a1ae87533a5d8d60994c5b5f1e2d5b34e596ef3ca9a18da9e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 24.0 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.post4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5a58774442a672621eabed1b2cf652e41d7c4b1e05ecca5c1f144d6461da9868
MD5 e77583cd652a80a1886a16d17eceabc6
BLAKE2b-256 ac14cdf41808ff1977e3d1ef843f0a09376d1a4a5a16ca2a6b0d21c269e4b074

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4-cp311-cp311-win32.whl
  • Upload date:
  • Size: 22.8 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.post4-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 4eff4fa5b521d6f3d27d042e2c5aa29baa941503f1447302fba3cb1f6d236f03
MD5 b0ecb63d7ecb536f36f0880e6f9ecb55
BLAKE2b-256 60c9929217668ef8936ff8427453515baef0a9bf4701b5c71f652f538076b13c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 24.1 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.post4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 05c46fa52b8aefc96b7ac363abb3f7d4e14f75fddfde689be2c6805d5dc2fd3c
MD5 a5e83468b3d87e7197ebb8615c0eb7bb
BLAKE2b-256 0bb66f5187540490aaf3451dcec2a1a29b24bc1605a669c6075c45296ac50d81

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4-cp310-cp310-win32.whl
  • Upload date:
  • Size: 22.8 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.post4-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 791981e99cd21e516e6b02d06a3f5b0b95bd01603c471654cae0eb661f6fe774
MD5 68f17bbf7d39428a701a40ad4ffbde34
BLAKE2b-256 4a79b75ede9c33370854225a7e2c51e58d1b03768ae625eff7bcaf003aec03d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 24.0 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.post4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 94f43ee526a40318093381e03eff3dea066950e6f2200ba6d1c9ba6086730c4b
MD5 855e55a7906d930ea09970d5374757c9
BLAKE2b-256 20e645988176f7068c073714befa836ffcf9292315451899c129df0cdbe1e354

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4-cp39-cp39-win32.whl
  • Upload date:
  • Size: 22.8 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.post4-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 26d326df61a188a59518bd64521cdd579f3fa7242efddf63c79babde84a0bf01
MD5 2e15ded87bf35012f52593f9c5051434
BLAKE2b-256 34510f60c4e8f7fa6cb6a8e8602f506fcc18738df9ad6d5076b7214a0e9cd7f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 24.0 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.post4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 bc2929c916b27a514daef8a8d01bc9e78c7494d42d825923147a09e55f75a8da
MD5 48f32c81cd8d4cc5b2db4bfd0ed36430
BLAKE2b-256 23320a0f5095cec335fb854d5612ff202c849ec798ef12758f36af00fb6dcfc4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4-cp38-cp38-win32.whl
  • Upload date:
  • Size: 22.8 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.post4-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 547d53609d983f55cf7ddc7ef98d2f4275c47e3c6eeb36087ce677b34b08ce4a
MD5 2993b2015f292936764c59c987171665
BLAKE2b-256 3503316619194e6dee7992383be19d64be7ca60f35a45b1a78b51f0115601e39

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 24.0 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.post4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 91bf3ccc67cb701ccff069b4a4bc33afd77660107a364fb0f9930cf41d963e37
MD5 902bac6ff291223881aea8ad61c4d060
BLAKE2b-256 a72788a07faeb2ee2ac409d588d8b4172bfab637549178b59a249a10a610fc96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 22.8 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.post4-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 5b0d2395698bf6e0beb3adc83dfb63bab10dbac035950239a24d91c74509f9ef
MD5 2cfaf93a011030786c00272dab458ca6
BLAKE2b-256 a39e734632c2e915a8ebba6ef608ac307bece6c2f50fe922c6990cf3262532fd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 25.0 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.post4-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 dffa0ae9f660d30f36162725466415b564d3cf3ef8e6e77a67694224ce3fe114
MD5 9200e80e408c217bd3ec1a800f80e5e3
BLAKE2b-256 191b2a047f1db46dcae75cbc25f0237a847537ebc06c325dd566cb64d1c72d61

See more details on using hashes here.

File details

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

File metadata

  • Download URL: memimport-0.13.0.0.post4-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 23.6 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.post4-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 333a878da2153c15521137543789f0abcf92311128d76a6bd60eea08d655591d
MD5 8814fd44be961cb52ec6b88d1ed6e919
BLAKE2b-256 d3f51ac5fb70caa43ea25ecc8d4137bfa29b16903bb6a0fc1846be69b004aa5a

See more details on using hashes here.

Supported by

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