Skip to main content

fmu-settings-api

ci

fmu-settings-api is the FastAPI backend for the fmu-settings application.

Usage

This application is primarily invoked by fmu-settings-cli and is meant to be used together with fmu-settings-gui. It depends mostly on fmu-settings to work with .fmu/ configuration directories within the FMU context.

With fmu-settings-cli installed, to run the API by itself just

fmu settings api

An authorization token is required to create a session. When developing you can print this token to the the terminal with

fmu settings api --print-token

It's useful to be able to reload while developing.

fmu settings api --print-token --reload

API Documentation

The routes have documentation on them. To view them, and work with the API go to localhost:8000/docs (or whatever your port may end up being).

Configuration

Configuration should largely be handled by the GUI when they are being run together. When developing you will want to be able to access different endpoints. You can configure some of these values with .env and scripts in the scripts/ directory.

A sample.env is included here. To get your own SMDA subscription key you may go to the internal Equinor API self-service website. Copy sample.env to .env and fill in the correct values.

Access token

Accessing services through this API requires a valid access token. You can acquire one with the scripts/get_token.py script. This script will open a small server, authenticate you with SSO, and store your access token to .token. You may then use this as you need.

Developing

Clone and install into a virtual environment.

git clone git@github.com:equinor/fmu-settings-api.git
cd fmu-settings-api
# Create or source virtual/Komodo env
pip install -U pip
pip install -e ".[dev]"
# Make a feature branch for your changes
git checkout -b some-feature-branch

Run the tests with

pytest -n auto tests

Ensure your changes will pass the various linters before making a pull request. It is expected that all code will be typed and validated with mypy.

ruff check
ruff format --check
mypy src tests

See the contributing document for more.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fmu_settings_api-1.2.0.tar.gz (243.0 kB view details)

Uploaded Source

Built Distribution

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

fmu_settings_api-1.2.0-py3-none-any.whl (89.7 kB view details)

Uploaded Python 3

File details

Details for the file fmu_settings_api-1.2.0.tar.gz.

File metadata

  • Download URL: fmu_settings_api-1.2.0.tar.gz
  • Upload date:
  • Size: 243.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for fmu_settings_api-1.2.0.tar.gz
Algorithm Hash digest
SHA256 995cf514e64b756846557b75ba6a01327a1d9410a918bee53a99716a64ab5e13
MD5 3731c76d1958c56dd95e0a542b9ea159
BLAKE2b-256 074f649739d7a736d889e8288500653d48422bab2da33249d42c5460415a5f48

See more details on using hashes here.

Provenance

The following attestation bundles were made for fmu_settings_api-1.2.0.tar.gz:

Publisher: publish.yml on equinor/fmu-settings-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fmu_settings_api-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fmu_settings_api-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c65c2bb204ed6d07b0798baff77301be082564ea775a4c78c661dd6492e9988
MD5 1d4aeb2a506348f3cc15f5c3fec0671a
BLAKE2b-256 bbac59dcdb830a1806602ddf1d2a1dad58f81a74de2f88aeda8ceceacd0029bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for fmu_settings_api-1.2.0-py3-none-any.whl:

Publisher: publish.yml on equinor/fmu-settings-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

This release

1.2.0 This release

2 files

1.1.0

2 files

1.0.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page