The API for fmu-settings
Project description
fmu-settings-api
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:8001/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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fmu_settings_api-0.8.0.tar.gz.
File metadata
- Download URL: fmu_settings_api-0.8.0.tar.gz
- Upload date:
- Size: 205.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7ad17787810568112438627fff20b48339e315738691c55d4f9261ac946e5a0
|
|
| MD5 |
7be94f3097d261d2fe8b603a7a9f0607
|
|
| BLAKE2b-256 |
960c78eccf086f41ec879ea46c35a6b16aa3c89addf0cd0d747fe83ab899fc1d
|
Provenance
The following attestation bundles were made for fmu_settings_api-0.8.0.tar.gz:
Publisher:
publish.yml on equinor/fmu-settings-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fmu_settings_api-0.8.0.tar.gz -
Subject digest:
f7ad17787810568112438627fff20b48339e315738691c55d4f9261ac946e5a0 - Sigstore transparency entry: 1157903798
- Sigstore integration time:
-
Permalink:
equinor/fmu-settings-api@77ced38e792404d5392f5620d2ebe9db98f778f5 -
Branch / Tag:
refs/tags/0.8.0 - Owner: https://github.com/equinor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@77ced38e792404d5392f5620d2ebe9db98f778f5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fmu_settings_api-0.8.0-py3-none-any.whl.
File metadata
- Download URL: fmu_settings_api-0.8.0-py3-none-any.whl
- Upload date:
- Size: 76.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
550c7052bdbb6993c9ed1a0b5b71d777209748c13321513bfc04231200aee5f2
|
|
| MD5 |
686ecf13cb84a9fd4da4664d5885617f
|
|
| BLAKE2b-256 |
c12024ac4e1040062a802901467914228afdf9a58c11893f276dffa2a5d7afb4
|
Provenance
The following attestation bundles were made for fmu_settings_api-0.8.0-py3-none-any.whl:
Publisher:
publish.yml on equinor/fmu-settings-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fmu_settings_api-0.8.0-py3-none-any.whl -
Subject digest:
550c7052bdbb6993c9ed1a0b5b71d777209748c13321513bfc04231200aee5f2 - Sigstore transparency entry: 1157903885
- Sigstore integration time:
-
Permalink:
equinor/fmu-settings-api@77ced38e792404d5392f5620d2ebe9db98f778f5 -
Branch / Tag:
refs/tags/0.8.0 - Owner: https://github.com/equinor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@77ced38e792404d5392f5620d2ebe9db98f778f5 -
Trigger Event:
release
-
Statement type: