PyMemoryModule is a Python binding for MemoryModule.
Project description
PyMemoryModule
PyMemoryModule is a Python binding for MemoryModule.
By this module, you can load DLL completely from memory - without storing on the disk first - all thanks to MemoryModule written by Joachim Bauch.
How to install
pip install pymemorymodule
How to use
import pymemorymodule as pymm
from ctypes import cast, c_int, CFUNCTYPE
with open("path/to/library.dll", "rb") as fp:
# Load DLL from bytes object
handle = pymm.MemoryLoadLibrary(fp.read())
# __declspec(dllexport) int add(int a, int b)
add = cast(
pymm.MemoryGetProcAddress(handle, "add"),
CFUNCTYPE(c_int, c_int, c_int)
)
# Use function exported from DLL
assert add(1, 2) == 3
# Free loaded DLL
pymm.MemoryFreeLibrary(handle)
How to build and test
python setup.py build_ext -i test
How to run code check
python -m pip install flake8 python -m flake8 --show-source setup.py test.py
How to prepare README.rst
python setup.py md2rst
MemoryModule
License
Mozilla Public License Version 2.0 (MPL2.0)
See also license of MemoryModule.
Note: PyMemoryModule also distributes a few lines of MIT licensed codes taken from py3c project.
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
Built Distributions
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 pymemorymodule-0.1.0.zip.
File metadata
- Download URL: pymemorymodule-0.1.0.zip
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
627fa0a3faf6cff1b3aea17e3f6202ed9edc78655149cc26c7d0ec2753746b05
|
|
| MD5 |
defe33e6779d0018d1c71c53514d3f31
|
|
| BLAKE2b-256 |
597068e0b50f4ada4aef016d9e984bf3dfbddbc21dd9528af7db138af35ddac4
|
File details
Details for the file pymemorymodule-0.1.0-cp35-cp35m-win_amd64.whl.
File metadata
- Download URL: pymemorymodule-0.1.0-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 12.7 kB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc499d338aff2f248ca200cc42ff1f3b71829dc7a0060443dac7e06fa7a35656
|
|
| MD5 |
43a4e5158726af4f933a9ff42f112ed9
|
|
| BLAKE2b-256 |
be76a4509865df639a52f613247ac6064524745a8ac1a0439bcfe01475ddd283
|
File details
Details for the file pymemorymodule-0.1.0-cp35-cp35m-win32.whl.
File metadata
- Download URL: pymemorymodule-0.1.0-cp35-cp35m-win32.whl
- Upload date:
- Size: 11.3 kB
- Tags: CPython 3.5m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
822f7fb2714b488db48ac22a2fda9c50183fdb7d1d28b982d097bd6577b7792a
|
|
| MD5 |
b91cb60f5cdef14c05b522b5590a8e92
|
|
| BLAKE2b-256 |
23f994fcbf95e2da6ef3150b65daca8072fe69de1eb4e4e57204e84d096810ea
|
File details
Details for the file pymemorymodule-0.1.0-cp34-cp34m-win_amd64.whl.
File metadata
- Download URL: pymemorymodule-0.1.0-cp34-cp34m-win_amd64.whl
- Upload date:
- Size: 11.7 kB
- Tags: CPython 3.4m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98adf677ae21af45170bc5bee83a761b365519cd21aed8cf52dda87b14afa5c8
|
|
| MD5 |
8e863a4b4b004a595bf1e516f60e0206
|
|
| BLAKE2b-256 |
38eda4976d5a9221e89ff5e3b2c9bd9894863129842335d7f69f2e1a8776db6c
|
File details
Details for the file pymemorymodule-0.1.0-cp34-cp34m-win32.whl.
File metadata
- Download URL: pymemorymodule-0.1.0-cp34-cp34m-win32.whl
- Upload date:
- Size: 10.9 kB
- Tags: CPython 3.4m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
026b7ab7cbe30384050fc3a7e2e4d3a8f9b730767b33ac4bb18c6b1b49374c46
|
|
| MD5 |
63f5bf01365ce76b9f117d1e26b79b7b
|
|
| BLAKE2b-256 |
024b3d0f7eaad20edb917b52f49d873afc8ec41ee5d5637427bf2ede7e1dcfaf
|
File details
Details for the file pymemorymodule-0.1.0-cp33-cp33m-win_amd64.whl.
File metadata
- Download URL: pymemorymodule-0.1.0-cp33-cp33m-win_amd64.whl
- Upload date:
- Size: 11.7 kB
- Tags: CPython 3.3m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7aab136edbecf80fad49d119309f627238edeaf2c5126e5c1438095ca99f5a9e
|
|
| MD5 |
0557ce15eaff669f91cf9ebf117003c7
|
|
| BLAKE2b-256 |
b48b89b4edd30e37779b4b78b9084d95f10922b89ca5122fa556db53a59ae807
|
File details
Details for the file pymemorymodule-0.1.0-cp33-cp33m-win32.whl.
File metadata
- Download URL: pymemorymodule-0.1.0-cp33-cp33m-win32.whl
- Upload date:
- Size: 10.9 kB
- Tags: CPython 3.3m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c72a499340d8dc8a3f4059ae0f8a924fbad0a93d167a65f1b48d7978d729666
|
|
| MD5 |
a5623310c7374b70a552ee87b7ab62b8
|
|
| BLAKE2b-256 |
a6ebcdad628a635d01e5f1d26c32bcdfecf69430948aa5bbe036954e05cb4ef0
|
File details
Details for the file pymemorymodule-0.1.0-cp27-cp27m-win_amd64.whl.
File metadata
- Download URL: pymemorymodule-0.1.0-cp27-cp27m-win_amd64.whl
- Upload date:
- Size: 11.7 kB
- Tags: CPython 2.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c74b70b2bdb37fed7c8ce064194c0456e12109c93b592b64913a0aad1f4764a
|
|
| MD5 |
de9527eb3a42dfcdcd646030906ff026
|
|
| BLAKE2b-256 |
f0a0f0345613fcefea89e6d6570618baec35424ff9b013823101b6d73a43dcec
|
File details
Details for the file pymemorymodule-0.1.0-cp27-cp27m-win32.whl.
File metadata
- Download URL: pymemorymodule-0.1.0-cp27-cp27m-win32.whl
- Upload date:
- Size: 11.0 kB
- Tags: CPython 2.7m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
990f78a835fac8c48f7131d1f46f60fca83169ba38e9b996984c62c379864001
|
|
| MD5 |
9d79ae032acc6a1bc1b73ebe87864c33
|
|
| BLAKE2b-256 |
39b10304a24d05fc6a20029de881ce62b82de64c667cdf4176c43b25de5891a6
|
File details
Details for the file pymemorymodule-0.1.0-cp26-cp26m-win_amd64.whl.
File metadata
- Download URL: pymemorymodule-0.1.0-cp26-cp26m-win_amd64.whl
- Upload date:
- Size: 12.0 kB
- Tags: CPython 2.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7526501001013c5c972ef62c03d7c03faf554bb3de16bdc87fe35466a9546fcc
|
|
| MD5 |
633af79a315d96f7cdd4ae2fe0969fcf
|
|
| BLAKE2b-256 |
dab0e836a95daf85e37bf28fa2776ed054f6e586c97a70c726dabb86b4ef25ce
|
File details
Details for the file pymemorymodule-0.1.0-cp26-cp26m-win32.whl.
File metadata
- Download URL: pymemorymodule-0.1.0-cp26-cp26m-win32.whl
- Upload date:
- Size: 11.2 kB
- Tags: CPython 2.6m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
389ed84ef1c16bd4e2d5b25823bf3762116106ac16c2ec39d5c09f43e33ba51a
|
|
| MD5 |
780c30160ef854da94b63a2d438ea266
|
|
| BLAKE2b-256 |
2c0a74386257b66f8b348b6513f54529d0acf60b7f10c4ac79b54b8d36a42f3e
|