opensampl.db.access_orm
ORM for managing access to openSAMPL database and endpoints
APIAccessKey
Bases: Base
Table for recording and managing API access keys.
Source code in opensampl/db/access_orm.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
generate_key()
Generate the API access key.
Returns:
| Type | Description |
|---|---|
str
|
The generated access key string. |
Source code in opensampl/db/access_orm.py
23 24 25 26 27 28 29 30 31 32 | |
is_expired()
Check if API access key is expired.
Returns:
| Type | Description |
|---|---|
bool
|
True if the key is expired, False otherwise. |
Source code in opensampl/db/access_orm.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |