Skip to main content

Python wrapper for Equinor SPD tag mapping database

Project description

tagmapper-sdk SNYK dependency check

Python package to get timeseries and constant value mappings for data models from SDP tag mapping library.

It supports SDP defined models for Separators and Wells as well as generic models with or without schema.

Authentication is done using Azure credentials and bearer tokens.

Use

  1. See demo. Or try the following simple code.

    from tagmapper import Well
    w = Well("NO 30/6-E-2")  
    
  2. Fetching the base view (well_attributes_mapped_to_timeseries_base) from the API:
    Refer to examples/demo_api_func.py:
    Fetch data for all facilities:

    from tagmapper.base_model import get_data_base_well
    df = get_data_base_well(limit=100000, offset=0) 
    print(df)
    

    Fetch data for selected facilities:

    from tagmapper.base_model import get_data_base_well
    facility_names = ['STATFJORD B','JOHAN SVERDRUP RP']
    df = get_data_base_well(facility_names, limit=10000, offset=0) # More facilit
    print(df)
    
  3. Getting a generic model with no schema from API:
    See demo. Example usage:

    from tagmapper import Model
    
    # Create a model
    model = Model.get_model(
    model_owner="example_owner",
    model_name="example_model",
    object_name="example_object")
    model.print_report()
    

Installing

Install from pypi using pip.
pip install tagmapper

Developing

Clone repo and run poetry install to install dependencies.

Testing and code coverage

Run tests and check coverage using pytest-cov poetry run pytest --cov=. --cov-report=xml:coverage.xml

Compare coverage with modified lines against main branch diff-cover coverage.xml --compare-branch=origin/main

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

tagmapper-0.9.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tagmapper-0.9.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file tagmapper-0.9.0.tar.gz.

File metadata

  • Download URL: tagmapper-0.9.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.12.3 Darwin/25.2.0

File hashes

Hashes for tagmapper-0.9.0.tar.gz
Algorithm Hash digest
SHA256 e71b7dc9b9edb27d140b7a44f0e04f696077ed20a2a9908b4641e665aab1304c
MD5 aec087065e8babef1b6b8465d035eb04
BLAKE2b-256 d289e202b5786cbb90db12690056d7d64a8c421b974108af13fd6b28d2613fbe

See more details on using hashes here.

File details

Details for the file tagmapper-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: tagmapper-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.12.3 Darwin/25.2.0

File hashes

Hashes for tagmapper-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d2a49f5535e44cfcbfe788c768e9ec4fef4acb254dfeb87a65e4872780f5e31
MD5 7aa8cea7c836269f814c8c16ba1b1ade
BLAKE2b-256 d421b8c8a6a2c969a29d7b234d8cbadacbc8af3b4f0e46ce0eee55e9c7e92a5e

See more details on using hashes here.

Supported by

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