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>"
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)
| File | Size | Uploaded | |
|---|---|---|---|
| jeng-0.0.2.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|