An extension to the Autosubmit package that serves its information as an API
Reason this release was yanked:
Incorrect threshold value on outlier detection algorithm
Project description
Autosubmit API
Table of Contents
Overview
Autosubmit API is a package that consumes the information generated by Autosubmit and serves it as an API.
Distribution: https://pypi.org/project/autosubmit-api/
See the openapi.json
specification and the repository wiki for more information.
Installation
Autosubmit API can be easily installed via pip
pip install autosubmit-api # >=4.0 (recommended)
# Check installation and serving options
autosubmit_api start -h
Start the server:
autosubmit_api start
Configuration options
The Autosubmit API have some configuration options that can be modified by setting their specific environment variable before starting the server:
PROTECTION_LEVEL
: DefaultALL
. Possible valuesALL
,WRITEONLY
,NONE
.- If set to
ALL
, all the endpoints will be protected by needing a valid token inside theAuthorization
header of the request. - If set to
WRITEONLY
, only a subset of the endpoints will be protected. - If set to
NONE
, none of the endpoints will be protected.
- If set to
SECRET_KEY
: The secret key to encode the JWT tokens from the Authorization Module. Important to be set up on production.CAS_SERVER_URL
: CAS Protocol server base URL to request a ticket and verify it. Used for/v4
endpoints.CAS_LOGIN_URL
andCAS_VERIFY_URL
can be empty if this variable is set (the API will append the protocol URL subpaths).CAS_LOGIN_URL
: CAS Protocol URL to request a ticket. Used for/v3
endpoints.CAS_VERIFY_URL
: CAS Protocol URL to verify a given ticket. Used for/v3
endpoints.GITHUB_OAUTH_CLIENT_ID
: Client ID of the Github Oauth app.GITHUB_OAUTH_CLIENT_SECRET
: Secret key of the Github Oauth app.GITHUB_OAUTH_WHITELIST_ORGANIZATION
: Used to use authorization based on the membership of a Github organization.GITHUB_OAUTH_WHITELIST_TEAM
: Used to use authorization based on the membership of a Github team in an organization.GITHUB_OAUTH_WHITELIST_ORGANIZATION
is required
How to run tests
Install pytest
pip install -e .[test]
Run tests:
pytest
Run tests with coverage HTML report:
pytest --cov=autosubmit_api --cov-config=.coveragerc --cov-report=html tests/
You will find the report in htmlcov/index.html
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
File details
Details for the file autosubmit_api-4.0.1b1.tar.gz
.
File metadata
- Download URL: autosubmit_api-4.0.1b1.tar.gz
- Upload date:
- Size: 148.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f985b21f475ec5304f1cb4cd8b3280b9fe0e269e35d5a35d7c0966d1a0f1551d |
|
MD5 | df6158b199de9431e0d1e9650dd64621 |
|
BLAKE2b-256 | 358d6a2f30c8b5669aab7d647fb0e48281f3dc3b12abddc7f374edbd3e95d6b4 |
File details
Details for the file autosubmit_api-4.0.1b1-py3-none-any.whl
.
File metadata
- Download URL: autosubmit_api-4.0.1b1-py3-none-any.whl
- Upload date:
- Size: 190.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c617d452b5f27ef0c038d2ee440f508aa6bdd89e6c7e078436a059328b76ce1 |
|
MD5 | 79a64ff6804f7dca8a5392ed293636fb |
|
BLAKE2b-256 | 79c0cde944c56537a9ad0e7afc5d3b57cded39d939c2845b7ac6fdfd17912040 |