A basic WITSML client with utilities.
Project description
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
-
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, )
-
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(), )
-
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.
-
Clone the project:
git clone https://github.com/nazebzurati/jeng.git
-
Prepare environment:
# create environment and activate virtualenv env .\env\Scripts\activate # install development dependencies pip install -e .[dev]
-
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>"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jeng-0.0.2.tar.gz.
File metadata
- Download URL: jeng-0.0.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eddc6b1d69e2c3378c523d8fe65112ef710fe75b8bd1a6a907703f1a3c503dbe
|
|
| MD5 |
19bdf6a9728b46a9adc7169dd46e8d74
|
|
| BLAKE2b-256 |
80824ddfce01340f20d6290abf84bfafec269cf9b73f8b693cc210d695453a1f
|
File details
Details for the file jeng-0.0.2-py3-none-any.whl.
File metadata
- Download URL: jeng-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e8a8e9b98536210df61b98666e2c19fc53063b5a66fbe9cd71dce23d559d9d3
|
|
| MD5 |
9d294460a0a537814f5852a5edf4e9e6
|
|
| BLAKE2b-256 |
30c664ca0fba7778dab9ff1741310e82fc9f2fa9fe2572a301219581fe1c38c3
|