qunicorn_core.api package
Subpackages
- qunicorn_core.api.deployment package
- qunicorn_core.api.devices package
- qunicorn_core.api.jobmanager package
- qunicorn_core.api.models package
- qunicorn_core.api.services package
- qunicorn_core.api.usermanager package
Submodules
qunicorn_core.api.jwt module
Module containing JWT security features for the API.
- class qunicorn_core.api.jwt.DemoUser(username: str)
Bases:
objectThis class should be replaced by the actual user class!
- qunicorn_core.api.jwt.JWT = <flask_jwt_extended.jwt_manager.JWTManager object>
Basic JWT security scheme.
- class qunicorn_core.api.jwt.JWTMixin
Bases:
objectExtend Blueprint to add security documentation and jwt handling
- qunicorn_core.api.jwt.JWT_REFRESH_SCHEME = {'bearerFormat': 'JWT', 'description': 'The jwt refresh token as returned by login. Must only be used to get a new access token.', 'scheme': 'bearer', 'type': 'http'}
Security schemes to be added to the swagger.json api documentation.
- qunicorn_core.api.jwt.JWT_SCHEME = {'bearerFormat': 'JWT', 'description': 'The jwt access token as returned by login or refresh.', 'scheme': 'bearer', 'type': 'http'}
JWT security scheme for JWT refresh tokens.
- qunicorn_core.api.jwt.register_jwt(app: Flask)
Register jwt manager with flask app.
qunicorn_core.api.util module
Module containing utilities for flask smorest APIs.
- class qunicorn_core.api.util.MaBaseSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)
Bases:
SchemaBase schema that automatically changes python snake case to camelCase in json.
- on_bind_field(field_name: str, field_obj: Field)
Hook to modify a field when it is bound to the Schema.
No-op by default.
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>
Module contents
Module containing all API related code of the project.
- class qunicorn_core.api.RootView
Bases:
MethodView- get() Dict[str, str]
Get the Root API information containing the links to all versions of this api.
- methods: ClassVar[Optional[Collection[str]]] = {'GET'}
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
- class qunicorn_core.api.VersionsRootSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)
Bases:
MaBaseSchema- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>
- qunicorn_core.api.register_root_api(app: Flask)
Register the API with the flask app.