wsgi-to-zpm
Generate InterSystems ZPM/IPM module.xml from an existing WSGI project.
wsgi-to-zpm was created to help quickly create (or modify) an InterSystems ZPM/IPM module.xml for an existing Python WSGI web application. This allows you to easily publish/distribute WSGI apps to InterSystems IRIS instances using zpm.
InterSystems Developer Tools Contest 2025
wsgi-to-zpm was originally created/published for the InterSystems Developer Tools Contest 2025.
Description
ZPM/IPM makes it very easy to install and configure various software and packages for InterSystems IRIS instances. The module.xml file is used to configure a ZPM package for distribution (See the ZPM Wiki). wsgi-to-zpm can be used to either quickly generate a module.xml or modify an existing module.xml to include any Python WSGI web applications it finds in your current directory.
Prerequisites
- IRIS 2024.1+ (for WSGI Web Application support)
- Python 3 installed on the system
Installation
Install via pipx:
pipx install wsgi-to-zpm
Usage
Assume you have a directory with the following Flask app:
/home/user/Projects/my-wsgi-app
├── my-webapp/
│ ├── myapp.py
│ ├── templates/
│ │ ├── hello.html
│ └── static/
│ └── style.css
└── requirements.txt
To generate a module.xml, run wsgi-to-zpm:
Depending on your responses, something like the following lines will be added to a module.xml:
<Export generator="Cache" version="25">
<Document name="my-webapp.ZPM">
<Module>
...
<FileCopy Name="my-webapp/" Target="${cspDir}my-webapp"/>
<WebApplication Url="/my-webapp"
AutheEnabled="32"
Description=""
MatchRoles=":${globalsDbRole}"
NameSpace="${ns}"
WSGIAppLocation="${cspDir}my-webapp"
WSGIAppName="myapp"
WSGICallable="app"
DispatchClass="%SYS.Python.WSGI"/>
...
</Module>
</Document>
</Export>
Installing Your WSGI App Via ZPM
Demo Setup
Note: If you would like to try out this process from a Docker image, follow these steps:
git clone https://github.com/intersystems-community/intersystems-iris-dev-template.git
cd intersystems-iris-dev-template
docker compose up -d
Once the Docker image is up and running, you can copy the my-wsgi-app directory to intersystems-iris-dev-template/ and log into the Docker container with bash.
# From intersystems-iris-dev-template directory
cp -r ~/Project/my-wsgi-app ./
# Connect to the Docker container to run ZPM
docker exec -it intersystems-iris-dev-template-iris-1 bash
Running ZPM
Now that you have a module.xml, you are able to load this WSGI app as a zpm package.
irisowner@bea89444b155:~/dev$ iris terminal IRIS
Node: bea89444b155, Instance: IRIS
USER>zn "IRISAPP"
IRISAPP>zpm
=============================================================================
|| Welcome to the Package Manager Shell (ZPM). Version: ||
|| Enter q/quit to exit the shell. Enter ?/help to view available commands ||
|| Current registry https://pm.community.intersystems.com ||
=============================================================================
zpm:IRISAPP>load ~/dev/my-wsgi-app
[IRISAPP|my-webapp] Reload START (/home/irisowner/dev/my-wsgi-app/)
[IRISAPP|my-webapp] requirements.txt START
[IRISAPP|my-webapp] requirements.txt SUCCESS
[IRISAPP|my-webapp] Reload SUCCESS
[my-webapp] Module object refreshed.
[IRISAPP|my-webapp] Validate START
[IRISAPP|my-webapp] Validate SUCCESS
[IRISAPP|my-webapp] Compile START
[IRISAPP|my-webapp] Compile SUCCESS
[IRISAPP|my-webapp] Activate START
[IRISAPP|my-webapp] Configure START
[IRISAPP|my-webapp] Configure SUCCESS
[IRISAPP|my-webapp] Activate SUCCESS
zpm:IRISAPP>
Visiting the URL http://[host]:[port]/my-webapp/ will now serve your WSGI app:
Metadata
Release files for wsgi-to-zpm 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| wsgi_to_zpm-0.1.0.tar.gz | 135.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wsgi_to_zpm-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 145.8 kB
Release files / wsgi_to_zpm-0.1.0.tar.gz
| Download URL | wsgi_to_zpm-0.1.0.tar.gz |
|---|---|
| Size | 135.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
578734caaf36a11ed757ea38ca771e0d4376d6a59c5150cd60f013baac4943fc
|
|
BLAKE2b-256 checksum How to use checksums |
25e2d5f21dbfb34a98381588af5b0c5a3ad9d6769dafec8d45edcb1dee62a9e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / wsgi_to_zpm-0.1.0-py2.py3-none-any.whl
| Download URL | wsgi_to_zpm-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
9b8378adcf5be73a84bcaaf39b735dd799bc09a5af6deafe248dfe1a29331702
|
|
BLAKE2b-256 checksum How to use checksums |
ec448ccc8b482069d729a8ea6f9d83a27c6c90196dae67065307c1a3ec767eeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for wsgi-to-zpm 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.