Skip to main content

Petroleum Experts OpenServer calculations

Project description

PyPI SCM Compliance Runs on Windows

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')

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

openserver-1.153.tar.gz (94.3 kB view details)

Uploaded Source

Built Distribution

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

openserver-1.153-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file openserver-1.153.tar.gz.

File metadata

  • Download URL: openserver-1.153.tar.gz
  • Upload date:
  • Size: 94.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openserver-1.153.tar.gz
Algorithm Hash digest
SHA256 f4dfe6d9ba1b80ba4074e027b31094d3b433fa3b55e16a6a0cfa44e1d6a5bd1c
MD5 d9529febeb12f750421bfb7d7b17c597
BLAKE2b-256 c22f596b40e16b644c5b62f16fbd4e5dbbec2231a3a8b962435e4faee6aa7299

See more details on using hashes here.

Provenance

The following attestation bundles were made for openserver-1.153.tar.gz:

Publisher: cd.yml on equinor/OpenServer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openserver-1.153-py3-none-any.whl.

File metadata

  • Download URL: openserver-1.153-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openserver-1.153-py3-none-any.whl
Algorithm Hash digest
SHA256 b578ca63a68fa0678a20fdb18d5775b9bb5da36067a5149ab4f302fbb995831c
MD5 d436d7b5a246c81aefd217dc0bfc8882
BLAKE2b-256 88210e820e13788997086fba0ac66d8831f84894f88bea15e87b76b723d09c35

See more details on using hashes here.

Provenance

The following attestation bundles were made for openserver-1.153-py3-none-any.whl:

Publisher: cd.yml on equinor/OpenServer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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