signature stringlengths 8 3.44k | body stringlengths 0 1.41M | docstring stringlengths 1 122k | id stringlengths 5 17 |
|---|---|---|---|
def _get_name(self, *args, **kwargs): | return self.name<EOL> | :rtype: str | f13037:c2:m1 |
def __call__(self, *args, **kwargs): | return self.set_basic_params(*args, **kwargs)<EOL> | The call is translated into ``set_basic_params``` call.
This approach is much more convenient yet IDE most probably won't
give you a hint on what arguments are accepted.
:param args:
:param kwargs:
:rtype: Section | f13037:c2:m3 |
def set_basic_params(self, *args, **kwargs): | return self._section<EOL> | :rtype: Section | f13037:c2:m6 |
def _set(self, key, value, condition=True, cast=None, multi=False, plugin=None, priority=None): | key = OptionKey(key)<EOL>def set_plugin(plugin):<EOL><INDENT>self._section.set_plugins_params(plugins=plugin)<EOL><DEDENT>def handle_priority(value, use_list=False):<EOL><INDENT>if priority is not None:<EOL><INDENT>opts_copy = opts.copy()<EOL>opts.clear()<EOL>existing_value = opts_copy.pop(key, [])<EOL>if use_list:<EOL... | :param str|unicode key: Option name
:param value: Option value. Can be a lis if ``multi``.
:param condition: Condition to test whether this option should be added to section.
* True - test value is not None.
:param cast: Value type caster.
* bool - treat value as a flag
:param bool multi: Indicate that many... | f13037:c2:m7 |
def __init__(self, address, prefix=None): | super(PusherSocket, self).__init__(address, prefix)<EOL> | :param str|unicode address:
:param str|unicode prefix: Arbitrary prefix to differentiate sender. | f13038:c1:m0 |
def __init__(self, target_dir, library=None, push_interval=None): | super(PusherRrdtool, self).__init__(target_dir)<EOL>self._set('<STR_LIT>', push_interval)<EOL>self._set('<STR_LIT>', library)<EOL> | :param str|unicode target_dir: Directory to store rrd files into.
:param str|unicode library: Set the name of rrd library. Default: librrd.so.
:param int push_interval: Set push frequency. | f13038:c2:m0 |
def __init__(self, address, prefix=None, no_workers=None, all_gauges=None): | super(PusherStatsd, self).__init__(address, prefix)<EOL>self._set('<STR_LIT>', no_workers, cast=bool)<EOL>self._set('<STR_LIT>', all_gauges, cast=bool)<EOL> | :param str|unicode address:
:param str|unicode prefix: Arbitrary prefix to differentiate sender.
:param bool no_workers: Disable generation of single worker metrics.
:param bool all_gauges: Push all metrics to statsd as gauges. | f13038:c3:m0 |
def __init__(<EOL>self, address, node_realm=None, node_root=None, push_interval=None, idle_avg_source=None,<EOL>use_metrics=None, no_workers=None, timeout=None, retries=None, retries_delay=None,<EOL>hostname_dots_replacer=None): | super(PusherCarbon, self).__init__(address)<EOL>self._set('<STR_LIT>', node_realm)<EOL>self._set('<STR_LIT>', node_root)<EOL>self._set('<STR_LIT>', push_interval)<EOL>self._set('<STR_LIT>', idle_avg_source)<EOL>self._set('<STR_LIT>', use_metrics, cast=bool)<EOL>self._set('<STR_LIT>', no_workers, cast=bool)<EOL>self._se... | :param str|unicode|list[str|unicode] address: Host and port. Example: 127.0.0.1:2004
:param str|unicode node_realm: Set carbon metrics realm node.
:param str|unicode node_root: Set carbon metrics root node. Default: uwsgi.
:param int push_interval: Set carbon push frequency in seconds. Default: 60.
:param bool no_w... | f13038:c4:m0 |
def __init__(self, address, prefix=None, template=None): | super(PusherZabbix, self).__init__(address, prefix)<EOL>self._set('<STR_LIT>', template)<EOL> | :param str|unicode address:
:param str|unicode prefix: Arbitrary prefix to differentiate sender.
:param str|unicode template: Print (or store to a file) the zabbix template
for the current metrics setup. | f13038:c5:m0 |
def __init__(self, address=None, collection=None, push_interval=None): | value = KeyValue(locals(), aliases={'<STR_LIT>': '<STR_LIT>'})<EOL>super(PusherMongo, self).__init__(value)<EOL> | :param str|unicode address: Default: 127.0.0.1:27017
:param str|unicode collection: MongoDB colection to write into. Default: uwsgi.statistics
:param int push_interval: Write interval in seconds. | f13038:c6:m0 |
def __init__(self, fpath=None, separator=None, push_interval=None): | value = KeyValue(locals(), aliases={'<STR_LIT>': '<STR_LIT:path>', '<STR_LIT>': '<STR_LIT>'})<EOL>super(PusherFile, self).__init__(value)<EOL> | :param str|unicode fpath: File path. Default: uwsgi.stats
:param str|unicode separator: New entry separator. Default: \n\n
:param int push_interval: Write interval in seconds. | f13038:c7:m0 |
def set_basic_params(<EOL>self, no_requests=None, template=None, memory_report=None, prefix=None, prefix_date=None,<EOL>apply_strftime=None, response_ms=None, ip_x_forwarded=None): | self._set('<STR_LIT>', no_requests, cast=bool)<EOL>self._set('<STR_LIT>', template)<EOL>self._set('<STR_LIT>', memory_report)<EOL>self._set('<STR_LIT>', prefix)<EOL>if isinstance(prefix_date, string_types) and '<STR_LIT:%>' in prefix_date:<EOL><INDENT>prefix_date = prefix_date.replace('<STR_LIT:%>', '<STR_LIT>') <EOL>... | :param bool no_requests: Disable requests logging - only uWSGI internal messages
and errors will be logged.
:param str|unicode template: Set advanced format for request logging.
This template string can use variables from ``Logging.Vars``.
:param str|unicode prefix: Prefix log items with a string.
:param str... | f13039:c3:m0 |
def log_into(self, target, before_priv_drop=True): | command = '<STR_LIT>'<EOL>if not before_priv_drop:<EOL><INDENT>command += '<STR_LIT:2>'<EOL><DEDENT>self._set(command, target)<EOL>return self._section<EOL> | Simple file or UDP logging.
.. note:: This doesn't require any Logger plugin and can be used
if no log routing is required.
:param str|unicode target: Filepath or UDP address.
:param bool before_priv_drop: Whether to log data before or after privileges drop. | f13039:c3:m1 |
def set_file_params(<EOL>self, reopen_on_reload=None, trucate_on_statup=None, max_size=None, rotation_fname=None,<EOL>touch_reopen=None, touch_rotate=None, owner=None, mode=None): | self._set('<STR_LIT>', reopen_on_reload, cast=bool)<EOL>self._set('<STR_LIT>', trucate_on_statup, cast=bool)<EOL>self._set('<STR_LIT>', max_size)<EOL>self._set('<STR_LIT>', rotation_fname)<EOL>self._set('<STR_LIT>', touch_reopen, multi=True)<EOL>self._set('<STR_LIT>', touch_rotate, multi=True)<EOL>self._set('<STR_LIT>'... | Set various parameters related to file logging.
:param bool reopen_on_reload: Reopen log after reload.
:param bool trucate_on_statup: Truncate log on startup.
:param int max_size: Set maximum logfile size in bytes after which log should be rotated.
:param str|unicode rotation_fname: ... | f13039:c3:m2 |
def set_filters(self, include=None, exclude=None, write_errors=None, write_errors_tolerance=None, sigpipe=None): | if write_errors is not None:<EOL><INDENT>self._set('<STR_LIT>', not write_errors, cast=bool)<EOL><DEDENT>if sigpipe is not None:<EOL><INDENT>self._set('<STR_LIT>', not sigpipe, cast=bool)<EOL><DEDENT>self._set('<STR_LIT>', write_errors_tolerance)<EOL>for line in listify(include):<EOL><INDENT>self._set('<STR_LIT>', line... | Set various log data filters.
:param str|unicode|list include: Show only log lines matching the specified regexp.
.. note:: Requires enabled PCRE support.
:param str|unicode|list exclude: Do not show log lines matching the specified regexp.
.. note:: Requires enabled PCRE sup... | f13039:c3:m3 |
def set_requests_filters(<EOL>self, slower=None, bigger=None, status_4xx=None, status_5xx=None,<EOL>no_body=None, sendfile=None, io_errors=None): | self._set('<STR_LIT>', slower)<EOL>self._set('<STR_LIT>', bigger)<EOL>self._set('<STR_LIT>', status_4xx, cast=bool)<EOL>self._set('<STR_LIT>', status_5xx, cast=bool)<EOL>self._set('<STR_LIT>', no_body, cast=bool)<EOL>self._set('<STR_LIT>', sendfile, cast=bool)<EOL>self._set('<STR_LIT>', io_errors, cast=bool)<EOL>return... | Set various log data filters.
:param int slower: Log requests slower than the specified number of milliseconds.
:param int bigger: Log requests bigger than the specified size in bytes.
:param status_4xx: Log requests with a 4xx response.
:param status_5xx: Log requests with a 5xx res... | f13039:c3:m4 |
def set_master_logging_params(<EOL>self, enable=None, dedicate_thread=None, buffer=None,<EOL>sock_stream=None, sock_stream_requests_only=None): | self._set('<STR_LIT>', enable, cast=bool)<EOL>self._set('<STR_LIT>', dedicate_thread, cast=bool)<EOL>self._set('<STR_LIT>', buffer)<EOL>self._set('<STR_LIT>', sock_stream, cast=bool)<EOL>if sock_stream_requests_only:<EOL><INDENT>self._set('<STR_LIT>', sock_stream_requests_only, cast=bool)<EOL><DEDENT>return self._secti... | Sets logging params for delegating logging to master process.
:param bool enable: Delegate logging to master process.
Delegate the write of the logs to the master process
(this will put all of the logging I/O to a single process).
Useful for system with advanced I/O schedule... | f13039:c3:m5 |
def print_loggers(self): | self._set('<STR_LIT>', True, cast=bool)<EOL>return self._section<EOL> | Print out available (built) loggers. | f13039:c3:m6 |
def add_logger(self, logger, requests_only=False, for_single_worker=False): | if for_single_worker:<EOL><INDENT>command = '<STR_LIT>' if requests_only else '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>command = '<STR_LIT>' if requests_only else '<STR_LIT>'<EOL><DEDENT>for logger in listify(logger):<EOL><INDENT>self._set(command, logger, multi=True)<EOL><DEDENT>return self._section<EOL> | Set/add a common logger or a request requests only.
:param str|unicode|list|Logger|list[Logger] logger:
:param bool requests_only: Logger used only for requests information messages.
:param bool for_single_worker: Logger to be used in single-worker setup. | f13039:c3:m7 |
def add_logger_route(self, logger, matcher, requests_only=False): | command = '<STR_LIT>' if requests_only else '<STR_LIT>'<EOL>for logger in listify(logger):<EOL><INDENT>self._set(command, '<STR_LIT>' % (logger, matcher), multi=True)<EOL><DEDENT>return self._section<EOL> | Log to the specified named logger if regexp applied on log item matches.
:param str|unicode|list|Logger|list[Logger] logger: Logger to associate route with.
:param str|unicode matcher: Regular expression to apply to log item.
:param bool requests_only: Matching should be used only for request... | f13039:c3:m8 |
def add_logger_encoder(self, encoder, logger=None, requests_only=False, for_single_worker=False): | if for_single_worker:<EOL><INDENT>command = '<STR_LIT>' if requests_only else '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>command = '<STR_LIT>' if requests_only else '<STR_LIT>'<EOL><DEDENT>for encoder in listify(encoder):<EOL><INDENT>value = '<STR_LIT:%s>' % encoder<EOL>if logger:<EOL><INDENT>if isinstance(logger, Logge... | Add an item in the log encoder or request encoder chain.
* http://uwsgi-docs.readthedocs.io/en/latest/LogEncoders.html
.. note:: Encoders automatically enable master log handling (see ``.set_master_logging_params()``).
.. note:: For best performance consider allocating a thread
... | f13039:c3:m9 |
def __init__(self, name, mule_numbers): | <EOL>self.name = name<EOL>self.mule_numbers = mule_numbers<EOL> | :param str|unicode name: Farm alias.
:param int|list[int] mule_numbers: Total mules on farm count,
or a list of mule numbers. | f13040:c0:m0 |
def set_basic_params(<EOL>self, count=None, touch_reload=None, touch_chain_reload=None, zombie_reaper=None,<EOL>limit_addr_space=None, limit_count=None, cpu_affinity=None): | <EOL>self.set_count_auto(count)<EOL>self._set('<STR_LIT>', touch_reload, multi=True)<EOL>self._set('<STR_LIT>', touch_chain_reload, multi=True)<EOL>self._set('<STR_LIT>', zombie_reaper, cast=bool)<EOL>self._set('<STR_LIT>', limit_addr_space)<EOL>self._set('<STR_LIT>', limit_count)<EOL>self._set('<STR_LIT>', cpu_affinit... | :param int count: Spawn the specified number of workers (processes).
Set the number of workers for preforking mode.
This is the base for easy and safe concurrency in your app.
More workers you add, more concurrent requests you can manage.
Each worker corresponds to a system process, so it consumes memo... | f13040:c1:m0 |
def run_command_as_worker(self, command, after_post_fork_hook=False): | self._set('<STR_LIT>' if after_post_fork_hook else '<STR_LIT>', command, multi=True)<EOL>return self._section<EOL> | Run the specified command as worker.
:param str|unicode command:
:param bool after_post_fork_hook: Whether to run it after `post_fork` hook. | f13040:c1:m1 |
def set_count_auto(self, count=None): | count = count or self._section.vars.CPU_CORES<EOL>self._set('<STR_LIT>', count)<EOL>return self._section<EOL> | Sets workers count.
By default sets it to detected number of available cores
:param int count: | f13040:c1:m2 |
def set_thread_params(<EOL>self, enable=None, count=None, count_offload=None, stack_size=None, no_wait=None): | self._set('<STR_LIT>', enable, cast=bool)<EOL>self._set('<STR_LIT>', no_wait, cast=bool)<EOL>self._set('<STR_LIT>', count)<EOL>self._set('<STR_LIT>', count_offload)<EOL>if count:<EOL><INDENT>self._section.print_out('<STR_LIT>' % count)<EOL><DEDENT>self._set('<STR_LIT>', stack_size)<EOL>return self._section<EOL> | Sets threads related params.
:param bool enable: Enable threads in the embedded languages.
This will allow to spawn threads in your app.
.. warning:: Threads will simply *not work* if this option is not enabled.
There will likely be no error, just no execution of your t... | f13040:c1:m3 |
def set_mules_params(<EOL>self, mules=None, touch_reload=None, harakiri_timeout=None, farms=None, reload_mercy=None,<EOL>msg_buffer=None, msg_buffer_recv=None): | farms = farms or []<EOL>next_mule_number = <NUM_LIT:1><EOL>farm_mules_count = <NUM_LIT:0><EOL>for farm in farms:<EOL><INDENT>if isinstance(farm.mule_numbers, int):<EOL><INDENT>farm.mule_numbers = list(range(next_mule_number, next_mule_number + farm.mule_numbers))<EOL>next_mule_number = farm.mule_numbers[-<NUM_LIT:1>] +... | Sets mules related params.
http://uwsgi.readthedocs.io/en/latest/Mules.html
Mules are worker processes living in the uWSGI stack but not reachable via socket connections,
that can be used as a generic subsystem to offload tasks.
:param int|list mules: Add the specified mules or number... | f13040:c1:m4 |
def set_reload_params(<EOL>self, min_lifetime=None, max_lifetime=None,<EOL>max_requests=None, max_requests_delta=None,<EOL>max_addr_space=None, max_rss=None, max_uss=None, max_pss=None,<EOL>max_addr_space_forced=None, max_rss_forced=None, watch_interval_forced=None,<EOL>mercy=None): | self._set('<STR_LIT>', max_requests)<EOL>self._set('<STR_LIT>', max_requests_delta)<EOL>self._set('<STR_LIT>', min_lifetime)<EOL>self._set('<STR_LIT>', max_lifetime)<EOL>self._set('<STR_LIT>', max_addr_space)<EOL>self._set('<STR_LIT>', max_rss)<EOL>self._set('<STR_LIT>', max_uss)<EOL>self._set('<STR_LIT>', max_pss)<EOL... | Sets workers reload parameters.
:param int min_lifetime: A worker cannot be destroyed/reloaded unless it has been alive
for N seconds (default 60). This is an anti-fork-bomb measure.
Since 1.9
:param int max_lifetime: Reload workers after this many seconds. Disabled by default.... | f13040:c1:m5 |
def set_reload_on_exception_params(self, do_reload=None, etype=None, evalue=None, erepr=None): | self._set('<STR_LIT>', do_reload, cast=bool)<EOL>self._set('<STR_LIT>', etype)<EOL>self._set('<STR_LIT>', evalue)<EOL>self._set('<STR_LIT>', erepr)<EOL>return self._section<EOL> | Sets workers reload on exceptions parameters.
:param bool do_reload: Reload a worker when an exception is raised.
:param str etype: Reload a worker when a specific exception type is raised.
:param str evalue: Reload a worker when a specific exception value is raised.
:param str erepr... | f13040:c1:m6 |
def set_harakiri_params(self, timeout=None, verbose=None, disable_for_arh=None): | self._set('<STR_LIT>', timeout)<EOL>self._set('<STR_LIT>', verbose, cast=bool)<EOL>self._set('<STR_LIT>', disable_for_arh, cast=bool)<EOL>return self._section<EOL> | Sets workers harakiri parameters.
:param int timeout: Harakiri timeout in seconds.
Every request that will take longer than the seconds specified
in the harakiri timeout will be dropped and the corresponding
worker is thereafter recycled.
:param bool verbose: Haraki... | f13040:c1:m7 |
def set_zerg_server_params(self, socket, clients_socket_pool=None): | if clients_socket_pool:<EOL><INDENT>self._set('<STR_LIT>', '<STR_LIT>' % (socket, '<STR_LIT:U+002C>'.join(listify(clients_socket_pool))), multi=True)<EOL><DEDENT>else:<EOL><INDENT>self._set('<STR_LIT>', socket)<EOL><DEDENT>return self._section<EOL> | Zerg mode. Zerg server params.
When your site load is variable, it would be nice to be able to add
workers dynamically. Enabling Zerg mode you can allow zerg clients to attach
to your already running server and help it in the work.
* http://uwsgi-docs.readthedocs.io/en/latest/Zerg.html... | f13040:c1:m8 |
def set_zerg_client_params(self, server_sockets, use_fallback_socket=None): | self._set('<STR_LIT>', server_sockets, multi=True)<EOL>if use_fallback_socket is not None:<EOL><INDENT>self._set('<STR_LIT>', use_fallback_socket, cast=bool)<EOL>for socket in listify(server_sockets):<EOL><INDENT>self._section.networking.register_socket(self._section.networking.sockets.default(socket))<EOL><DEDENT><DED... | Zerg mode. Zergs params.
:param str|unicode|list[str|unicode] server_sockets: Attaches zerg to a zerg server.
:param bool use_fallback_socket: Fallback to normal sockets if the zerg server is not available | f13040:c1:m9 |
def __init__(self, action, subject=subjects.path_info('<STR_LIT>'), stage=stages.REQUEST): | if subject is None:<EOL><INDENT>subject = '<STR_LIT>' <EOL><DEDENT>subject_rule = '<STR_LIT>'<EOL>self._custom_subject = isinstance(subject, SubjectCustom)<EOL>if self._custom_subject:<EOL><INDENT>subject_rule = subject<EOL>subject = '<STR_LIT>' if subject.negate else '<STR_LIT>'<EOL><DEDENT>elif isinstance(subject, S... | :param RouteAction action: Action (or transformation) to perfrom.
See ``.actions`` and ``.transforms``.
:param SubjectCustom|SubjectBuiltin subject: Subject to verify before action is performed.
See ``.subjects``.
:param str|unicode stage: Stage on which the action needs to be performed.
See ``.stages``. | f13041:c0:m0 |
def use_router(self, router, force=None): | self._set('<STR_LIT>', force, cast=bool)<EOL>router._contribute_to_opts(self)<EOL>return self._section<EOL> | :param RouterBase router: Dedicated router object. See `.routers`.
:param bool force: All of the gateways (routers) has to be run under the master process,
supplying this you can try to bypass this limit. | f13041:c1:m0 |
def register_route(self, route_rules, label=None): | route_rules = listify(route_rules)<EOL>if route_rules and label:<EOL><INDENT>self._set(route_rules[<NUM_LIT:0>].command_label, label, multi=True)<EOL><DEDENT>for route_rules in route_rules:<EOL><INDENT>self._set(route_rules.command, route_rules.value, multi=True)<EOL><DEDENT>return self._section<EOL> | Registers a routing rule.
:param RouteRule|list[RouteRule] route_rules:
:param str|unicode label: Label to mark the given set of rules.
This can be used in conjunction with ``do_goto`` rule action.
* http://uwsgi.readthedocs.io/en/latest/InternalRouting.html#goto | f13041:c1:m1 |
def print_routing_rules(self): | self._set('<STR_LIT>', True, cast=bool)<EOL>return self._section<EOL> | Print out supported routing rules (actions, transforms, etc.). | f13041:c1:m2 |
def set_error_page(self, status, html_fpath): | statuses = [<NUM_LIT>, <NUM_LIT>, <NUM_LIT>]<EOL>status = int(status)<EOL>if status not in statuses:<EOL><INDENT>raise ConfigurationError(<EOL>'<STR_LIT>' %<EOL>(status, '<STR_LIT:U+002CU+0020>'.join(map(str, statuses))))<EOL><DEDENT>self._set('<STR_LIT>' % status, html_fpath, multi=True)<EOL>return self._section<EOL> | Add an error page (html) for managed 403, 404, 500 response.
:param int status: HTTP status code.
:param str|unicode html_fpath: HTML page file path. | f13041:c1:m3 |
def set_error_pages(self, codes_map=None, common_prefix=None): | statuses = [<NUM_LIT>, <NUM_LIT>, <NUM_LIT>]<EOL>if common_prefix:<EOL><INDENT>if not codes_map:<EOL><INDENT>codes_map = {code: '<STR_LIT>' % code for code in statuses}<EOL><DEDENT>for code, filename in codes_map.items():<EOL><INDENT>codes_map[code] = os.path.join(common_prefix, filename)<EOL><DEDENT><DEDENT>for code, ... | Add an error pages for managed 403, 404, 500 responses.
Shortcut for ``.set_error_page()``.
:param dict codes_map: Status code mapped into an html filepath or
just a filename if common_prefix is used.
If not set, filename containing status code is presumed: 400.html, 500.html,... | f13041:c1:m4 |
def set_geoip_params(self, db_country=None, db_city=None): | self._set('<STR_LIT>', db_country, plugin='<STR_LIT>')<EOL>self._set('<STR_LIT>', db_city, plugin='<STR_LIT>')<EOL>return self._section<EOL> | Sets GeoIP parameters.
* http://uwsgi.readthedocs.io/en/latest/GeoIP.html
:param str|unicode db_country: Country database file path.
:param str|unicode db_city: City database file path. Example: ``GeoLiteCity.dat``. | f13041:c1:m5 |
def header_add(self, name, value): | self._set('<STR_LIT>', '<STR_LIT>' % (name, value), multi=True)<EOL>return self._section<EOL> | Automatically add HTTP headers to response.
:param str|unicode name:
:param str|unicode value: | f13041:c1:m6 |
def header_remove(self, value): | self._set('<STR_LIT>', value, multi=True)<EOL>return self._section<EOL> | Automatically remove specified HTTP header from the response.
:param str|unicode value: | f13041:c1:m7 |
def header_collect(self, name, target_var, pull=False): | self._set(<EOL>'<STR_LIT>' if pull else '<STR_LIT>',<EOL>'<STR_LIT>' % (name, target_var), multi=True)<EOL>return self._section<EOL> | Store the specified response header in a request var
(optionally removing it from the response).
:param str|unicode name:
:param str|unicode target_var:
:param bool pull: Whether to remove header from response. | f13041:c1:m8 |
def enable(self, size, block_size=None, store=None, store_sync_interval=None): | self._set('<STR_LIT>', size)<EOL>self._set('<STR_LIT>', block_size)<EOL>self._set('<STR_LIT>', store)<EOL>self._set('<STR_LIT>', store_sync_interval)<EOL>return self._section<EOL> | Enables shared queue of the given size.
:param int size: Queue size.
:param int block_size: Block size in bytes. Default: 8 KiB.
:param str|unicode store: Persist the queue into file.
:param int store_sync_interval: Store sync interval in master cycles (usually seconds). | f13042:c0:m0 |
def set_server_params(<EOL>self, client_notify_address=None, mountpoints_depth=None, require_vassal=None,<EOL>tolerance=None, tolerance_inactive=None, key_dot_split=None): | <EOL>self._set('<STR_LIT>', client_notify_address)<EOL>self._set('<STR_LIT>', mountpoints_depth)<EOL>self._set('<STR_LIT>', require_vassal, cast=bool)<EOL>self._set('<STR_LIT>', tolerance)<EOL>self._set('<STR_LIT>', tolerance_inactive)<EOL>self._set('<STR_LIT>', key_dot_split, cast=bool)<EOL>return self._section<EOL> | Sets subscription server related params.
:param str|unicode client_notify_address: Set the notification socket for subscriptions.
When you subscribe to a server, you can ask it to "acknowledge" the acceptance of your request.
pointing address (Unix socket or UDP), on which your instance... | f13043:c0:m0 |
def set_server_verification_params(<EOL>self, digest_algo=None, dir_cert=None, tolerance=None, no_check_uid=None,<EOL>dir_credentials=None, pass_unix_credentials=None): | if digest_algo and dir_cert:<EOL><INDENT>self._set('<STR_LIT>', '<STR_LIT>' % (digest_algo, dir_cert))<EOL><DEDENT>self._set('<STR_LIT>', tolerance)<EOL>self._set('<STR_LIT>', no_check_uid, multi=True)<EOL>self._set('<STR_LIT>', dir_credentials, multi=True)<EOL>self._set('<STR_LIT>', pass_unix_credentials, cast=bool)<E... | Sets peer verification params for subscription server.
These are for secured subscriptions.
:param str|unicode digest_algo: Digest algorithm. Example: SHA1
.. note:: Also requires ``dir_cert`` to be set.
:param str|unicode dir_cert: Certificate directory.
.. note:: A... | f13043:c0:m1 |
def set_client_params(<EOL>self, start_unsubscribed=None, clear_on_exit=None, unsubscribe_on_reload=None,<EOL>announce_interval=None): | self._set('<STR_LIT>', start_unsubscribed, cast=bool)<EOL>self._set('<STR_LIT>', clear_on_exit, cast=bool)<EOL>self._set('<STR_LIT>', unsubscribe_on_reload, cast=bool)<EOL>self._set('<STR_LIT>', announce_interval)<EOL>return self._section<EOL> | Sets subscribers related params.
:param bool start_unsubscribed: Configure subscriptions but do not send them.
.. note:: Useful with master FIFO.
:param bool clear_on_exit: Force clear instead of unsubscribe during shutdown.
:param bool unsubscribe_on_reload: Force unsubscribe req... | f13043:c0:m2 |
def subscribe(<EOL>self, server=None, key=None, address=None, address_vassal=None,<EOL>balancing_weight=None, balancing_algo=None, modifier=None, signing=None, check_file=None, protocol=None,<EOL>sni_cert=None, sni_key=None, sni_client_ca=None): | <EOL>if not any((server, key)):<EOL><INDENT>raise ConfigurationError('<STR_LIT>')<EOL><DEDENT>address_key = '<STR_LIT>'<EOL>if isinstance(address, int):<EOL><INDENT>address_key = '<STR_LIT>'<EOL><DEDENT>if balancing_algo:<EOL><INDENT>backup = getattr(balancing_algo, '<STR_LIT>', None)<EOL><DEDENT>if signing:<EOL><INDEN... | Registers a subscription intent.
:param str|unicode server: Subscription server address (UDP or UNIX socket).
Examples:
* 127.0.0.1:7171
:param str|unicode key: Key to subscribe. Generally the domain name (+ optional '/< mountpoint>').
Examples:
... | f13043:c0:m3 |
def __init__(self, filepath, alias=None): | super(LoggerFile, self).__init__(alias, filepath)<EOL> | :param str|unicode filepath: File path.
:param str|unicode alias: Logger alias. | f13044:c1:m0 |
def __init__(self, addr_or_path, alias=None): | super(LoggerSocket, self).__init__(alias, addr_or_path)<EOL> | :param str|unicode addr_or_path: Remote address or filepath.
Examples:
* /tmp/uwsgi.logsock
* 192.168.173.19:5050
:param str|unicode alias: Logger alias. | f13044:c2:m0 |
def __init__(self, app_name=None, facility=None, alias=None): | super(LoggerSyslog, self).__init__(alias, app_name, facility)<EOL> | :param str|unicode app_name:
:param str|unicode facility:
* https://en.wikipedia.org/wiki/Syslog#Facility
:param str|unicode alias: Logger alias. | f13044:c3:m0 |
def __init__(self, app_name=None, host=None, facility=None, split=None, packet_size=None, alias=None): | super(LoggerRsyslog, self).__init__(app_name, facility, alias=alias)<EOL>self.args.insert(<NUM_LIT:0>, host)<EOL>self._set('<STR_LIT>', packet_size)<EOL>self._set('<STR_LIT>', split, cast=bool)<EOL> | :param str|unicode app_name:
:param str|unicode host: Address (host and port) or UNIX socket path.
:param str|unicode facility:
* https://en.wikipedia.org/wiki/Syslog#Facility
:param bool split: Split big messages into multiple chunks if they are bigger
than allowed packet size. Default: ``False``.
:param ... | f13044:c4:m0 |
def __init__(self, host=None, command=None, prefix=None, alias=None): | super(LoggerRedis, self).__init__(alias, host, command, prefix)<EOL> | :param str|unicode host: Default: 127.0.0.1:6379
:param str|unicode command: Command to be used. Default: publish uwsgi
Examples:
* publish foobar
* rpush foo
:param str|unicode prefix: Default: <empty>
:param str|unicode alias: Logger alias. | f13044:c5:m0 |
def __init__(self, host=None, collection=None, node=None, alias=None): | super(LoggerMongo, self).__init__(alias, host, collection, node)<EOL> | :param str|unicode host: Default: 127.0.0.1:27017
:param str|unicode collection: Command to be used. Default: uwsgi.logs
:param str|unicode node: An identification string for the instance
sending logs Default: <server hostname>
:param str|unicode alias: Logger alias. | f13044:c6:m0 |
def __init__(self, connection_str, alias=None): | super(LoggerZeroMq, self).__init__(alias, connection_str)<EOL> | :param str|unicode connection_str:
Examples:
* tcp://192.168.173.18:9191
:param str|unicode alias: Logger alias. | f13044:c7:m0 |
def set_emperor_params(<EOL>self, vassals_home=None, name=None, scan_interval=None, pid_file=None, spawn_asap=None,<EOL>stats_address=None, trigger_socket=None, links_no_follow=None): | self._set('<STR_LIT>', vassals_home, multi=True)<EOL>self._set('<STR_LIT>', name)<EOL>self._set('<STR_LIT>', scan_interval)<EOL>self._set('<STR_LIT>', pid_file)<EOL>self._set('<STR_LIT>', spawn_asap, cast=bool)<EOL>self._set('<STR_LIT>', stats_address)<EOL>self._set('<STR_LIT>', trigger_socket)<EOL>self._set('<STR_LIT>... | .. note:: The emperor should generally not be run with master, unless master features like advanced
logging are specifically needed.
.. note:: The emperor should generally be started at server boot time and left alone,
not reloaded/restarted except for uWSGI upgrades;
emperor reloads are a bit drastic, rel... | f13045:c0:m0 |
def print_monitors(self): | self._set('<STR_LIT>', True, cast=bool)<EOL>return self._section<EOL> | Print out enabled imperial monitors. | f13045:c0:m1 |
def set_emperor_command_params(<EOL>self, command_socket=None,<EOL>wait_for_command=None, wait_for_command_exclude=None): | self._set('<STR_LIT>', command_socket)<EOL>self._set('<STR_LIT>', wait_for_command, cast=bool)<EOL>self._set('<STR_LIT>', wait_for_command_exclude, multi=True)<EOL>return self._section<EOL> | Emperor commands related parameters.
* http://uwsgi-docs.readthedocs.io/en/latest/tutorials/EmperorSubscriptions.html
:param str|unicode command_socket: Enable the Emperor command socket.
It is a channel allowing external process to govern vassals.
:param bool wait_for_command: Al... | f13045:c0:m2 |
def set_vassals_wrapper_params(self, wrapper=None, overrides=None, fallbacks=None): | self._set('<STR_LIT>', wrapper)<EOL>self._set('<STR_LIT>', overrides, multi=True)<EOL>self._set('<STR_LIT>', fallbacks, multi=True)<EOL>return self._section<EOL> | Binary wrapper for vassals parameters.
:param str|unicode wrapper: Set a binary wrapper for vassals.
:param str|unicode|list[str|unicode] overrides: Set a binary wrapper for vassals to try before the default one
:param str|unicode|list[str|unicode] fallbacks: Set a binary wrapper for vassals ... | f13045:c0:m3 |
def set_throttle_params(self, level=None, level_max=None): | self._set('<STR_LIT>', level)<EOL>self._set('<STR_LIT>', level_max)<EOL>return self._section<EOL> | Throttling options.
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#throttling
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#loyalty
:param int level: Set throttling level (in milliseconds) for bad behaving vassals. Default: 1000.
:param int level_max: Set maximu... | f13045:c0:m4 |
def set_tolerance_params(self, for_heartbeat=None, for_cursed_vassals=None): | self._set('<STR_LIT>', for_heartbeat)<EOL>self._set('<STR_LIT>', for_cursed_vassals)<EOL>return self._section<EOL> | Various tolerance options.
:param int for_heartbeat: Set the Emperor tolerance about heartbeats.
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#heartbeat-system
:param int for_cursed_vassals: Set the Emperor tolerance about cursed vassals.
* http://uwsgi-docs.readt... | f13045:c0:m5 |
def set_mode_tyrant_params(self, enable=None, links_no_follow=None, use_initgroups=None): | self._set('<STR_LIT>', enable, cast=bool)<EOL>self._set('<STR_LIT>', links_no_follow, cast=bool)<EOL>self._set('<STR_LIT>', use_initgroups, cast=bool)<EOL>return self._section<EOL> | Tyrant mode (secure multi-user hosting).
In Tyrant mode the Emperor will run the vassal using the UID/GID of the vassal
configuration file.
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#tyrant-mode-secure-multi-user-hosting
:param enable: Puts the Emperor in Tyrant mode.
... | f13045:c0:m6 |
def set_mode_broodlord_params(<EOL>self, zerg_count=None,<EOL>vassal_overload_sos_interval=None, vassal_queue_items_sos=None): | self._set('<STR_LIT>', zerg_count)<EOL>self._set('<STR_LIT>', vassal_overload_sos_interval)<EOL>self._set('<STR_LIT>', vassal_queue_items_sos)<EOL>return self._section<EOL> | This mode is a way for a vassal to ask for reinforcements to the Emperor.
Reinforcements are new vassals spawned on demand generally bound on the same socket.
.. warning:: If you are looking for a way to dynamically adapt the number
of workers of an instance, check the Cheaper subsystem - ... | f13045:c0:m7 |
def set_basic_params(self, check_interval_overload=None): | self._set('<STR_LIT>', check_interval_overload)<EOL>return self<EOL> | :param int check_interval_overload: Interval (sec) to wait after all workers are busy
before new worker spawn. | f13046:c1:m0 |
def set_basic_params(self, check_interval_idle=None): | self._set('<STR_LIT>', check_interval_idle)<EOL>return self<EOL> | :param int check_interval_idle: Decrease workers after specified idle. Default: 10. | f13046:c2:m0 |
def set_basic_params(self, check_num_overload=None): | self._set('<STR_LIT>', check_num_overload)<EOL>return self._section<EOL> | :param int check_num_overload: Number of backlog items in queue. | f13046:c3:m0 |
def set_basic_params(<EOL>self, check_interval_busy=None,<EOL>busy_max=None, busy_min=None,<EOL>idle_cycles_max=None, idle_cycles_penalty=None,<EOL>verbose=None): | self._set('<STR_LIT>', check_interval_busy)<EOL>self._set('<STR_LIT>', busy_max)<EOL>self._set('<STR_LIT>', busy_min)<EOL>self._set('<STR_LIT>', idle_cycles_max)<EOL>self._set('<STR_LIT>', idle_cycles_penalty)<EOL>self._set('<STR_LIT>', verbose, cast=bool)<EOL>return self._section<EOL> | :param int check_interval_busy: Interval (sec) to check worker busyness.
:param int busy_max: Maximum busyness (percents). Every time the calculated busyness
is higher than this value, uWSGI will spawn new workers. Default: 50.
:param int busy_min: Minimum busyness (percents). If busyness is below this value,
... | f13046:c4:m0 |
def set_emergency_params(<EOL>self, workers_step=None, idle_cycles_max=None, queue_size=None, queue_nonzero_delay=None): | self._set('<STR_LIT>', workers_step)<EOL>self._set('<STR_LIT>', idle_cycles_max)<EOL>self._set('<STR_LIT>', queue_size)<EOL>self._set('<STR_LIT>', queue_nonzero_delay)<EOL>return self<EOL> | Sets busyness algorithm emergency workers related params.
Emergency workers could be spawned depending upon uWSGI backlog state.
.. note:: These options are Linux only.
:param int workers_step: Number of emergency workers to spawn. Default: 1.
:param int idle_cycles_max: Idle cycles ... | f13046:c4:m1 |
def set_basic_params(<EOL>self, spawn_on_request=None,<EOL>cheaper_algo=None, workers_min=None, workers_startup=None, workers_step=None): | self._set('<STR_LIT>', spawn_on_request, cast=bool)<EOL>if cheaper_algo:<EOL><INDENT>self._set('<STR_LIT>', cheaper_algo.name)<EOL>if cheaper_algo.plugin:<EOL><INDENT>self._section.set_plugins_params(plugins=cheaper_algo.plugin)<EOL><DEDENT>cheaper_algo._contribute_to_opts(self)<EOL><DEDENT>self._set('<STR_LIT>', worke... | :param bool spawn_on_request: Spawn workers only after the first request.
:param Algo cheaper_algo: The algorithm object to be used used for adaptive process spawning.
Default: ``spare``. See ``.algorithms``.
:param int workers_min: Minimal workers count. Enables cheaper mode (adaptive process spawning).
.. ... | f13046:c6:m0 |
def set_memory_limits(self, rss_soft=None, rss_hard=None): | self._set('<STR_LIT>', rss_soft) <EOL>self._set('<STR_LIT>', rss_hard)<EOL>return self._section<EOL> | Sets worker memory limits for cheapening.
:param int rss_soft: Don't spawn new workers if total resident memory usage
of all workers is higher than this limit in bytes.
.. warning:: This option expects memory reporting enabled:
``.logging.set_basic_params(memory_report=... | f13046:c6:m1 |
def print_alorithms(self): | self._set('<STR_LIT>', True, cast=bool)<EOL>return self._section<EOL> | Print out enabled cheaper algorithms. | f13046:c6:m2 |
def __init__(self, value): | super(EncoderPrefix, self).__init__(value)<EOL> | :param str|unicode value: Value to be used as affix | f13047:c1:m0 |
def __init__(self, template): | super(EncoderFormat, self).__init__(template)<EOL> | :param str|unicode template: Template string.
Available variables are listed in ``FormatEncoder.Vars``. | f13047:c6:m0 |
def __init__(self, fpath, get_slot=None): | value = KeyValue(locals(), aliases={'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>'})<EOL>super(CollectorFile, self).__init__(value)<EOL> | :param str|unicode fpath: File path.
:param int get_slot: Get value from the given slot number.
Slots: the content is split (using \\n, \\t, spaces, \\r and zero as separator)
and the item (the returned array is zero-based) used as the return value. | f13048:c2:m0 |
def __init__(self, func): | value = KeyValue(locals(), aliases={'<STR_LIT>': '<STR_LIT>'})<EOL>super(CollectorFunction, self).__init__(value)<EOL> | :param str|unicode func: Function to call. | f13048:c3:m0 |
def __init__(self, what, value): | value = KeyValue(filter_locals(locals(), drop=['<STR_LIT>']), aliases={'<STR_LIT:value>': '<STR_LIT>'})<EOL>super(CollectorAdder, self).__init__(value, children=what)<EOL> | :param int value: Value to add (multiply if it is CollectorMultiplier). | f13048:c7:m0 |
def set_basic_params(<EOL>self, touch_reload=None, quiet=None, process_count=None, max_tasks=None,<EOL>order_tasks=None, harakiri=None, change_dir=None, poll_interval=None, signal_as_task=None,<EOL>cheap=None): | self._set('<STR_LIT>', touch_reload, multi=True)<EOL>self._set('<STR_LIT>', quiet, cast=bool)<EOL>self._set('<STR_LIT>', process_count)<EOL>self._set('<STR_LIT>', max_tasks)<EOL>self._set('<STR_LIT>', order_tasks, cast=bool)<EOL>self._set('<STR_LIT>', harakiri)<EOL>self._set('<STR_LIT>', change_dir)<EOL>self._set('<STR... | :param str|unicode|list touch_reload: reload spoolers if the specified file is modified/touched
:param bool quiet: Do not log spooler related messages.
:param int process_count: Set the number of processes for spoolers.
:param int max_tasks: Set the maximum number of tasks to run before recycling
a spooler (to h... | f13049:c0:m0 |
def add(self, work_dir, external=False): | command = '<STR_LIT>'<EOL>if external:<EOL><INDENT>command += '<STR_LIT>'<EOL><DEDENT>self._set(command, self._section.replace_placeholders(work_dir), multi=True)<EOL>return self._section<EOL> | Run a spooler on the specified directory.
:param str|unicode work_dir:
.. note:: Placeholders can be used to build paths, e.g.: {project_runtime_dir}/spool/
See ``Section.project_name`` and ``Section.runtime_dir``.
:param bool external: map spoolers requests to a spooler dir... | f13049:c0:m1 |
def __init__(self, mountpoint, fs=None, src=None, flags=None): | if flags is not None:<EOL><INDENT>flags = listify(flags)<EOL>flags = '<STR_LIT:U+002C>'.join(flags)<EOL><DEDENT>if fs:<EOL><INDENT>args = [fs, src, mountpoint, flags]<EOL><DEDENT>else:<EOL><INDENT>args = [mountpoint, flags]<EOL>self.name = '<STR_LIT>'<EOL><DEDENT>super(ActionMount, self).__init__(*args)<EOL> | :param str|unicode mountpoint:
:param str|unicode fs: Filesystem. Presence indicates mounting.
:param str|unicode src: Presence indicates mounting.
:param str|unicode|list flags: Flags available for the operating system.
As an example on Linux you will options like: bind, recursive, readonly, rec, detach etc. | f13050:c1:m0 |
def __init__(self, target, honour_exit_status=False, arg_int=False): | name = self.name<EOL>if arg_int:<EOL><INDENT>name += '<STR_LIT:int>'<EOL><DEDENT>if honour_exit_status:<EOL><INDENT>name += '<STR_LIT>'<EOL><DEDENT>self.name = name<EOL>super(ActionCall, self).__init__(target)<EOL> | :param str|unicode target: Symbol and args.
:param bool honour_exit_status: Expect an int return.
Anything != 0 means failure.
:param bool arg_int: Parse the argument as an int. | f13050:c3:m0 |
def __init__(self, target, text, append=False, newline=False): | if append:<EOL><INDENT>self.name = '<STR_LIT>'<EOL><DEDENT>if newline:<EOL><INDENT>self.name += '<STR_LIT:n>'<EOL><DEDENT>super(ActionFileWrite, self).__init__(target, text)<EOL> | :param str|unicode target: File to write to.
:param str|unicode text: Text to write into file.
:param bool append: Append text instead of rewrite.
:param bool newline: Add a newline at the end. | f13050:c11:m0 |
def __init__(self, target, text, wait=False): | if wait:<EOL><INDENT>self.name = '<STR_LIT>'<EOL><DEDENT>super(ActionFifoWrite, self).__init__(target, text)<EOL> | :param bool wait: Wait until FIFO is available. | f13050:c12:m0 |
def __init__(self, add_header=False): | if add_header:<EOL><INDENT>self.name = '<STR_LIT>'<EOL><DEDENT>super(ActionFixContentLen, self).__init__()<EOL> | :param bool add_header: Force header add instead of plain fix of existing header. | f13051:c7:m0 |
def __init__(self, code, return_body=False): | if return_body:<EOL><INDENT>self.name = '<STR_LIT>'<EOL><DEDENT>super(ActionDoBreak, self).__init__(code)<EOL> | :param int code: HTTP code
:param return_body: Uses uWSGI's built-in status code and returns
both status code and message body. | f13051:c9:m0 |
def __init__(self, message): | if message is None:<EOL><INDENT>self.name = '<STR_LIT>'<EOL><DEDENT>super(ActionLog, self).__init__(message)<EOL> | :param str|unicode|None message: Message to add into log.
If ``None`` logging will be disabled for this request. | f13051:c10:m0 |
def __init__(self, name, val): | super(ActionAddVarLog, self).__init__(name, val)<EOL> | :param str|unicode name: Variable name.
:param val: Variable value. | f13051:c12:m0 |
def __init__(self, where): | super(ActionDoGoto, self).__init__(where)<EOL> | :param str|unicode|int where: Rule number of label to go to. | f13051:c13:m0 |
def __init__(self, name, val): | super(ActionAddVarCgi, self).__init__(name, val)<EOL> | :param str|unicode name: Variable name.
:param val: Variable value. | f13051:c14:m0 |
def __init__(self, name, val): | name += '<STR_LIT::>'<EOL>super(ActionHeaderAdd, self).__init__(name, val)<EOL> | :param str|unicode name: Header name.
:param val: Header value. | f13051:c15:m0 |
def __init__(self, name): | super(ActionHeaderRemove, self).__init__(name)<EOL> | :param str|unicode name: Header name. | f13051:c16:m0 |
def __init__(self, code): | super(ActionHeadersReset, self).__init__(code)<EOL> | :param int code: HTTP code. | f13051:c18:m0 |
def __init__(self, num): | super(ActionSignal, self).__init__(num)<EOL> | :param int num: Signal number. | f13051:c19:m0 |
def __init__(self, data, crnl=False): | if crnl:<EOL><INDENT>self.name = '<STR_LIT>'<EOL><DEDENT>super(ActionSend, self).__init__(data)<EOL> | :param data: Data to add to response.
:param bool crnl: Add carriage return and new line. | f13051:c20:m0 |
def __init__(self, url, permanent=False): | if permanent:<EOL><INDENT>self.name = '<STR_LIT>'<EOL><DEDENT>super(ActionRedirect, self).__init__(url)<EOL> | :param str| unicode url: URL to redirect to.
:param bool permanent: If ``True`` use 301, otherwise 302. | f13051:c21:m0 |
def __init__(self, rule, do_continue=False): | if do_continue:<EOL><INDENT>self.name = '<STR_LIT>'<EOL><DEDENT>super(ActionRewrite, self).__init__(rule)<EOL> | :param str|unicode rule: A rewrite rule.
:param bool do_continue: Stop request processing
and continue to the selected request handler. | f13051:c22:m0 |
def __init__(self, external_address='<STR_LIT>', modifier='<STR_LIT>', app='<STR_LIT>'): | super(ActionRouteUwsgi, self).__init__(external_address, modifier, modifier.submod, app)<EOL> | :param str|unicode external_address: External uWSGI server address (host:port).
:param Modifier modifier: Set request modifier.
:param str|unicode app: Set ``UWSGI_APPID``. | f13051:c23:m0 |
def __init__(self, address, host_header=None): | super(ActionRouteExternal, self).__init__(address, host_header)<EOL> | :param str|unicode address: External HTTP address (host:port)
:param str|unicode host_header: HOST header value. | f13051:c24:m0 |
def __init__(self, name, message): | super(ActionAlarm, self).__init__(name, message)<EOL> | :param str|unicode name: Alarm name
:param str|unicode message: Message to pass into alarm. | f13051:c25:m0 |
def __init__(self, fpath): | super(ActionServeStatic, self).__init__(fpath)<EOL> | :param str|unicode fpath: Static file path. | f13051:c26:m0 |
def __init__(self, realm, user=None, password=None, do_next=False): | if do_next:<EOL><INDENT>self.name = '<STR_LIT>'<EOL><DEDENT>user_password = []<EOL>if user:<EOL><INDENT>user += '<STR_LIT::>'<EOL>user_password.append(user)<EOL><DEDENT>if password:<EOL><INDENT>user_password.append(password)<EOL><DEDENT>super(ActionAuthBasic, self).__init__(realm, '<STR_LIT>'.join(user_password) if use... | :param str|unicode realm:
:param str|unicode user:
:param str|unicode password: Password or htpasswd-like file.
:param bool do_next: Allow next rule. | f13051:c27:m0 |
def __init__(<EOL>self, realm, address, base_dn=None, bind_dn=None, bind_password=None,<EOL>filter=None, login_attr=None, log_level=None,<EOL>do_next=False): | arg = KeyValue(<EOL>filter_locals(locals(), drop=['<STR_LIT>', '<STR_LIT>']),<EOL>aliases={<EOL>'<STR_LIT:address>': '<STR_LIT:url>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>},<EOL>items_separator='<STR_LIT... | :param str|unicode realm:
:param str|unicode address: LDAP server URI
:param str|unicode base_dn: Base DN used when searching for users.
:param str|unicode bind_dn: DN used for binding.
Required if the LDAP server does not allow anonymous searches.
:param str|unicode bind_password: Password for the ``bind_dn`` ... | f13051:c28:m0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.