flux_restful.db package¶
Submodules¶
flux_restful.db.base module¶
flux_restful.db.base_class module¶
flux_restful.db.init_db module¶
Database setup: create the tables and manage users.
Used by the flux-restful command (init, add-user, list-users) and runnable directly with python3 -m flux_restful.db.init_db.
-
flux_restful.db.init_db.add_user(username, password, superuser=
False, is_active=True) None[source]¶ Add a user to the database (no-op if the username exists).
- flux_restful.db.init_db.create_tables() None[source]¶
Create any missing tables (a no-op for existing ones).
- flux_restful.db.init_db.init_db() None[source]¶
Create the tables and the superuser from FLUX_USER / FLUX_TOKEN.