Obtaining GX Developer

Obtaining GX Developer

To work with the GX API you must register as a GX Developer.

GX Developer provides API support for Python, .NET, C/C++ and the Geosoft GXC language.  Support files can be found in the GeosoftInc repositories on GitHub.

Registered developers also have access to the GX Developer forum in the My Geosoft portal.

It is also necessary to obtain and install the Oasis montaj base platform on developer and end user systems. While the majority of the API will work for any Geosoft ID, some functionality depends on you or your end-user's license or subscription. Generally, applications that need to read or write to Geosoft supported data do not require an end-user subscription.

On this page

Python for GX Developer

Configuring your system to run Python involves first installing a Python distribution, the Python packages that your application requires, and then installing the Geosoft Python packages.

Refer to Python Installation and Configuration, which provides a tutorial-style set of instructions to setting up a Python environment.

Frequently Asked Questions

Python version 2.7 or 3? The Geosoft distribution packages support Python version 3.5 (and later).  Python 2.7 (released in 2010) was the end of development for Python 2.x, and for this reason we have chosen not to support Python 2.7 (or earlier). If you are new to Python, you should start with Python 3.  If you have legacy Python 2 code that you want to run with a Geosoft environment you may need to make modifications to the code to work with Python 3. See https://docs.python.org/2/howto/pyporting.html for information on what may be required to port Python 2 code to Python 3.

Which Python distribution? There are many distributions of Python, but Geosoft uses and recommends the Anaconda distribution (https://www.continuum.io/downloads) as this includes all the packages that are required to work with Geosoft code together with the most important and widely used packages that make up what is considered complete for a scientific application. 

Which IDE? At Geosoft we use and recommend the PyCharm IDE (http://www.jetbrains.com/pycharm/), which has both a no-cost "Community Edition" intended for education and personal use, and a very reasonably priced "Professional Edition" for professional use. Note that most complete Python distributions also include IPython. Although not strictly an IDE, IPython does provide an environment for rapid algorithm development, experimentation and documentation and can be very effective for research projects.

Modifying the Geosoft Python Modules

As a developer you may wish to modify Geosoft's Python interface yourself, though we do not encourage this as it requires advanced knowledge of Python. The following describes the development process for modifying your own cloned version of the Geosoft package. Refer to Python Installation and Configuration for simply installing and using the package.

Geosoft maintains the source code for the most current Python module on github:

RepositoryDescription
https://github.com/GeosoftInc/gxpyGeosoft gxpy module for Python. This includes both the complete GX API for Python (geosoft.gxapi) and a "pythonic" interface (geosoft.gxpy) to the main GX API functions names "gxpy". Over time, we expect geosoft.gxpy to expand to wrap more of the full geosoft.gxapi into a simpler and more python-oriented interface.

You should clone the repositories to a location on your system (step 1 below).  If you are unfamiliar with github, see https://help.github.com/.

The following will checkout the gxpy project from Github and set it up for active development with your Python distribution:

StepWhatComments
1Clone the Geosoft Python repositories

Open a command shell and go the folder where you want to locate the Geosoft Python files. From here we will clone the Geosoft repositories, which will create sub-folders "gxpy" and "gxpy-examples".  These are on the current development branch and stability is not assured, and may depend on a later desktop installation than in available.

git clone https://github.com/GeosoftInc/gxpy

If you want a specific stable branch, after cloning the repository checkout the desired branch:

git checkout 9.3
2

Setup module for development in your Python environment:


cd gxpy
python setup.py develop

Note: The "develop" option links to the files where you cloned the repository instead of installing it in <PYTHON_HOME>\Lib\packages. This allows a debugger to step into your gxpy repository files rather than those in the Python site-packages directory.