text stringlengths 81 112k |
|---|
Helper function to check that the operator `op` can be applied to items produced by g1 and g2.
def check_that_operator_can_be_applied_to_produces_items(op, g1, g2):
"""
Helper function to check that the operator `op` can be applied to items produced by g1 and g2.
"""
g1_tmp_copy = g1.spawn()
g2_tmp... |
Replace the existing cls.__init__() method with a new one which
also initialises the _dependent_generators attribute to an empty list.
def add_new_init_method(cls):
"""
Replace the existing cls.__init__() method with a new one which
also initialises the _dependent_generators attribute to an empty list.... |
Add default __repr__ method in case no user-defined one is present.
def add_new_repr_method(cls):
"""
Add default __repr__ method in case no user-defined one is present.
"""
if isinstance(cls.__repr__, WrapperDescriptorType):
cls.__repr__ = lambda self: f"<{self.__class__.__name__}, id={hex(id... |
Replace existing cls.reset() method with a new one which also
calls reset() on any clones.
def add_new_reset_method(cls):
"""
Replace existing cls.reset() method with a new one which also
calls reset() on any clones.
"""
orig_reset = cls.reset
def new_reset(self, seed=None):
logger... |
Return sequence of `N` elements.
If `seed` is not None, the generator is reset
using this seed before generating the elements.
def generate(self, N, *, seed=None, progressbar=False):
"""
Return sequence of `N` elements.
If `seed` is not None, the generator is reset
usi... |
Return (truncated) md5 hash representing this generator.
We truncate the hash simply for readability, as this is
purely intended for debugging purposes and the risk of
any collisions will be negligible.
def tohu_id(self):
"""
Return (truncated) md5 hash representing this generat... |
cls:
The custom generator class for which to create an item-class
def _set_item_class(self):
"""
cls:
The custom generator class for which to create an item-class
"""
clsname = self.__tohu_items_name__
self.item_cls = make_item_class(clsname, self.field_n... |
Return a dictionary of the form {name: field_generator} containing
all tohu generators defined in the class and instance namespace
of this custom generator.
def _find_field_generator_templates(self):
"""
Return a dictionary of the form {name: field_generator} containing
all tohu... |
Helper function to generate a CSV header line depending on
the combination of arguments provided.
def _generate_csv_header_line(*, header_names, header_prefix='', header=True, sep=',', newline='\n'):
"""
Helper function to generate a CSV header line depending on
the combination of arguments provided.
... |
Return a pair (schema, table) derived from the given `table_name`
(anything before the first '.' if the name contains one; otherwise
the return value of `schema` is None).
Examples:
>>> _extract_schema_if_given('some_schema.my_table')
('some_schema', 'my_table')
>>> _extract_schem... |
Export items as rows in a pandas dataframe table.
Parameters
----------
fields: list or dict
List of field names to export, or dictionary mapping output column names
to attribute names of the generators.
Examples:
fields=['field_name_1', 'fie... |
Parameters
----------
filename: str or None
The file to which output will be written. By default, any existing content is
overwritten. Use `append=True` to open the file in append mode instead.
If filename is None, the generated CSV output is returned instead of writt... |
Return a fresh spawn of g unless g is already
contained in this SpawnMapping, in which case
return the previously spawned generator.
def spawn_generator(self, g):
"""
Return a fresh spawn of g unless g is already
contained in this SpawnMapping, in which case
return the p... |
Return an exact copy of this generator which behaves the same way
(i.e., produces the same elements in the same order) but is otherwise
independent, i.e. there is no link between the two generators
(as opposed to a cloned generator, which is automatically reset
whenever the original gene... |
Return an exact copy of this generator which behaves the same way
(i.e., produces the same elements in the same order) and which is
automatically reset whenever the original generator is reset.
def clone(self, spawn_mapping=None):
"""
Return an exact copy of this generator which behaves... |
Convenience property to iterate over all generators in arg_gens and kwarg_gens.
def all_generators(self):
"""
Convenience property to iterate over all generators in arg_gens and kwarg_gens.
"""
for arg_gen in self.arg_gens:
yield arg_gen
for kwarg_gen in self.kwarg_... |
Split a tuple generator into individual generators.
Parameters
----------
g: tohu generator
The generator to be split. The items produced by `g` must be tuples.
maxbuffer: integer
Maximum number of items produced by `g` that will be buffered.
def Split(g, *, maxbuffer=10, tuple_len=Non... |
Length of tuples produced by this generator.
def tuple_len(self):
"""
Length of tuples produced by this generator.
"""
try:
return self._tuple_len
except AttributeError:
raise NotImplementedError("Class {} does not implement attribute 'tuple_len'.".format... |
Return all valid/active faults ordered by ID to allow the user to pick and choose.
:return: List of Tuples where the Tuple elements are: (fault id, fault template)
def show_faults():
"""
Return all valid/active faults ordered by ID to allow the user to pick and choose.
:return: List of Tuples wher... |
Return all valid/active sentences ordered by ID to allow the user to pick and choose.
:return: Dict containing the sentence ID as the key and the sentence structure as the value.
def show_sentences():
"""
Return all valid/active sentences ordered by ID to allow the user to pick and choose.
:return: ... |
Retrieve a randomly-generated error message as a unicode string.
:param fault_id:
Allows you to optionally specify an integer representing the fault_id
from the database table. This allows you to retrieve a specific fault
each time, albeit with different keywords.
def get_fa... |
Retrieve a randomly-generated sentence as a unicode string.
:param sentence_id:
Allows you to optionally specify an integer representing the sentence_id
from the database table. This allows you to retrieve a specific
sentence each time, albeit with different keywords.
def get... |
Let's fetch a random sentence that we then need to substitute bits of...
@
:param counts:
:param sentence_id:
def __get_sentence(counts, sentence_id=None):
"""Let's fetch a random sentence that we then need to substitute bits of...
@
:param counts:
:param sentence_id:
"""
# First o... |
Let's fetch a VERB
:param counts:
def __get_verb(counts):
"""Let's fetch a VERB
:param counts:
"""
cursor = CONN.cursor()
check_query = "select verb_id from surverbs"
cursor.execute(check_query)
check_result = cursor.fetchall()
id_list = []
for row in check_result:
id... |
Here we simply take a count of each of the database tables so we know our
upper limits for our random number calls then return a dictionary of them
to the calling function...
def __get_table_limits():
"""Here we simply take a count of each of the database tables so we know our
upper limits for our ran... |
pull the actual sentence from the tuple (tuple contains additional data such as ID)
:param _sentence_tuple:
:param counts:
def __process_sentence(sentence_tuple, counts):
"""pull the actual sentence from the tuple (tuple contains additional data such as ID)
:param _sentence_tuple:
:param counts:
... |
Lets find and replace all instances of #VERB
:param _sentence:
:param counts:
def __replace_verbs(sentence, counts):
"""Lets find and replace all instances of #VERB
:param _sentence:
:param counts:
"""
if sentence is not None:
while sentence.find('#VERB') != -1:
sentenc... |
Lets find and replace all instances of #NOUN
:param _sentence:
:param counts:
def __replace_nouns(sentence, counts):
"""Lets find and replace all instances of #NOUN
:param _sentence:
:param counts:
"""
if sentence is not None:
while sentence.find('#NOUN') != -1:
sentenc... |
Lets find and replace all instances of #ADJECTIVE_MAYBE
:param _sentence:
:param counts:
def ___replace_adjective_maybe(sentence, counts):
"""Lets find and replace all instances of #ADJECTIVE_MAYBE
:param _sentence:
:param counts:
"""
random_decision = random.randint(0, 1)
if sentence... |
Lets find and replace all instances of #ADJECTIVE
:param _sentence:
:param counts:
def __replace_adjective(sentence, counts):
"""Lets find and replace all instances of #ADJECTIVE
:param _sentence:
:param counts:
"""
if sentence is not None:
while sentence.find('#ADJECTIVE') != -1:... |
Lets find and replace all instances of #NAME
:param _sentence:
:param counts:
def __replace_names(sentence, counts):
"""Lets find and replace all instances of #NAME
:param _sentence:
:param counts:
"""
if sentence is not None:
while sentence.find('#NAME') != -1:
senten... |
Lets find and replace all instances of #AN
This is a little different, as this depends on whether the next
word starts with a vowel or a consonant.
:param _sentence:
def __replace_an(sentence):
"""Lets find and replace all instances of #AN
This is a little different, as this depends on whether the... |
Lets find and replace all instances of #RANDOM
:param _sentence:
def __replace_random(sentence):
"""Lets find and replace all instances of #RANDOM
:param _sentence:
"""
sub_list = None
choice = None
if sentence is not None:
while sentence.find('#RANDOM') != -1:
rando... |
Allows the use of repeating random-elements such as in the 'Ten green bottles' type sentences.
:param sentence:
def __replace_repeat(sentence):
"""
Allows the use of repeating random-elements such as in the 'Ten green bottles' type sentences.
:param sentence:
"""
######### USE SENTENCE_ID 47... |
here we replace all instances of #CAPITALISE and cap the next word.
############
#NOTE: Buggy as hell, as it doesn't account for words that are already
#capitalized
############
:param _sentence:
def __replace_capitalise(sentence):
"""here we replace all instances of #CAPITALISE and cap the ... |
here we replace all instances of #CAPALL and cap the entire sentence.
Don't believe that CAPALL is buggy anymore as it forces all uppercase OK?
:param _sentence:
def __replace_capall(sentence):
"""here we replace all instances of #CAPALL and cap the entire sentence.
Don't believe that CAPALL is buggy ... |
Here we check to see that we have the correct number of spaces in the correct locations.
:param _sentence:
:return:
def __check_spaces(sentence):
"""
Here we check to see that we have the correct number of spaces in the correct locations.
:param _sentence:
:return:
"""
# We have to ru... |
Internal helper function used by `explode_columns()`.
def make_exploded_column(df, colname_new, colname_old):
"""
Internal helper function used by `explode_columns()`.
"""
s = df[colname_old].apply(pd.Series).stack()
s.name = colname_new
return s |
Given a dataframe with certain columns that contain lists,
return another dataframe where the elements in each list
are "exploded" into individual rows.
Example:
>>> df
col1 col2 col3 col4
0 foo 11 [DDD, AAA, CCC] [dd, aa, cc]
1 bar 22 [FFF] ... |
Helper function which prints a sequence of `num` items
produced by the random generator `gen`.
def print_generated_sequence(gen, num, *, sep=", ", fmt='', seed=None):
"""
Helper function which prints a sequence of `num` items
produced by the random generator `gen`.
"""
if seed:
gen.reset... |
Helper function to create a list of namedtuples which are useful
for testing and debugging (especially of custom generators).
Example
-------
>>> make_dummy_tuples(chars='abcd')
[Quux(x='AA', y='aa'),
Quux(x='BB', y='bb'),
Quux(x='CC', y='cc'),
Quux(x='DD', y='dd')]
def make_dummy_t... |
Ensure input represents a valid date and return the corresponding `datetime.date` object.
Valid inputs:
- string of the form "YYYY-MM-DD"
- dt.date object
- pd.Timestamp of the form "YYYY-MM-DD 00:00:00" with freq='D' (as is generated by pd.date_range())
def ensure_is_date_object(x):
"""
... |
Return all generators in this namespace which are not clones.
def all_independent_generators(self):
"""
Return all generators in this namespace which are not clones.
"""
return {g: name for g, name in self._ns.items() if not is_clone(g)} |
Parameters
----------
clsname: string
Name of the class to be created
attr_names: list of strings
Names of the attributes of the class to be created
def make_tohu_items_class(clsname, attr_names):
"""
Parameters
----------
clsname: string
Name of the class to be cre... |
Return a string which defines the name of the namedtuple class which will be used
to produce items for the custom generator.
By default this will be the first part of the class name (before '...Generator'),
for example:
FoobarGenerator -> Foobar
QuuxGenerator -> Quux
However, it can... |
Initialise random generator to be used for picking elements.
With the current implementation in tohu (where we pick elements
from generators individually instead of in bulk), it is faster
to `use random.Random` than `numpy.random.RandomState` (it is
possible that this may change in the f... |
Transfer the internal state from `other` to `self`.
After this call, `self` will produce the same elements
in the same order as `other` (even though they otherwise
remain completely independent).
def _set_random_state_from(self, other):
"""
Transfer the internal state from `othe... |
Initialise random generator to be used for picking elements.
With the current implementation in tohu (where we pick elements
from generators individually instead of in bulk), it is faster
to `use random.Random` than `numpy.random.RandomState` (it is
possible that this may change in the f... |
Helper function which updates `field_gens` with any items in the
dictionary `adict` that are instances of `TohuUltraBaseGenerator`.
def update_with_tohu_generators(field_gens, adict):
"""
Helper function which updates `field_gens` with any items in the
dictionary `adict` that are instances of `TohuUltr... |
Return dictionary with the names and instances of
all tohu.BaseGenerator occurring in the given
object's class & instance namespaces.
def find_field_generator_templates(obj):
"""
Return dictionary with the names and instances of
all tohu.BaseGenerator occurring in the given
object's class & ins... |
Set the attribute `cls.__tohu_items_name__` to a string which defines the name
of the namedtuple class which will be used to produce items for the custom
generator.
By default this will be the first part of the class name (before '...Generator'),
for example:
FoobarGenerator -> Foobar
... |
cls:
The custom generator class for which to create an item-class
def make_item_class_for_custom_generator_class(cls):
"""
cls:
The custom generator class for which to create an item-class
"""
clsname = cls.__tohu_items_name__
attr_names = cls.field_gens.keys()
return make_item_... |
Replace the existing cls.__init__() method with a new one
which calls the original one and in addition performs the
following actions:
(1) Finds all instances of tohu.BaseGenerator in the namespace
and collects them in the dictionary `self.field_gens`.
(2) ..to do..
def _add_new_init_method(cl... |
TODO
def _add_new_next_method(cls):
"""
TODO
"""
def new_next(self):
field_values = [next(g) for g in self.field_gens.values()]
return self.item_cls(*field_values)
cls.__next__ = new_next |
Attach a new `reset()` method to `cls` which resets the internal
seed generator of `cls` and then resets each of its constituent
field generators found in `cls.field_gens`.
def _add_new_reset_method(cls):
"""
Attach a new `reset()` method to `cls` which resets the internal
seed generator of `cls` a... |
TODO
def _add_new_spawn_method(cls):
"""
TODO
"""
def new_spawn_method(self, dependency_mapping):
# TODO/FIXME: Check that this does the right thing:
# (i) the spawned generator is independent of the original one (i.e. they can be reset independently without altering the other's behavi... |
Helper method which explicitly resets all input generators
to the derived generator. This should only ever be called
for testing or debugging.
def reset_input_generators(self, seed):
"""
Helper method which explicitly resets all input generators
to the derived generator. This sh... |
Helper function to spot-check that the items produces by this generator have the attribute `name`.
def _spot_check_that_elements_produced_by_this_generator_have_attribute(self, name):
"""
Helper function to spot-check that the items produces by this generator have the attribute `name`.
"""
... |
Export items as rows in a pandas dataframe table.
Parameters
----------
fields: list or dict
List of field names to export, or dictionary mapping output column names
to attribute names of the generators.
Examples:
fields=['field_name_1', 'fie... |
Parameters
----------
output_file: str or file object or None
The file to which output will be written. By default, any existing content is
overwritten. Use `append=True` to open the file in append mode instead.
If `output_file` is None, the generated CSV output is re... |
Export items as rows in a PostgreSQL table.
Parameters
----------
url: string
Connection string to connect to the database.
Example: "postgresql://postgres@127.0.0.1:5432/testdb"
table_name: string
Name of the database table. Note that if this name ... |
Reset this generator's seed generator and any clones.
def reset(self, seed):
"""
Reset this generator's seed generator and any clones.
"""
logger.debug(f'Resetting {self} (seed={seed})')
self.seed_generator.reset(seed)
for c in self.clones:
c.reset(seed) |
Kwargs:
initial_namespace:
defaults:
def _load_config(initial_namespace=None, defaults=None):
# type: (Optional[str], Optional[str]) -> ConfigLoader
"""
Kwargs:
initial_namespace:
defaults:
"""
# load defaults
if defaults:
config = ConfigLoader()
... |
Override env vars and reload the Settings object
NOTE:
Obviously this context has to be in place before you import any
module which reads env values at import time.
NOTE:
The values in `kwargs` must be strings else you will get a cryptic:
TypeError: execve() arg 3 contains a non-string va... |
Return a configuration object
def _import_yaml(config_file_path):
"""Return a configuration object
"""
try:
logger.info('Importing config %s...', config_file_path)
with open(config_file_path) as config_file:
return yaml.safe_load(config_file.read())
except IOError as ex:
... |
Get all files for processing.
This starts iterating from `base_dir` and checks for all files
that look like `filename_regex` under `path` regex excluding
all paths under the `excluded_paths` list, whether they are files
or folders. `excluded_paths` are explicit paths, not regex.
`excluded_filename_... |
Check for matching tags between what the user provided
and the tags set in the config.
If `any` is chosen, match.
If no tags are chosen and none are configured, match.
If the user provided tags match any of the configured tags, match.
def _match_tags(repex_tags, path_tags):
"""Check for matching t... |
Iterate over all paths in `config_file_path`
:param string config_file_path: a path to a repex config file
:param dict config: a dictionary representing a repex config
:param dict variables: a dict of variables (can be None)
:param list tags: a list of tags to check for
:param bool validate: whethe... |
Iterate over all chosen files in a path
:param dict pathobj: a dict of a specific path in the config
:param dict variables: a dict of variables (can be None)
def handle_path(pathobj, variables=None, diff=False):
"""Iterate over all chosen files in a path
:param dict pathobj: a dict of a specific path... |
Merge variables into a single dictionary
Applies to CLI provided variables only
def _build_vars_dict(vars_file='', variables=None):
"""Merge variables into a single dictionary
Applies to CLI provided variables only
"""
repex_vars = {}
if vars_file:
with open(vars_file) as varsfile:
... |
Replace strings in one or multiple files.
You must either provide `REGEX_PATH` or use the `-c` flag
to provide a valid repex configuration.
`REGEX_PATH` can be: a regex of paths under `basedir`,
a path to a single directory under `basedir`,
or a path to a single file.
It's important to note t... |
r"""Receive a dict of variables and a dict of fields
and iterates through them to expand a variable in an field, then
returns the fields dict with its variables expanded.
This will fail if not all variables expand (due to not providing
all necessary ones).
fields:
type... |
Expand variable to its corresponding value in_string
:param string variable: variable name
:param value: value to replace with
:param string in_string: the string to replace in
def _expand_var(self, in_string, available_variables):
"""Expand variable to its corresponding value in_strin... |
Verify that all required strings are in the file
def validate_before(self, content, file_to_handle):
"""Verify that all required strings are in the file
"""
logger.debug('Looking for required strings: %s', self.must_include)
included = True
for string in self.must_include:
... |
Find all matches of an expression in a file
def find_matches(self, content, file_to_handle):
"""Find all matches of an expression in a file
"""
# look for all match groups in the content
groups = [match.groupdict() for match in
self.match_expression.finditer(content)]
... |
Replace all occurences of the regex in all matches
from a file with a specific value.
def replace(self, match, content):
"""Replace all occurences of the regex in all matches
from a file with a specific value.
"""
new_string = self.replace_expression.sub(self.replace_with, match... |
Do exit on certain events
:param bool no_workers: Shutdown uWSGI when no workers are running.
:param bool idle: Shutdown uWSGI when idle.
:param bool reload: Force exit even if a reload is requested.
:param bool sig_term: Exit on SIGTERM instead of brutal workers reload.
... |
Exception handling related params.
:param str|unicode|list[str|unicode] handler: Register one or more exception handling C-functions.
:param bool catch: Catch exceptions and report them as http output (including stack trace and env params).
.. warning:: Use only for testing purposes.
... |
Activate idle mode - put uWSGI in cheap mode after inactivity timeout.
:param int timeout: Inactivity timeout in seconds.
:param bool exit: Shutdown uWSGI when idle.
def set_idle_params(self, timeout=None, exit=None):
"""Activate idle mode - put uWSGI in cheap mode after inactivity timeout.
... |
Set reload related params.
:param int mercy: Set the maximum time (in seconds) we wait
for workers and other processes to die during reload/shutdown.
:param bool exit: Force exit even if a reload is requested.
def set_reload_params(self, mercy=None, exit=None):
"""Set reload relat... |
Adds a cron task running the given command on the given schedule.
http://uwsgi.readthedocs.io/en/latest/Cron.html
HINTS:
* Use negative values to say `every`:
hour=-3 stands for `every 3 hours`
* Use - (minus) to make interval:
minute='13-18' s... |
Attaches a command/daemon to the master process optionally managed by a pidfile.
This will allow the uWSGI master to control/monitor/respawn this process.
.. note:: This uses old classic uWSGI means of process attaching
To have more control use ``.attach_process()`` method (requires uWSGI... |
Attaches a command/daemon to the master process.
This will allow the uWSGI master to control/monitor/respawn this process.
http://uwsgi-docs.readthedocs.io/en/latest/AttachingDaemons.html
:param str|unicode command: The command line to execute.
:param bool for_legion: Legion daemons ... |
: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 ... |
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 ... |
: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 pro... |
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(me... |
Returns uWSGI version string or tuple.
:param bool as_tuple:
:rtype: str|tuple
def get_version(self, as_tuple=False):
"""Returns uWSGI version string or tuple.
:param bool as_tuple:
:rtype: str|tuple
"""
if as_tuple:
return uwsgi.version_info
... |
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
def register... |
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.
def set_error_page(self, status, html_fpath):
"""Add an error page (html) for managed 403, 404, 500 response.
:param int status: HTTP ... |
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,... |
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``.
def set_geoip_params(self, db_country=None, db_city=None):
"""Sets G... |
Automatically add HTTP headers to response.
:param str|unicode name:
:param str|unicode value:
def header_add(self, name, value):
"""Automatically add HTTP headers to response.
:param str|unicode name:
:param str|unicode value:
"""
self._set('add-header', '%... |
Automatically remove specified HTTP header from the response.
:param str|unicode value:
def header_remove(self, value):
"""Automatically remove specified HTTP header from the response.
:param str|unicode value:
"""
self._set('del-header', value, multi=True)
return se... |
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.
def header_collect(self, name, target_var, pull=False):
"""Store ... |
Allows mapping mountpoint to a static directory (or file).
* http://uwsgi.readthedocs.io/en/latest/StaticFiles.html#mode-3-using-static-file-mount-points
:param str|unicode mountpoint:
:param str|unicode target:
:param bool retain_resource_path: Append the requested resource to the d... |
Adds statics expiration rule based on a criterion.
:param str|unicode criterion: Criterion (subject) to base expiration on.
See ``.expiration_criteria``.
:param str|unicode|list[str|unicode] value: Value to test criteria upon.
.. note:: Usually a regular expression.
... |
Use the uWSGI caching subsystem to store mappings from URI to filesystem paths.
* http://uwsgi.readthedocs.io/en/latest/StaticFiles.html#caching-paths-mappings-resolutions
:param int timeout: Amount of seconds to put resolved paths in the uWSGI cache.
:param str|unicode cache_name: Cache name... |
Sets common socket params.
:param int send_timeout: Send (write) timeout in seconds.
:param bool keep_alive: Enable TCP KEEPALIVEs.
:param bool no_defer_accept: Disable deferred ``accept()`` on sockets
by default (where available) uWSGI will defer the accept() of requests until so... |
Sets Unix-socket related params.
:param bool abstract: Force UNIX socket into abstract mode (Linux only).
:param str permissions: UNIX sockets are filesystem objects that obey
UNIX permissions like any other filesystem object.
You can set the UNIX sockets' permissions with thi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.