flexget.webserver module#
- exception flexget.webserver.WeakPassword(value, logger=<loguru.logger handlers=[(id=0, level=10, sink=<stderr>)]>, **kwargs)[source]#
Bases:
Exception
- class flexget.webserver.User(**kwargs)[source]#
Bases:
Base,UserMixinUser class available for flask apps to handle authentication using flask_login.
- _sa_class_manager = {'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'name': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'password': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'token': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
- id#
- name#
- password#
- token#
- class flexget.webserver.WebSecret(**kwargs)[source]#
Bases:
BaseStore flask secret in the database.
- _sa_class_manager = {'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'value': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
- id#
- value#
- class flexget.webserver.WebServer(bind='0.0.0.0', port=5050, ssl_certificate=None, ssl_private_key=None, base_url='')[source]#
Bases:
Thread- run()[source]#
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
- start()[source]#
Start the thread’s activity.
It must be called at most once per thread object. It arranges for the object’s run() method to be invoked in a separate thread of control.
This method will raise a RuntimeError if called more than once on the same thread object.
- triggers_lock = <unlocked _thread.lock object>#
- flexget.webserver.get_random_string(length=12, allowed_chars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789')[source]#
Return a securely generated random string.
The default length of 12 with the a-z, A-Z, 0-9 character set returns a 71-bit value. log_2((26+26+10)^12) =~ 71 bits.
Taken from the django.utils.crypto module.