A Python package for packaging and importing compiled .pyc files into dll like packages
Project description
PyDLL
PyDLL is a Python package for compiling and packaging Python code and its dependencies into a single distributable archive. This package supports dynamically loading Python modules from those packages.
Table of Contents
Installation
To install the pydll
package, use the command:
pip install pydynamiclib
or
pip3 install pydynamiclib
Usage
Compiling and Packaging
To compile and package your Python source code into a .pydll
file, use the following command:
pydll /path/to/your/source_directory output_package.pydll
This command will:
- Compile all
.py
files in the specified source directory. - Create a ZIP archive containing the compiled files and required dependencies. NOTE: when packaging a library make all the import statments reroute to the Lib dir
Loading a PyDLL Package
You can load a PyDLL package using the LoadPyDLL
function:
import pydll
# Load the default __init__.py module
module = pydll.LoadPyDLL('path_to_your_package.pydll')
# Load a specific module (e.g., 'QtWidget')
module = pydll.LoadPyDLL('path_to_your_package.pydll', specific_module='QtWidget')
Example Usage
After installing the pydll
package, you can run it from the command line:
pydll /path/to/your/source_directory output_package.pydll
This will compile the Python files and package them into a .pydll
archive.
License
This project is licensed under the MIT License - see the LICENSE
file for details.
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
File details
Details for the file pydynamiclib-0.1.3.tar.gz
.
File metadata
- Download URL: pydynamiclib-0.1.3.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11739fcca5e24b6bde7d5b3e9015073f5d48f5402e33ab008db0df006511bb61 |
|
MD5 | b70d482e8cfcba8a4e1adeb08ce0073e |
|
BLAKE2b-256 | bc0a38c3327ac5997ce78bcf2c77aaf8d861e4b21935ae0e794b982d203cc05a |