Skip to main content

Jeng

A simple WITSML client with utilities.

Testing is done locally for now. So, no CI test badge status at the moment.

Installation

pip install jeng

Getting started

Client

  1. To create and connect to WITSML Server:

    from jeng.client import WitsmlClient
    
    client = WitsmlClient()
    
    # return True if success, else False
    status = client.connect(
        url=CONNECTION_URL,
        username=CONNECTION_USERNAME,
        password=CONNECTION_PASSWORD,
    )
    
  2. To call wrapper API (make sure to connect to WTISML Server first):

    # send query to WMLS_AddToStore API
    with open(f"{QUERY_PATH}/query.xml", "r") as query:
        reply = client.add_to_store(
            wml_type_in="well",
            xml_in=query.read(),
        )
    
    # send query to WMLS_UpdateInStore API
    with open(f"{QUERY_PATH}/query.xml", "r") as query:
        reply = client.update_in_store(
            wml_type_in="well",
            xml_in=query.read(),
        )
        
    # send query to WMLS_GetFromStore API
    with open(f"{QUERY_PATH}/query.xml", "r") as query:
        reply = client.get_from_store(
            wml_type_in="well",
            xml_in=query.read(),
            return_element="all",
        )
    
    # send query to WMLS_DeleteFromStore API
    with open(f"{QUERY_PATH}/query.xml", "r") as query:
        reply = client.delete_from_store(
            wml_type_in="well",
            xml_in=query.read(),
        )
    
  3. To call other WITSML APIs than provided wrapper APIs (make sure to connect to WTISML Server first):

    # send WMLS_GetVersion directly from Jeng client service
    reply = client.service().WMLS_GetVersion()
    

Contribute

Contribution is welcome.

  1. Clone the project:

    git clone https://github.com/nazebzurati/jeng.git
    
  2. Prepare environment:

    # create environment and activate
    virtualenv env
    .\env\Scripts\activate
    
    # install development dependencies
    pip install -e .[dev]
    
  3. Change the source code and test:

    # Update environment variable using pytest.ini 
    coverage run -m pytest && coverage xml
    sonar-scanner.bat -D"sonar.projectKey=<project-key>" -D"sonar.sources=." -D"sonar.host.url=<host-url>" -D"sonar.login=<project-token>"
    

Release files for jeng 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jeng 0.0.2
File Size Uploaded
jeng-0.0.2.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jeng 0.0.2
File Interpreter ABI Platform
jeng-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / jeng-0.0.2.tar.gz

Download URL jeng-0.0.2.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
eddc6b1d69e2c3378c523d8fe65112ef710fe75b8bd1a6a907703f1a3c503dbe
BLAKE2b-256 checksum
How to use checksums
80824ddfce01340f20d6290abf84bfafec269cf9b73f8b693cc210d695453a1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / jeng-0.0.2-py3-none-any.whl

Download URL jeng-0.0.2-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e8a8e9b98536210df61b98666e2c19fc53063b5a66fbe9cd71dce23d559d9d3
BLAKE2b-256 checksum
How to use checksums
30c664ca0fba7778dab9ff1741310e82fc9f2fa9fe2572a301219581fe1c38c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release history Release notifications | RSS feed

1.0.1

2 release files

1.0.0

1 release file

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page