Skip to main content

Petroleum Experts OpenServer calculations

Project description

PyPI

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.152.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

openserver-1.152-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openserver-1.152.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for openserver-1.152.tar.gz
Algorithm Hash digest
SHA256 8a354ab8675ae9e5405e18e1fb510e5fda56201f1e40cb3f6deefd8ac277e66d
MD5 a69ce4aeb27444ac6043deec377d5111
BLAKE2b-256 bb199e3ebd78f762aee1c19d9845a2369b5a8748dab1e4d38caabdab808c7a93

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openserver-1.152-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for openserver-1.152-py3-none-any.whl
Algorithm Hash digest
SHA256 a20dcbcf173276941b23fdd5cf205b5543ce844d421ed7997a2d73874d7fbcfe
MD5 a231a34bc967d8b8931052785b42d084
BLAKE2b-256 3af7a214084dfe82244e8d5be8083776b76925e8fe39de6d52805e432352ab6e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page