gws.base.storage.core
¶
Storage object.
Source code: gws.base.storage.core
Module Contents¶
- class gws.base.storage.core.Config(*args, **kwargs)¶
Bases:
gws.ConfigWithAccess
Storage configuration
- categoryName: str | None¶
category name
- providerUid: str | None¶
storage provider uid
- class gws.base.storage.core.Object¶
Bases:
gws.Node
Configurable GWS object.
- categoryName: str¶
- storageProvider: gws.StorageProvider¶
- configure()¶
Configuration hook.
- configure_provider()¶
- get_state_for(user)¶
- handle_request(req: gws.WebRequester, p: Request) Response ¶
- props(user)¶
Generate a
Props
struct for this object.- Parameters:
user – The user for which the props should be generated.
- class gws.base.storage.core.Request(*args, **kwargs)¶
Bases:
gws.Request
Command request.
- entryData: dict | None¶
- entryName: str | None¶
- class gws.base.storage.core.Response(*args, **kwargs)¶
Bases:
gws.Response
Command response.
- data: dict | None¶
- class gws.base.storage.core.State(*args, **kwargs)¶
Bases:
gws.Data
Basic data object.
This object can be instantiated by passing one or or
dict
arguments and/or keyword args. All dicts keys and keywords become attributes of the object.Accessing an undefined attribute returns
None
and no error is raised, unless the attribute name starts with an underscore.- canCreate: bool¶
- canDelete: bool¶
- canRead: bool¶
- canWrite: bool¶
- names: list[str]¶
- class gws.base.storage.core.Verb¶
Bases:
gws.Enum
Enumeration type.
Despite being declared as extending
Enum
(for IDE support), this class is actually just a simple object and intended to be used as a collection of attributes. It doesn’t provide anyEnum
-specific utilities.The rationale behind this is that we need
Enum
members (e.g.Color.RED
) to be scalars, and not complex objects as in the standardEnum
.- delete = 'delete'¶
- list = 'list'¶
- read = 'read'¶
- write = 'write'¶