OpenServer
Code for running Petroleum Experts OpenServer API commands in Python. More general information about this API protocol can be found on Petroleum Experts' site.
Please have a look at the CONTRIBUTING.MD file if you want to contribute.
Python
Getting started
Install the required package:
pip install openserver
Example in Python
There are two ways of using the functions, either by importing a class called OpenServer or by importing all modules. The first is the most "pythonic" way which can be used to disconnect from the license server. The latter is easier for those converting from visual basic style coding environment.
The following code will import the OpenServer module, start Prosper, open a Prosper file named well_2 on C-drive and adding a comment into the comment section in Prosper.
by using the class
from openserver import OpenServer
c = OpenServer()
c.connect()
c.DoCmd('PROSPER.START()')
c.DoCmd('PROSPER.OPENFILE("C:\\well_2.OUT")')
c.DoSet('PROSPER.SIN.SUM.Comments', 'Testing OpenServer from Python')
c.disconnect()
or
from openserver import OpenServer
with OpenServer() as c:
c.DoCmd('PROSPER.START()')
c.DoCmd('PROSPER.OPENFILE("C:\\well_2.OUT")')
c.DoSet('PROSPER.SIN.SUM.Comments', 'Testing OpenServer from Python')
by importing all modules
from openserver import *
DoCmd('PROSPER.START()')
DoCmd('PROSPER.OPENFILE("C:\\well_2.OUT")')
DoSet('PROSPER.SIN.SUM.Comments', 'Testing OpenServer from Python')
Remote OpenServer (PxOnlineServer)
In addition to the local COM client, the package ships a PxOnlineServer client
that talks to a Petroleum Experts PxOnlineServer
instance over its REST API. It runs the same DoCmd/DoSet/DoGet commands as
the local client, but against a model hosted on the server - no local IPM install
is required.
requests is used for the HTTP calls and is installed automatically.
Connecting to a session
A remote model lives in a master session on the server. On connect, the master session is copied into a temporary user session that your commands run against; the user session is removed again on disconnect.
from openserver import PxOnlineServer
with PxOnlineServer(
base_url="http://my-pxserver:8056",
master_session="my_master_session", # a master session containing a PROSPER module
module_name="IPM-OS", # the server-side OpenServer module name
) as c:
print(c.DoGet("PROSPER.SIN.SUM.Comments"))
c.DoSet("PROSPER.SIN.SUM.Comments", "Testing remote OpenServer from Python")
To attach to an existing user session instead of creating one, pass guid and
session instead of master_session.
Loading a model from the Model Catalogue
The Model Catalogue is the server's versioned file store. open_catalogue_file
is the remote analogue of PROSPER.OPENFILE: it loads a catalogue model into the
session so the familiar DoCmd/DoSet/DoGet calls operate on it. There is no
PROSPER.START() remotely - the module is already running in the session.
from openserver import PxOnlineServer
with PxOnlineServer(base_url="http://my-pxserver:8056",
master_session="my_master_session",
module_name="IPM-OS") as c:
# Remote equivalent of PROSPER.OPENFILE - give the catalogue host + file path
c.open_catalogue_file(
"Root/Region/Field/Company/ProsperModel/Well.Out",
host_alias="MyCatalogueHost",
)
# ...then it's the same as the local COM client
c.DoSet("PROSPER.SIN.SUM.Comments", "Testing remote OpenServer from Python")
print(c.DoGet("PROSPER.SIN.SUM.Comments"))
open_catalogue_file returns the catalogue guid, so you can pass it back in as
catalogue_guid=... to open further files without re-initialising the catalogue.
The file is uploaded under the existing main file's name, so the session's
reported MainFile label is unchanged - but its contents (and everything
DoGet/DoSet/DoCmd see) are the catalogue file you loaded.
See examples/px_online_server_basic.py for a complete, runnable walkthrough.
Limitations
PxOnlineServer currently targets a PxOnlineServer instance that requires no
authentication - it sends no credentials.
Metadata
Release files for openserver 1.154
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 | Actions |
|---|---|---|---|---|
| openserver-1.154.tar.gz | 112.8 kB | With provenance | Details for openserver-1.154.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openserver-1.154-py3-none-any.whl | Python 3 | none | any | Details for openserver-1.154-py3-none-any.whl |
Total release size: 133.3 kB
Release files / openserver-1.154.tar.gz
| Download URL | openserver-1.154.tar.gz |
|---|---|
| Size | 112.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40bc1f4f04dacaa6840efdad714bc610336c89c51f7acd898d2346e51de6b50f
|
|
BLAKE2b-256 checksum How to use checksums |
a6bce7dd064c81f32b20e77b7dc04269d618f51529778b4802f8c5f463e0657b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / openserver-1.154-py3-none-any.whl
| Download URL | openserver-1.154-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0512e5fa9cbaf6019adc86152141b57b59aa4c9d43f37a6d74a3ee3b0316f2b
|
|
BLAKE2b-256 checksum How to use checksums |
3bca5b230ddeef6790aa8d8d3a65a355968ff9b91089f51aa4a2df7804a58dc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logSecurity for openserver 1.154
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for openserver-1.154.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.