Skip to main content

API connector (API SDK) to connect to public client app registrations using delegated permissions (MSAL).

Project description

eq-api-connector

A small python package to handle authentication and act as a generic api sdk.

It supports apis Public client applications using acquire_token_interactive and contains a few basic endpoint accessors.

Install

Install from pypi pip install eq-api-connector or clone and use poetry install as a developer.

Usage

See the dummy example below

from eq_api_connector import set_url_prod, set_scope, set_public_client_id, get_json

url_prod = "https://api.gateway.equinor.com/dummy/v1"
client_id = "insert_your_client_id_here"  # IOC SME monitoring SDK
scope = ["34de7368-10f7-4c34-a4df-928156065f2c/ReadWrite"]

set_url_prod(url_prod)
set_scope(scope)
set_public_client_id(client_id)

model_owners = get_json("/example-endpoint")

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

eq_api_connector-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

eq_api_connector-0.1.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file eq_api_connector-0.1.2.tar.gz.

File metadata

  • Download URL: eq_api_connector-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.3 Darwin/24.6.0

File hashes

Hashes for eq_api_connector-0.1.2.tar.gz
Algorithm Hash digest
SHA256 96c77b65e729ccf6b7d5430e2604a31ee7dcb771d8521acbc9d25e04cd178531
MD5 f634b4c580a8fd7f9076e9fd1700e111
BLAKE2b-256 20ace8afd9d544c016fa9048dd85e996369d8a85388f7ec963718f1e4c57ada8

See more details on using hashes here.

File details

Details for the file eq_api_connector-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: eq_api_connector-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.3 Darwin/24.6.0

File hashes

Hashes for eq_api_connector-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a0c948ec443e88d45cfdd631e26a7409940170510a09e98accde67839c9ab9f0
MD5 fc1fb261dcfebc7bb748f3e8cca14696
BLAKE2b-256 483d5ade03c0d6a49599fc7c3dcc857ac306317ae81cdcdb09a6de2c8b074c60

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