Skip to main content

Python wrapper for 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

Run tests and check coverage using pytest-cov poetry run pytest --cov=tagmapper test/ --cov-report html

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.7.0.tar.gz (12.1 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.7.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tagmapper-0.7.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.3 Darwin/25.0.0

File hashes

Hashes for tagmapper-0.7.0.tar.gz
Algorithm Hash digest
SHA256 63216f4854932c5569ea0e1adcc8d7bd52ba67fb012ea8a95d1eab1a98c31ab5
MD5 bc279e0089775b0c8033608f78c788f0
BLAKE2b-256 79d3ce2273d94b3a1a84463b8850803d5a1dbbcda7d33337a1a4807744825f47

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tagmapper-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.3 Darwin/25.0.0

File hashes

Hashes for tagmapper-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c6c6d730b66f891ebd504d3b4c941d72b91b6de99c5d8731a480d637dcd1520
MD5 d6432c4c268359bf39a11464b1d36917
BLAKE2b-256 58275a608d4beaf6c24ca30fdba930e5e31fd1ab1bdaae368c85bec24f2b407e

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