partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
__prepare_config
parse testcase/testsuite config.
httprunner/parser.py
def __prepare_config(config, project_mapping, session_variables_set=None): """ parse testcase/testsuite config. """ # get config variables raw_config_variables = config.pop("variables", {}) raw_config_variables_mapping = utils.ensure_mapping_format(raw_config_variables) override_variables = util...
def __prepare_config(config, project_mapping, session_variables_set=None): """ parse testcase/testsuite config. """ # get config variables raw_config_variables = config.pop("variables", {}) raw_config_variables_mapping = utils.ensure_mapping_format(raw_config_variables) override_variables = util...
[ "parse", "testcase", "/", "testsuite", "config", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/parser.py#L878-L896
[ "def", "__prepare_config", "(", "config", ",", "project_mapping", ",", "session_variables_set", "=", "None", ")", ":", "# get config variables", "raw_config_variables", "=", "config", ".", "pop", "(", "\"variables\"", ",", "{", "}", ")", "raw_config_variables_mapping"...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
LazyFunction.__parse
init func as lazy functon instance Args: function_meta (dict): function meta including name, args and kwargs
httprunner/parser.py
def __parse(self, function_meta): """ init func as lazy functon instance Args: function_meta (dict): function meta including name, args and kwargs """ self._func = get_mapping_function( function_meta["func_name"], self.functions_mapping ) ...
def __parse(self, function_meta): """ init func as lazy functon instance Args: function_meta (dict): function meta including name, args and kwargs """ self._func = get_mapping_function( function_meta["func_name"], self.functions_mapping ) ...
[ "init", "func", "as", "lazy", "functon", "instance" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/parser.py#L361-L390
[ "def", "__parse", "(", "self", ",", "function_meta", ")", ":", "self", ".", "_func", "=", "get_mapping_function", "(", "function_meta", "[", "\"func_name\"", "]", ",", "self", ".", "functions_mapping", ")", "self", ".", "func_name", "=", "self", ".", "_func"...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
LazyFunction.to_value
parse lazy data with evaluated variables mapping. Notice: variables_mapping should not contain any variable or function.
httprunner/parser.py
def to_value(self, variables_mapping=None): """ parse lazy data with evaluated variables mapping. Notice: variables_mapping should not contain any variable or function. """ variables_mapping = variables_mapping or {} args = parse_lazy_data(self._args, variables_mapping) ...
def to_value(self, variables_mapping=None): """ parse lazy data with evaluated variables mapping. Notice: variables_mapping should not contain any variable or function. """ variables_mapping = variables_mapping or {} args = parse_lazy_data(self._args, variables_mapping) ...
[ "parse", "lazy", "data", "with", "evaluated", "variables", "mapping", ".", "Notice", ":", "variables_mapping", "should", "not", "contain", "any", "variable", "or", "function", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/parser.py#L418-L426
[ "def", "to_value", "(", "self", ",", "variables_mapping", "=", "None", ")", ":", "variables_mapping", "=", "variables_mapping", "or", "{", "}", "args", "=", "parse_lazy_data", "(", "self", ".", "_args", ",", "variables_mapping", ")", "kwargs", "=", "parse_lazy...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
LazyString.__parse
parse raw string, replace function and variable with {} Args: raw_string(str): string with functions or varialbes e.g. "ABC${func2($a, $b)}DE$c" Returns: string: "ABC{}DE{}" args: ["${func2($a, $b)}", "$c"]
httprunner/parser.py
def __parse(self, raw_string): """ parse raw string, replace function and variable with {} Args: raw_string(str): string with functions or varialbes e.g. "ABC${func2($a, $b)}DE$c" Returns: string: "ABC{}DE{}" args: ["${func2($a, $b)}", "$c"] ...
def __parse(self, raw_string): """ parse raw string, replace function and variable with {} Args: raw_string(str): string with functions or varialbes e.g. "ABC${func2($a, $b)}DE$c" Returns: string: "ABC{}DE{}" args: ["${func2($a, $b)}", "$c"] ...
[ "parse", "raw", "string", "replace", "function", "and", "variable", "with", "{}" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/parser.py#L447-L525
[ "def", "__parse", "(", "self", ",", "raw_string", ")", ":", "self", ".", "_args", "=", "[", "]", "def", "escape_braces", "(", "origin_string", ")", ":", "return", "origin_string", ".", "replace", "(", "\"{\"", ",", "\"{{\"", ")", ".", "replace", "(", "...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
LazyString.to_value
parse lazy data with evaluated variables mapping. Notice: variables_mapping should not contain any variable or function.
httprunner/parser.py
def to_value(self, variables_mapping=None): """ parse lazy data with evaluated variables mapping. Notice: variables_mapping should not contain any variable or function. """ variables_mapping = variables_mapping or {} args = [] for arg in self._args: if is...
def to_value(self, variables_mapping=None): """ parse lazy data with evaluated variables mapping. Notice: variables_mapping should not contain any variable or function. """ variables_mapping = variables_mapping or {} args = [] for arg in self._args: if is...
[ "parse", "lazy", "data", "with", "evaluated", "variables", "mapping", ".", "Notice", ":", "variables_mapping", "should", "not", "contain", "any", "variable", "or", "function", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/parser.py#L530-L553
[ "def", "to_value", "(", "self", ",", "variables_mapping", "=", "None", ")", ":", "variables_mapping", "=", "variables_mapping", "or", "{", "}", "args", "=", "[", "]", "for", "arg", "in", "self", ".", "_args", ":", "if", "isinstance", "(", "arg", ",", "...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
HttpSession.get_req_resp_record
get request and response info from Response() object.
httprunner/client.py
def get_req_resp_record(self, resp_obj): """ get request and response info from Response() object. """ def log_print(req_resp_dict, r_type): msg = "\n================== {} details ==================\n".format(r_type) for key, value in req_resp_dict[r_type].items(): ...
def get_req_resp_record(self, resp_obj): """ get request and response info from Response() object. """ def log_print(req_resp_dict, r_type): msg = "\n================== {} details ==================\n".format(r_type) for key, value in req_resp_dict[r_type].items(): ...
[ "get", "request", "and", "response", "info", "from", "Response", "()", "object", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/client.py#L64-L126
[ "def", "get_req_resp_record", "(", "self", ",", "resp_obj", ")", ":", "def", "log_print", "(", "req_resp_dict", ",", "r_type", ")", ":", "msg", "=", "\"\\n================== {} details ==================\\n\"", ".", "format", "(", "r_type", ")", "for", "key", ",",...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
HttpSession.request
Constructs and sends a :py:class:`requests.Request`. Returns :py:class:`requests.Response` object. :param method: method for the new :class:`Request` object. :param url: URL for the new :class:`Request` object. :param name: (optional) Placeholder, mak...
httprunner/client.py
def request(self, method, url, name=None, **kwargs): """ Constructs and sends a :py:class:`requests.Request`. Returns :py:class:`requests.Response` object. :param method: method for the new :class:`Request` object. :param url: URL for the new :class:`Requ...
def request(self, method, url, name=None, **kwargs): """ Constructs and sends a :py:class:`requests.Request`. Returns :py:class:`requests.Response` object. :param method: method for the new :class:`Request` object. :param url: URL for the new :class:`Requ...
[ "Constructs", "and", "sends", "a", ":", "py", ":", "class", ":", "requests", ".", "Request", ".", "Returns", ":", "py", ":", "class", ":", "requests", ".", "Response", "object", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/client.py#L128-L216
[ "def", "request", "(", "self", ",", "method", ",", "url", ",", "name", "=", "None", ",", "*", "*", "kwargs", ")", ":", "self", ".", "init_meta_data", "(", ")", "# record test name", "self", ".", "meta_data", "[", "\"name\"", "]", "=", "name", "# record...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
HttpSession._send_request_safe_mode
Send a HTTP request, and catch any exception that might occur due to connection problems. Safe mode has been removed from requests 1.x.
httprunner/client.py
def _send_request_safe_mode(self, method, url, **kwargs): """ Send a HTTP request, and catch any exception that might occur due to connection problems. Safe mode has been removed from requests 1.x. """ try: msg = "processed request:\n" msg += "> {method} {...
def _send_request_safe_mode(self, method, url, **kwargs): """ Send a HTTP request, and catch any exception that might occur due to connection problems. Safe mode has been removed from requests 1.x. """ try: msg = "processed request:\n" msg += "> {method} {...
[ "Send", "a", "HTTP", "request", "and", "catch", "any", "exception", "that", "might", "occur", "due", "to", "connection", "problems", ".", "Safe", "mode", "has", "been", "removed", "from", "requests", "1", ".", "x", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/client.py#L218-L236
[ "def", "_send_request_safe_mode", "(", "self", ",", "method", ",", "url", ",", "*", "*", "kwargs", ")", ":", "try", ":", "msg", "=", "\"processed request:\\n\"", "msg", "+=", "\"> {method} {url}\\n\"", ".", "format", "(", "method", "=", "method", ",", "url",...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
get_uniform_comparator
convert comparator alias to uniform name
httprunner/validator.py
def get_uniform_comparator(comparator): """ convert comparator alias to uniform name """ if comparator in ["eq", "equals", "==", "is"]: return "equals" elif comparator in ["lt", "less_than"]: return "less_than" elif comparator in ["le", "less_than_or_equals"]: return "less_th...
def get_uniform_comparator(comparator): """ convert comparator alias to uniform name """ if comparator in ["eq", "equals", "==", "is"]: return "equals" elif comparator in ["lt", "less_than"]: return "less_than" elif comparator in ["le", "less_than_or_equals"]: return "less_th...
[ "convert", "comparator", "alias", "to", "uniform", "name" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/validator.py#L141-L171
[ "def", "get_uniform_comparator", "(", "comparator", ")", ":", "if", "comparator", "in", "[", "\"eq\"", ",", "\"equals\"", ",", "\"==\"", ",", "\"is\"", "]", ":", "return", "\"equals\"", "elif", "comparator", "in", "[", "\"lt\"", ",", "\"less_than\"", "]", ":...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
uniform_validator
unify validator Args: validator (dict): validator maybe in two formats: format1: this is kept for compatiblity with the previous versions. {"check": "status_code", "comparator": "eq", "expect": 201} {"check": "$resp_body_success", "comparator": "eq", "expect": T...
httprunner/validator.py
def uniform_validator(validator): """ unify validator Args: validator (dict): validator maybe in two formats: format1: this is kept for compatiblity with the previous versions. {"check": "status_code", "comparator": "eq", "expect": 201} {"check": "$resp_body...
def uniform_validator(validator): """ unify validator Args: validator (dict): validator maybe in two formats: format1: this is kept for compatiblity with the previous versions. {"check": "status_code", "comparator": "eq", "expect": 201} {"check": "$resp_body...
[ "unify", "validator" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/validator.py#L174-L226
[ "def", "uniform_validator", "(", "validator", ")", ":", "if", "not", "isinstance", "(", "validator", ",", "dict", ")", ":", "raise", "exceptions", ".", "ParamsError", "(", "\"invalid validator: {}\"", ".", "format", "(", "validator", ")", ")", "if", "\"check\"...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
_convert_validators_to_mapping
convert validators list to mapping. Args: validators (list): validators in list Returns: dict: validators mapping, use (check, comparator) as key. Examples: >>> validators = [ {"check": "v1", "expect": 201, "comparator": "eq"}, {"check": {"b": 1}, "...
httprunner/validator.py
def _convert_validators_to_mapping(validators): """ convert validators list to mapping. Args: validators (list): validators in list Returns: dict: validators mapping, use (check, comparator) as key. Examples: >>> validators = [ {"check": "v1", "expect": 201, "c...
def _convert_validators_to_mapping(validators): """ convert validators list to mapping. Args: validators (list): validators in list Returns: dict: validators mapping, use (check, comparator) as key. Examples: >>> validators = [ {"check": "v1", "expect": 201, "c...
[ "convert", "validators", "list", "to", "mapping", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/validator.py#L229-L261
[ "def", "_convert_validators_to_mapping", "(", "validators", ")", ":", "validators_mapping", "=", "{", "}", "for", "validator", "in", "validators", ":", "if", "not", "isinstance", "(", "validator", "[", "\"check\"", "]", ",", "collections", ".", "Hashable", ")", ...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
extend_validators
extend raw_validators with override_validators. override_validators will merge and override raw_validators. Args: raw_validators (dict): override_validators (dict): Returns: list: extended validators Examples: >>> raw_validators = [{'eq': ['v1', 200]}, {"check": "s...
httprunner/validator.py
def extend_validators(raw_validators, override_validators): """ extend raw_validators with override_validators. override_validators will merge and override raw_validators. Args: raw_validators (dict): override_validators (dict): Returns: list: extended validators Examp...
def extend_validators(raw_validators, override_validators): """ extend raw_validators with override_validators. override_validators will merge and override raw_validators. Args: raw_validators (dict): override_validators (dict): Returns: list: extended validators Examp...
[ "extend", "raw_validators", "with", "override_validators", ".", "override_validators", "will", "merge", "and", "override", "raw_validators", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/validator.py#L264-L298
[ "def", "extend_validators", "(", "raw_validators", ",", "override_validators", ")", ":", "if", "not", "raw_validators", ":", "return", "override_validators", "elif", "not", "override_validators", ":", "return", "raw_validators", "else", ":", "def_validators_mapping", "=...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
is_variable
Takes (name, object) tuple, returns True if it is a variable.
httprunner/validator.py
def is_variable(tup): """ Takes (name, object) tuple, returns True if it is a variable. """ name, item = tup if callable(item): # function or class return False if isinstance(item, types.ModuleType): # imported module return False if name.startswith("_"): ...
def is_variable(tup): """ Takes (name, object) tuple, returns True if it is a variable. """ name, item = tup if callable(item): # function or class return False if isinstance(item, types.ModuleType): # imported module return False if name.startswith("_"): ...
[ "Takes", "(", "name", "object", ")", "tuple", "returns", "True", "if", "it", "is", "a", "variable", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/validator.py#L312-L328
[ "def", "is_variable", "(", "tup", ")", ":", "name", ",", "item", "=", "tup", "if", "callable", "(", "item", ")", ":", "# function or class", "return", "False", "if", "isinstance", "(", "item", ",", "types", ".", "ModuleType", ")", ":", "# imported module",...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
validate_json_file
validate JSON testcase format
httprunner/validator.py
def validate_json_file(file_list): """ validate JSON testcase format """ for json_file in set(file_list): if not json_file.endswith(".json"): logger.log_warning("Only JSON file format can be validated, skip: {}".format(json_file)) continue logger.color_print("Start t...
def validate_json_file(file_list): """ validate JSON testcase format """ for json_file in set(file_list): if not json_file.endswith(".json"): logger.log_warning("Only JSON file format can be validated, skip: {}".format(json_file)) continue logger.color_print("Start t...
[ "validate", "JSON", "testcase", "format" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/validator.py#L331-L347
[ "def", "validate_json_file", "(", "file_list", ")", ":", "for", "json_file", "in", "set", "(", "file_list", ")", ":", "if", "not", "json_file", ".", "endswith", "(", "\".json\"", ")", ":", "logger", ".", "log_warning", "(", "\"Only JSON file format can be valida...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
gen_random_string
generate random string with specified length
httprunner/built_in.py
def gen_random_string(str_len): """ generate random string with specified length """ return ''.join( random.choice(string.ascii_letters + string.digits) for _ in range(str_len))
def gen_random_string(str_len): """ generate random string with specified length """ return ''.join( random.choice(string.ascii_letters + string.digits) for _ in range(str_len))
[ "generate", "random", "string", "with", "specified", "length" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/built_in.py#L27-L31
[ "def", "gen_random_string", "(", "str_len", ")", ":", "return", "''", ".", "join", "(", "random", ".", "choice", "(", "string", ".", "ascii_letters", "+", "string", ".", "digits", ")", "for", "_", "in", "range", "(", "str_len", ")", ")" ]
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
get_timestamp
get timestamp string, length can only between 0 and 16
httprunner/built_in.py
def get_timestamp(str_len=13): """ get timestamp string, length can only between 0 and 16 """ if isinstance(str_len, integer_types) and 0 < str_len < 17: return builtin_str(time.time()).replace(".", "")[:str_len] raise ParamsError("timestamp length can only between 0 and 16.")
def get_timestamp(str_len=13): """ get timestamp string, length can only between 0 and 16 """ if isinstance(str_len, integer_types) and 0 < str_len < 17: return builtin_str(time.time()).replace(".", "")[:str_len] raise ParamsError("timestamp length can only between 0 and 16.")
[ "get", "timestamp", "string", "length", "can", "only", "between", "0", "and", "16" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/built_in.py#L33-L39
[ "def", "get_timestamp", "(", "str_len", "=", "13", ")", ":", "if", "isinstance", "(", "str_len", ",", "integer_types", ")", "and", "0", "<", "str_len", "<", "17", ":", "return", "builtin_str", "(", "time", ".", "time", "(", ")", ")", ".", "replace", ...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
multipart_encoder
initialize MultipartEncoder with uploading fields.
httprunner/built_in.py
def multipart_encoder(**kwargs): """ initialize MultipartEncoder with uploading fields. """ def get_filetype(file_path): file_type = filetype.guess(file_path) if file_type: return file_type.mime else: return "text/html" fields_dict = {} for key, value...
def multipart_encoder(**kwargs): """ initialize MultipartEncoder with uploading fields. """ def get_filetype(file_path): file_type = filetype.guess(file_path) if file_type: return file_type.mime else: return "text/html" fields_dict = {} for key, value...
[ "initialize", "MultipartEncoder", "with", "uploading", "fields", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/built_in.py#L66-L95
[ "def", "multipart_encoder", "(", "*", "*", "kwargs", ")", ":", "def", "get_filetype", "(", "file_path", ")", ":", "file_type", "=", "filetype", ".", "guess", "(", "file_path", ")", "if", "file_type", ":", "return", "file_type", ".", "mime", "else", ":", ...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
parse_locustfile
parse testcase file and return locustfile path. if file_path is a Python file, assume it is a locustfile if file_path is a YAML/JSON file, convert it to locustfile
httprunner/locusts.py
def parse_locustfile(file_path): """ parse testcase file and return locustfile path. if file_path is a Python file, assume it is a locustfile if file_path is a YAML/JSON file, convert it to locustfile """ if not os.path.isfile(file_path): color_print("file path invalid, exit.", "RED"...
def parse_locustfile(file_path): """ parse testcase file and return locustfile path. if file_path is a Python file, assume it is a locustfile if file_path is a YAML/JSON file, convert it to locustfile """ if not os.path.isfile(file_path): color_print("file path invalid, exit.", "RED"...
[ "parse", "testcase", "file", "and", "return", "locustfile", "path", ".", "if", "file_path", "is", "a", "Python", "file", "assume", "it", "is", "a", "locustfile", "if", "file_path", "is", "a", "YAML", "/", "JSON", "file", "convert", "it", "to", "locustfile"...
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/locusts.py#L12-L31
[ "def", "parse_locustfile", "(", "file_path", ")", ":", "if", "not", "os", ".", "path", ".", "isfile", "(", "file_path", ")", ":", "color_print", "(", "\"file path invalid, exit.\"", ",", "\"RED\"", ")", "sys", ".", "exit", "(", "1", ")", "file_suffix", "="...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
gen_locustfile
generate locustfile from template.
httprunner/locusts.py
def gen_locustfile(testcase_file_path): """ generate locustfile from template. """ locustfile_path = 'locustfile.py' template_path = os.path.join( os.path.dirname(os.path.realpath(__file__)), "templates", "locustfile_template" ) with io.open(template_path, encoding='utf-...
def gen_locustfile(testcase_file_path): """ generate locustfile from template. """ locustfile_path = 'locustfile.py' template_path = os.path.join( os.path.dirname(os.path.realpath(__file__)), "templates", "locustfile_template" ) with io.open(template_path, encoding='utf-...
[ "generate", "locustfile", "from", "template", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/locusts.py#L34-L50
[ "def", "gen_locustfile", "(", "testcase_file_path", ")", ":", "locustfile_path", "=", "'locustfile.py'", "template_path", "=", "os", ".", "path", ".", "join", "(", "os", ".", "path", ".", "dirname", "(", "os", ".", "path", ".", "realpath", "(", "__file__", ...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
SessionContext.update_session_variables
update session with extracted variables mapping. these variables are valid in the whole running session.
httprunner/context.py
def update_session_variables(self, variables_mapping): """ update session with extracted variables mapping. these variables are valid in the whole running session. """ variables_mapping = utils.ensure_mapping_format(variables_mapping) self.session_variables_mapping.update(var...
def update_session_variables(self, variables_mapping): """ update session with extracted variables mapping. these variables are valid in the whole running session. """ variables_mapping = utils.ensure_mapping_format(variables_mapping) self.session_variables_mapping.update(var...
[ "update", "session", "with", "extracted", "variables", "mapping", ".", "these", "variables", "are", "valid", "in", "the", "whole", "running", "session", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/context.py#L51-L57
[ "def", "update_session_variables", "(", "self", ",", "variables_mapping", ")", ":", "variables_mapping", "=", "utils", ".", "ensure_mapping_format", "(", "variables_mapping", ")", "self", ".", "session_variables_mapping", ".", "update", "(", "variables_mapping", ")", ...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
SessionContext.__eval_validator_check
evaluate check item in validator. Args: check_item: check_item should only be the following 5 formats: 1, variable reference, e.g. $token 2, function reference, e.g. ${is_status_code_200($status_code)} 3, dict or list, maybe containing variable/functi...
httprunner/context.py
def __eval_validator_check(self, check_item, resp_obj): """ evaluate check item in validator. Args: check_item: check_item should only be the following 5 formats: 1, variable reference, e.g. $token 2, function reference, e.g. ${is_status_code_200($status_code...
def __eval_validator_check(self, check_item, resp_obj): """ evaluate check item in validator. Args: check_item: check_item should only be the following 5 formats: 1, variable reference, e.g. $token 2, function reference, e.g. ${is_status_code_200($status_code...
[ "evaluate", "check", "item", "in", "validator", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/context.py#L65-L87
[ "def", "__eval_validator_check", "(", "self", ",", "check_item", ",", "resp_obj", ")", ":", "if", "isinstance", "(", "check_item", ",", "(", "dict", ",", "list", ")", ")", "or", "isinstance", "(", "check_item", ",", "parser", ".", "LazyString", ")", ":", ...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
SessionContext.validate
make validation with comparators
httprunner/context.py
def validate(self, validators, resp_obj): """ make validation with comparators """ self.validation_results = [] if not validators: return logger.log_debug("start to validate.") validate_pass = True failures = [] for validator in validators: ...
def validate(self, validators, resp_obj): """ make validation with comparators """ self.validation_results = [] if not validators: return logger.log_debug("start to validate.") validate_pass = True failures = [] for validator in validators: ...
[ "make", "validation", "with", "comparators" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/context.py#L101-L170
[ "def", "validate", "(", "self", ",", "validators", ",", "resp_obj", ")", ":", "self", ".", "validation_results", "=", "[", "]", "if", "not", "validators", ":", "return", "logger", ".", "log_debug", "(", "\"start to validate.\"", ")", "validate_pass", "=", "T...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
get_summary
get summary from test result Args: result (instance): HtmlTestResult() instance Returns: dict: summary extracted from result. { "success": True, "stat": {}, "time": {}, "records": [] }
httprunner/report.py
def get_summary(result): """ get summary from test result Args: result (instance): HtmlTestResult() instance Returns: dict: summary extracted from result. { "success": True, "stat": {}, "time": {}, "records": [] ...
def get_summary(result): """ get summary from test result Args: result (instance): HtmlTestResult() instance Returns: dict: summary extracted from result. { "success": True, "stat": {}, "time": {}, "records": [] ...
[ "get", "summary", "from", "test", "result" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/report.py#L30-L71
[ "def", "get_summary", "(", "result", ")", ":", "summary", "=", "{", "\"success\"", ":", "result", ".", "wasSuccessful", "(", ")", ",", "\"stat\"", ":", "{", "'total'", ":", "result", ".", "testsRun", ",", "'failures'", ":", "len", "(", "result", ".", "...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
aggregate_stat
aggregate new_stat to origin_stat. Args: origin_stat (dict): origin stat dict, will be updated with new_stat dict. new_stat (dict): new stat dict.
httprunner/report.py
def aggregate_stat(origin_stat, new_stat): """ aggregate new_stat to origin_stat. Args: origin_stat (dict): origin stat dict, will be updated with new_stat dict. new_stat (dict): new stat dict. """ for key in new_stat: if key not in origin_stat: origin_stat[key] = n...
def aggregate_stat(origin_stat, new_stat): """ aggregate new_stat to origin_stat. Args: origin_stat (dict): origin stat dict, will be updated with new_stat dict. new_stat (dict): new stat dict. """ for key in new_stat: if key not in origin_stat: origin_stat[key] = n...
[ "aggregate", "new_stat", "to", "origin_stat", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/report.py#L74-L89
[ "def", "aggregate_stat", "(", "origin_stat", ",", "new_stat", ")", ":", "for", "key", "in", "new_stat", ":", "if", "key", "not", "in", "origin_stat", ":", "origin_stat", "[", "key", "]", "=", "new_stat", "[", "key", "]", "elif", "key", "==", "\"start_at\...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
stringify_summary
stringify summary, in order to dump json file and generate html report.
httprunner/report.py
def stringify_summary(summary): """ stringify summary, in order to dump json file and generate html report. """ for index, suite_summary in enumerate(summary["details"]): if not suite_summary.get("name"): suite_summary["name"] = "testcase {}".format(index) for record in suite_s...
def stringify_summary(summary): """ stringify summary, in order to dump json file and generate html report. """ for index, suite_summary in enumerate(summary["details"]): if not suite_summary.get("name"): suite_summary["name"] = "testcase {}".format(index) for record in suite_s...
[ "stringify", "summary", "in", "order", "to", "dump", "json", "file", "and", "generate", "html", "report", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/report.py#L92-L106
[ "def", "stringify_summary", "(", "summary", ")", ":", "for", "index", ",", "suite_summary", "in", "enumerate", "(", "summary", "[", "\"details\"", "]", ")", ":", "if", "not", "suite_summary", ".", "get", "(", "\"name\"", ")", ":", "suite_summary", "[", "\"...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
__stringify_request
stringfy HTTP request data Args: request_data (dict): HTTP request data in dict. { "url": "http://127.0.0.1:5000/api/get-token", "method": "POST", "headers": { "User-Agent": "python-requests/2.20.0", "Accep...
httprunner/report.py
def __stringify_request(request_data): """ stringfy HTTP request data Args: request_data (dict): HTTP request data in dict. { "url": "http://127.0.0.1:5000/api/get-token", "method": "POST", "headers": { "User-Agent": "pyth...
def __stringify_request(request_data): """ stringfy HTTP request data Args: request_data (dict): HTTP request data in dict. { "url": "http://127.0.0.1:5000/api/get-token", "method": "POST", "headers": { "User-Agent": "pyth...
[ "stringfy", "HTTP", "request", "data" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/report.py#L109-L156
[ "def", "__stringify_request", "(", "request_data", ")", ":", "for", "key", ",", "value", "in", "request_data", ".", "items", "(", ")", ":", "if", "isinstance", "(", "value", ",", "list", ")", ":", "value", "=", "json", ".", "dumps", "(", "value", ",", ...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
__stringify_response
stringfy HTTP response data Args: response_data (dict): { "status_code": 404, "headers": { "Content-Type": "application/json", "Content-Length": "30", "Server": "Werkzeug/0.14.1 Python/3.7.0", ...
httprunner/report.py
def __stringify_response(response_data): """ stringfy HTTP response data Args: response_data (dict): { "status_code": 404, "headers": { "Content-Type": "application/json", "Content-Length": "30", "S...
def __stringify_response(response_data): """ stringfy HTTP response data Args: response_data (dict): { "status_code": 404, "headers": { "Content-Type": "application/json", "Content-Length": "30", "S...
[ "stringfy", "HTTP", "response", "data" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/report.py#L159-L215
[ "def", "__stringify_response", "(", "response_data", ")", ":", "for", "key", ",", "value", "in", "response_data", ".", "items", "(", ")", ":", "if", "isinstance", "(", "value", ",", "list", ")", ":", "value", "=", "json", ".", "dumps", "(", "value", ",...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
__expand_meta_datas
expand meta_datas to one level Args: meta_datas (dict/list): maybe in nested format Returns: list: expanded list in one level Examples: >>> meta_datas = [ [ dict1, dict2 ], dict3 ] ...
httprunner/report.py
def __expand_meta_datas(meta_datas, meta_datas_expanded): """ expand meta_datas to one level Args: meta_datas (dict/list): maybe in nested format Returns: list: expanded list in one level Examples: >>> meta_datas = [ [ dict1, ...
def __expand_meta_datas(meta_datas, meta_datas_expanded): """ expand meta_datas to one level Args: meta_datas (dict/list): maybe in nested format Returns: list: expanded list in one level Examples: >>> meta_datas = [ [ dict1, ...
[ "expand", "meta_datas", "to", "one", "level" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/report.py#L218-L245
[ "def", "__expand_meta_datas", "(", "meta_datas", ",", "meta_datas_expanded", ")", ":", "if", "isinstance", "(", "meta_datas", ",", "dict", ")", ":", "meta_datas_expanded", ".", "append", "(", "meta_datas", ")", "elif", "isinstance", "(", "meta_datas", ",", "list...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
__get_total_response_time
caculate total response time of all meta_datas
httprunner/report.py
def __get_total_response_time(meta_datas_expanded): """ caculate total response time of all meta_datas """ try: response_time = 0 for meta_data in meta_datas_expanded: response_time += meta_data["stat"]["response_time_ms"] return "{:.2f}".format(response_time) excep...
def __get_total_response_time(meta_datas_expanded): """ caculate total response time of all meta_datas """ try: response_time = 0 for meta_data in meta_datas_expanded: response_time += meta_data["stat"]["response_time_ms"] return "{:.2f}".format(response_time) excep...
[ "caculate", "total", "response", "time", "of", "all", "meta_datas" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/report.py#L248-L260
[ "def", "__get_total_response_time", "(", "meta_datas_expanded", ")", ":", "try", ":", "response_time", "=", "0", "for", "meta_data", "in", "meta_datas_expanded", ":", "response_time", "+=", "meta_data", "[", "\"stat\"", "]", "[", "\"response_time_ms\"", "]", "return...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
render_html_report
render html report with specified report name and template Args: report_template (str): specify html report template path report_dir (str): specify html report save directory
httprunner/report.py
def render_html_report(summary, report_template=None, report_dir=None): """ render html report with specified report name and template Args: report_template (str): specify html report template path report_dir (str): specify html report save directory """ if not report_template: ...
def render_html_report(summary, report_template=None, report_dir=None): """ render html report with specified report name and template Args: report_template (str): specify html report template path report_dir (str): specify html report save directory """ if not report_template: ...
[ "render", "html", "report", "with", "specified", "report", "name", "and", "template" ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/report.py#L275-L315
[ "def", "render_html_report", "(", "summary", ",", "report_template", "=", "None", ",", "report_dir", "=", "None", ")", ":", "if", "not", "report_template", ":", "report_template", "=", "os", ".", "path", ".", "join", "(", "os", ".", "path", ".", "abspath",...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
ResponseObject._extract_field_with_regex
extract field from response content with regex. requests.Response body could be json or html text. Args: field (str): regex string that matched r".*\(.*\).*" Returns: str: matched content. Raises: exceptions.ExtractFailure: If no content matched...
httprunner/response.py
def _extract_field_with_regex(self, field): """ extract field from response content with regex. requests.Response body could be json or html text. Args: field (str): regex string that matched r".*\(.*\).*" Returns: str: matched content. Raises: ...
def _extract_field_with_regex(self, field): """ extract field from response content with regex. requests.Response body could be json or html text. Args: field (str): regex string that matched r".*\(.*\).*" Returns: str: matched content. Raises: ...
[ "extract", "field", "from", "response", "content", "with", "regex", ".", "requests", ".", "Response", "body", "could", "be", "json", "or", "html", "text", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/response.py#L41-L68
[ "def", "_extract_field_with_regex", "(", "self", ",", "field", ")", ":", "matched", "=", "re", ".", "search", "(", "field", ",", "self", ".", "text", ")", "if", "not", "matched", ":", "err_msg", "=", "u\"Failed to extract data with regex! => {}\\n\"", ".", "fo...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
ResponseObject._extract_field_with_delimiter
response content could be json or html text. Args: field (str): string joined by delimiter. e.g. "status_code" "headers" "cookies" "content" "headers.content-type" "content.person.name.first_...
httprunner/response.py
def _extract_field_with_delimiter(self, field): """ response content could be json or html text. Args: field (str): string joined by delimiter. e.g. "status_code" "headers" "cookies" "content" "heade...
def _extract_field_with_delimiter(self, field): """ response content could be json or html text. Args: field (str): string joined by delimiter. e.g. "status_code" "headers" "cookies" "content" "heade...
[ "response", "content", "could", "be", "json", "or", "html", "text", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/response.py#L70-L202
[ "def", "_extract_field_with_delimiter", "(", "self", ",", "field", ")", ":", "# string.split(sep=None, maxsplit=-1) -> list of strings", "# e.g. \"content.person.name\" => [\"content\", \"person.name\"]", "try", ":", "top_query", ",", "sub_query", "=", "field", ".", "split", "(...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
ResponseObject.extract_field
extract value from requests.Response.
httprunner/response.py
def extract_field(self, field): """ extract value from requests.Response. """ if not isinstance(field, basestring): err_msg = u"Invalid extractor! => {}\n".format(field) logger.log_error(err_msg) raise exceptions.ParamsError(err_msg) msg = "extract: {...
def extract_field(self, field): """ extract value from requests.Response. """ if not isinstance(field, basestring): err_msg = u"Invalid extractor! => {}\n".format(field) logger.log_error(err_msg) raise exceptions.ParamsError(err_msg) msg = "extract: {...
[ "extract", "value", "from", "requests", ".", "Response", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/response.py#L204-L225
[ "def", "extract_field", "(", "self", ",", "field", ")", ":", "if", "not", "isinstance", "(", "field", ",", "basestring", ")", ":", "err_msg", "=", "u\"Invalid extractor! => {}\\n\"", ".", "format", "(", "field", ")", "logger", ".", "log_error", "(", "err_msg...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
ResponseObject.extract_response
extract value from requests.Response and store in OrderedDict. Args: extractors (list): [ {"resp_status_code": "status_code"}, {"resp_headers_content_type": "headers.content-type"}, {"resp_content": "content"}, ...
httprunner/response.py
def extract_response(self, extractors): """ extract value from requests.Response and store in OrderedDict. Args: extractors (list): [ {"resp_status_code": "status_code"}, {"resp_headers_content_type": "headers.content-type"}, ...
def extract_response(self, extractors): """ extract value from requests.Response and store in OrderedDict. Args: extractors (list): [ {"resp_status_code": "status_code"}, {"resp_headers_content_type": "headers.content-type"}, ...
[ "extract", "value", "from", "requests", ".", "Response", "and", "store", "in", "OrderedDict", "." ]
HttpRunner/HttpRunner
python
https://github.com/HttpRunner/HttpRunner/blob/f259551bf9c8ba905eae5c1afcf2efea20ae0871/httprunner/response.py#L227-L254
[ "def", "extract_response", "(", "self", ",", "extractors", ")", ":", "if", "not", "extractors", ":", "return", "{", "}", "logger", ".", "log_debug", "(", "\"start to extract from response object.\"", ")", "extracted_variables_mapping", "=", "OrderedDict", "(", ")", ...
f259551bf9c8ba905eae5c1afcf2efea20ae0871
train
RequestCallbackAnswer.request_callback_answer
Use this method to request a callback answer from bots. This is the equivalent of clicking an inline button containing callback data. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your personal cloud (Sav...
pyrogram/client/methods/bots/request_callback_answer.py
def request_callback_answer( self, chat_id: Union[int, str], message_id: int, callback_data: bytes ): """Use this method to request a callback answer from bots. This is the equivalent of clicking an inline button containing callback data. Args: ch...
def request_callback_answer( self, chat_id: Union[int, str], message_id: int, callback_data: bytes ): """Use this method to request a callback answer from bots. This is the equivalent of clicking an inline button containing callback data. Args: ch...
[ "Use", "this", "method", "to", "request", "a", "callback", "answer", "from", "bots", ".", "This", "is", "the", "equivalent", "of", "clicking", "an", "inline", "button", "containing", "callback", "data", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/bots/request_callback_answer.py#L26-L63
[ "def", "request_callback_answer", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "message_id", ":", "int", ",", "callback_data", ":", "bytes", ")", ":", "return", "self", ".", "send", "(", "functions", ".", "messages", ".", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
PromoteChatMember.promote_chat_member
Use this method to promote or demote a user in a supergroup or a channel. You must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user. Args: chat_id (``int`` | ``str``): ...
pyrogram/client/methods/chats/promote_chat_member.py
def promote_chat_member( self, chat_id: Union[int, str], user_id: Union[int, str], can_change_info: bool = True, can_post_messages: bool = False, can_edit_messages: bool = False, can_delete_messages: bool = True, can_restrict_members: bool = True, ...
def promote_chat_member( self, chat_id: Union[int, str], user_id: Union[int, str], can_change_info: bool = True, can_post_messages: bool = False, can_edit_messages: bool = False, can_delete_messages: bool = True, can_restrict_members: bool = True, ...
[ "Use", "this", "method", "to", "promote", "or", "demote", "a", "user", "in", "a", "supergroup", "or", "a", "channel", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/chats/promote_chat_member.py#L26-L101
[ "def", "promote_chat_member", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "user_id", ":", "Union", "[", "int", ",", "str", "]", ",", "can_change_info", ":", "bool", "=", "True", ",", "can_post_messages", ":", "bool", "=...
e7258a341ba905cfa86264c22040654db732ec1c
train
SetUserProfilePhoto.set_user_profile_photo
Use this method to set a new profile photo. This method only works for Users. Bots profile photos must be set using BotFather. Args: photo (``str``): Profile photo to set. Pass a file path as string to upload a new photo that exists on your local mac...
pyrogram/client/methods/users/set_user_profile_photo.py
def set_user_profile_photo( self, photo: str ) -> bool: """Use this method to set a new profile photo. This method only works for Users. Bots profile photos must be set using BotFather. Args: photo (``str``): Profile photo to set. ...
def set_user_profile_photo( self, photo: str ) -> bool: """Use this method to set a new profile photo. This method only works for Users. Bots profile photos must be set using BotFather. Args: photo (``str``): Profile photo to set. ...
[ "Use", "this", "method", "to", "set", "a", "new", "profile", "photo", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/users/set_user_profile_photo.py#L24-L51
[ "def", "set_user_profile_photo", "(", "self", ",", "photo", ":", "str", ")", "->", "bool", ":", "return", "bool", "(", "self", ".", "send", "(", "functions", ".", "photos", ".", "UploadProfilePhoto", "(", "file", "=", "self", ".", "save_file", "(", "phot...
e7258a341ba905cfa86264c22040654db732ec1c
train
Auth.create
https://core.telegram.org/mtproto/auth_key https://core.telegram.org/mtproto/samples-auth_key
pyrogram/session/auth.py
def create(self): """ https://core.telegram.org/mtproto/auth_key https://core.telegram.org/mtproto/samples-auth_key """ retries_left = self.MAX_RETRIES # The server may close the connection at any time, causing the auth key creation to fail. # If that happens, ju...
def create(self): """ https://core.telegram.org/mtproto/auth_key https://core.telegram.org/mtproto/samples-auth_key """ retries_left = self.MAX_RETRIES # The server may close the connection at any time, causing the auth key creation to fail. # If that happens, ju...
[ "https", ":", "//", "core", ".", "telegram", ".", "org", "/", "mtproto", "/", "auth_key", "https", ":", "//", "core", ".", "telegram", ".", "org", "/", "mtproto", "/", "samples", "-", "auth_key" ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/session/auth.py#L66-L262
[ "def", "create", "(", "self", ")", ":", "retries_left", "=", "self", ".", "MAX_RETRIES", "# The server may close the connection at any time, causing the auth key creation to fail.", "# If that happens, just try again up to MAX_RETRIES times.", "while", "True", ":", "self", ".", "...
e7258a341ba905cfa86264c22040654db732ec1c
train
IterHistory.iter_history
Use this method to iterate through a chat history sequentially. This convenience method does the same as repeatedly calling :meth:`get_history` in a loop, thus saving you from the hassle of setting up boilerplate code. It is useful for getting the whole chat history with a single call. Args: ...
pyrogram/client/methods/messages/iter_history.py
def iter_history( self, chat_id: Union[int, str], limit: int = 0, offset: int = 0, offset_id: int = 0, offset_date: int = 0, reverse: bool = False ) -> Generator["pyrogram.Message", None, None]: """Use this method to iterate through a chat history sequ...
def iter_history( self, chat_id: Union[int, str], limit: int = 0, offset: int = 0, offset_id: int = 0, offset_date: int = 0, reverse: bool = False ) -> Generator["pyrogram.Message", None, None]: """Use this method to iterate through a chat history sequ...
[ "Use", "this", "method", "to", "iterate", "through", "a", "chat", "history", "sequentially", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/messages/iter_history.py#L26-L95
[ "def", "iter_history", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "limit", ":", "int", "=", "0", ",", "offset", ":", "int", "=", "0", ",", "offset_id", ":", "int", "=", "0", ",", "offset_date", ":", "int", "=", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
SendContact.send_contact
Use this method to send phone contacts. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use "me" or "self". For a contact that exists in your Tele...
pyrogram/client/methods/messages/send_contact.py
def send_contact( self, chat_id: Union[int, str], phone_number: str, first_name: str, last_name: str = None, vcard: str = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKey...
def send_contact( self, chat_id: Union[int, str], phone_number: str, first_name: str, last_name: str = None, vcard: str = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKey...
[ "Use", "this", "method", "to", "send", "phone", "contacts", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/messages/send_contact.py#L27-L103
[ "def", "send_contact", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "phone_number", ":", "str", ",", "first_name", ":", "str", ",", "last_name", ":", "str", "=", "None", ",", "vcard", ":", "str", "=", "None", ",", "d...
e7258a341ba905cfa86264c22040654db732ec1c
train
EditMessageText.edit_message_text
Use this method to edit text messages. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use "me" or "self". For a contact that exists in your Teleg...
pyrogram/client/methods/messages/edit_message_text.py
def edit_message_text( self, chat_id: Union[int, str], message_id: int, text: str, parse_mode: str = "", disable_web_page_preview: bool = None, reply_markup: "pyrogram.InlineKeyboardMarkup" = None ) -> "pyrogram.Message": """Use this method to edit tex...
def edit_message_text( self, chat_id: Union[int, str], message_id: int, text: str, parse_mode: str = "", disable_web_page_preview: bool = None, reply_markup: "pyrogram.InlineKeyboardMarkup" = None ) -> "pyrogram.Message": """Use this method to edit tex...
[ "Use", "this", "method", "to", "edit", "text", "messages", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/messages/edit_message_text.py#L27-L85
[ "def", "edit_message_text", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "message_id", ":", "int", ",", "text", ":", "str", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "disable_web_page_preview", ":", "bool", "=", "...
e7258a341ba905cfa86264c22040654db732ec1c
train
GetHistory.get_history
Use this method to retrieve a chunk of the history of a chat. You can get up to 100 messages at once. For a more convenient way of getting a chat history see :meth:`iter_history`. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the ta...
pyrogram/client/methods/messages/get_history.py
def get_history( self, chat_id: Union[int, str], limit: int = 100, offset: int = 0, offset_id: int = 0, offset_date: int = 0, reverse: bool = False ): """Use this method to retrieve a chunk of the history of a chat. You can get up to 100 messa...
def get_history( self, chat_id: Union[int, str], limit: int = 100, offset: int = 0, offset_id: int = 0, offset_date: int = 0, reverse: bool = False ): """Use this method to retrieve a chunk of the history of a chat. You can get up to 100 messa...
[ "Use", "this", "method", "to", "retrieve", "a", "chunk", "of", "the", "history", "of", "a", "chat", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/messages/get_history.py#L32-L102
[ "def", "get_history", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "limit", ":", "int", "=", "100", ",", "offset", ":", "int", "=", "0", ",", "offset_id", ":", "int", "=", "0", ",", "offset_date", ":", "int", "=", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
OnUserStatus.on_user_status
Use this decorator to automatically register a function for handling user status updates. This does the same thing as :meth:`add_handler` using the :class:`UserStatusHandler`. Args: filters (:obj:`Filters <pyrogram.Filters>`): Pass one or more filters to allow only a subset ...
pyrogram/client/methods/decorators/on_user_status.py
def on_user_status( self=None, filters=None, group: int = 0 ) -> callable: """Use this decorator to automatically register a function for handling user status updates. This does the same thing as :meth:`add_handler` using the :class:`UserStatusHandler`. Args: ...
def on_user_status( self=None, filters=None, group: int = 0 ) -> callable: """Use this decorator to automatically register a function for handling user status updates. This does the same thing as :meth:`add_handler` using the :class:`UserStatusHandler`. Args: ...
[ "Use", "this", "decorator", "to", "automatically", "register", "a", "function", "for", "handling", "user", "status", "updates", ".", "This", "does", "the", "same", "thing", "as", ":", "meth", ":", "add_handler", "using", "the", ":", "class", ":", "UserStatus...
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/decorators/on_user_status.py#L28-L58
[ "def", "on_user_status", "(", "self", "=", "None", ",", "filters", "=", "None", ",", "group", ":", "int", "=", "0", ")", "->", "callable", ":", "def", "decorator", "(", "func", ":", "callable", ")", "->", "Tuple", "[", "Handler", ",", "int", "]", "...
e7258a341ba905cfa86264c22040654db732ec1c
train
GetChatMembersCount.get_chat_members_count
Use this method to get the number of members in a chat. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. Returns: On success, an integer is returned. Raises: :class:`RPCError <pyrogram.RPCError...
pyrogram/client/methods/chats/get_chat_members_count.py
def get_chat_members_count( self, chat_id: Union[int, str] ) -> int: """Use this method to get the number of members in a chat. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. Returns: ...
def get_chat_members_count( self, chat_id: Union[int, str] ) -> int: """Use this method to get the number of members in a chat. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. Returns: ...
[ "Use", "this", "method", "to", "get", "the", "number", "of", "members", "in", "a", "chat", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/chats/get_chat_members_count.py#L26-L58
[ "def", "get_chat_members_count", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ")", "->", "int", ":", "peer", "=", "self", ".", "resolve_peer", "(", "chat_id", ")", "if", "isinstance", "(", "peer", ",", "types", ".", "InputPee...
e7258a341ba905cfa86264c22040654db732ec1c
train
OnDisconnect.on_disconnect
Use this decorator to automatically register a function for handling disconnections. This does the same thing as :meth:`add_handler` using the :class:`DisconnectHandler`.
pyrogram/client/methods/decorators/on_disconnect.py
def on_disconnect(self=None) -> callable: """Use this decorator to automatically register a function for handling disconnections. This does the same thing as :meth:`add_handler` using the :class:`DisconnectHandler`. """ def decorator(func: callable) -> Handler: handler = pyr...
def on_disconnect(self=None) -> callable: """Use this decorator to automatically register a function for handling disconnections. This does the same thing as :meth:`add_handler` using the :class:`DisconnectHandler`. """ def decorator(func: callable) -> Handler: handler = pyr...
[ "Use", "this", "decorator", "to", "automatically", "register", "a", "function", "for", "handling", "disconnections", ".", "This", "does", "the", "same", "thing", "as", ":", "meth", ":", "add_handler", "using", "the", ":", "class", ":", "DisconnectHandler", "."...
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/decorators/on_disconnect.py#L25-L38
[ "def", "on_disconnect", "(", "self", "=", "None", ")", "->", "callable", ":", "def", "decorator", "(", "func", ":", "callable", ")", "->", "Handler", ":", "handler", "=", "pyrogram", ".", "DisconnectHandler", "(", "func", ")", "if", "self", "is", "not", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
Client.start
Use this method to start the Client after creating it. Requires no parameters. Raises: :class:`RPCError <pyrogram.RPCError>` in case of a Telegram RPC error. ``ConnectionError`` in case you try to start an already started Client.
pyrogram/client/client.py
def start(self): """Use this method to start the Client after creating it. Requires no parameters. Raises: :class:`RPCError <pyrogram.RPCError>` in case of a Telegram RPC error. ``ConnectionError`` in case you try to start an already started Client. """ i...
def start(self): """Use this method to start the Client after creating it. Requires no parameters. Raises: :class:`RPCError <pyrogram.RPCError>` in case of a Telegram RPC error. ``ConnectionError`` in case you try to start an already started Client. """ i...
[ "Use", "this", "method", "to", "start", "the", "Client", "after", "creating", "it", ".", "Requires", "no", "parameters", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/client.py#L263-L355
[ "def", "start", "(", "self", ")", ":", "if", "self", ".", "is_started", ":", "raise", "ConnectionError", "(", "\"Client has already been started\"", ")", "if", "self", ".", "BOT_TOKEN_RE", ".", "match", "(", "self", ".", "session_name", ")", ":", "self", "."...
e7258a341ba905cfa86264c22040654db732ec1c
train
Client.stop
Use this method to manually stop the Client. Requires no parameters. Raises: ``ConnectionError`` in case you try to stop an already stopped Client.
pyrogram/client/client.py
def stop(self): """Use this method to manually stop the Client. Requires no parameters. Raises: ``ConnectionError`` in case you try to stop an already stopped Client. """ if not self.is_started: raise ConnectionError("Client is already stopped") ...
def stop(self): """Use this method to manually stop the Client. Requires no parameters. Raises: ``ConnectionError`` in case you try to stop an already stopped Client. """ if not self.is_started: raise ConnectionError("Client is already stopped") ...
[ "Use", "this", "method", "to", "manually", "stop", "the", "Client", ".", "Requires", "no", "parameters", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/client.py#L357-L398
[ "def", "stop", "(", "self", ")", ":", "if", "not", "self", ".", "is_started", ":", "raise", "ConnectionError", "(", "\"Client is already stopped\"", ")", "if", "self", ".", "takeout_id", ":", "self", ".", "send", "(", "functions", ".", "account", ".", "Fin...
e7258a341ba905cfa86264c22040654db732ec1c
train
Client.idle
Blocks the program execution until one of the signals are received, then gently stop the Client by closing the underlying connection. Args: stop_signals (``tuple``, *optional*): Iterable containing signals the signal handler will listen to. Defaults to (SIGIN...
pyrogram/client/client.py
def idle(self, stop_signals: tuple = (SIGINT, SIGTERM, SIGABRT)): """Blocks the program execution until one of the signals are received, then gently stop the Client by closing the underlying connection. Args: stop_signals (``tuple``, *optional*): Iterable containing ...
def idle(self, stop_signals: tuple = (SIGINT, SIGTERM, SIGABRT)): """Blocks the program execution until one of the signals are received, then gently stop the Client by closing the underlying connection. Args: stop_signals (``tuple``, *optional*): Iterable containing ...
[ "Blocks", "the", "program", "execution", "until", "one", "of", "the", "signals", "are", "received", "then", "gently", "stop", "the", "Client", "by", "closing", "the", "underlying", "connection", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/client.py#L410-L431
[ "def", "idle", "(", "self", ",", "stop_signals", ":", "tuple", "=", "(", "SIGINT", ",", "SIGTERM", ",", "SIGABRT", ")", ")", ":", "def", "signal_handler", "(", "*", "args", ")", ":", "self", ".", "is_idle", "=", "False", "for", "s", "in", "stop_signa...
e7258a341ba905cfa86264c22040654db732ec1c
train
Client.add_handler
Use this method to register an update handler. You can register multiple handlers, but at most one handler within a group will be used for a single update. To handle the same update more than once, register your handler using a different group id (lower group id == higher priority). Ar...
pyrogram/client/client.py
def add_handler(self, handler: Handler, group: int = 0): """Use this method to register an update handler. You can register multiple handlers, but at most one handler within a group will be used for a single update. To handle the same update more than once, register your handler using a...
def add_handler(self, handler: Handler, group: int = 0): """Use this method to register an update handler. You can register multiple handlers, but at most one handler within a group will be used for a single update. To handle the same update more than once, register your handler using a...
[ "Use", "this", "method", "to", "register", "an", "update", "handler", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/client.py#L443-L465
[ "def", "add_handler", "(", "self", ",", "handler", ":", "Handler", ",", "group", ":", "int", "=", "0", ")", ":", "if", "isinstance", "(", "handler", ",", "DisconnectHandler", ")", ":", "self", ".", "disconnect_handler", "=", "handler", ".", "callback", "...
e7258a341ba905cfa86264c22040654db732ec1c
train
Client.remove_handler
Removes a previously-added update handler. Make sure to provide the right group that the handler was added in. You can use the return value of the :meth:`add_handler` method, a tuple of (handler, group), and pass it directly. Args: handler (``Handler``): The...
pyrogram/client/client.py
def remove_handler(self, handler: Handler, group: int = 0): """Removes a previously-added update handler. Make sure to provide the right group that the handler was added in. You can use the return value of the :meth:`add_handler` method, a tuple of (handler, group), and pass it directly...
def remove_handler(self, handler: Handler, group: int = 0): """Removes a previously-added update handler. Make sure to provide the right group that the handler was added in. You can use the return value of the :meth:`add_handler` method, a tuple of (handler, group), and pass it directly...
[ "Removes", "a", "previously", "-", "added", "update", "handler", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/client.py#L467-L484
[ "def", "remove_handler", "(", "self", ",", "handler", ":", "Handler", ",", "group", ":", "int", "=", "0", ")", ":", "if", "isinstance", "(", "handler", ",", "DisconnectHandler", ")", ":", "self", ".", "disconnect_handler", "=", "None", "else", ":", "self...
e7258a341ba905cfa86264c22040654db732ec1c
train
Client.send
Use this method to send Raw Function queries. This method makes possible to manually call every single Telegram API method in a low-level manner. Available functions are listed in the :obj:`functions <pyrogram.api.functions>` package and may accept compound data types from :obj:`types <pyrogram...
pyrogram/client/client.py
def send(self, data: Object, retries: int = Session.MAX_RETRIES, timeout: float = Session.WAIT_TIMEOUT): """Use this method to send Raw Function queries. This method makes possible to manually call every single Telegram API method in a low-level manner. Av...
def send(self, data: Object, retries: int = Session.MAX_RETRIES, timeout: float = Session.WAIT_TIMEOUT): """Use this method to send Raw Function queries. This method makes possible to manually call every single Telegram API method in a low-level manner. Av...
[ "Use", "this", "method", "to", "send", "Raw", "Function", "queries", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/client.py#L1021-L1058
[ "def", "send", "(", "self", ",", "data", ":", "Object", ",", "retries", ":", "int", "=", "Session", ".", "MAX_RETRIES", ",", "timeout", ":", "float", "=", "Session", ".", "WAIT_TIMEOUT", ")", ":", "if", "not", "self", ".", "is_started", ":", "raise", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
Client.resolve_peer
Use this method to get the InputPeer of a known peer_id. This is a utility method intended to be used **only** when working with Raw Functions (i.e: a Telegram API method you wish to use which is not available yet in the Client class as an easy-to-use method), whenever an InputPeer type is requ...
pyrogram/client/client.py
def resolve_peer(self, peer_id: Union[int, str]): """Use this method to get the InputPeer of a known peer_id. This is a utility method intended to be used **only** when working with Raw Functions (i.e: a Telegram API method you wish to use which is not available yet in the ...
def resolve_peer(self, peer_id: Union[int, str]): """Use this method to get the InputPeer of a known peer_id. This is a utility method intended to be used **only** when working with Raw Functions (i.e: a Telegram API method you wish to use which is not available yet in the ...
[ "Use", "this", "method", "to", "get", "the", "InputPeer", "of", "a", "known", "peer_id", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/client.py#L1315-L1386
[ "def", "resolve_peer", "(", "self", ",", "peer_id", ":", "Union", "[", "int", ",", "str", "]", ")", ":", "try", ":", "return", "self", ".", "peers_by_id", "[", "peer_id", "]", "except", "KeyError", ":", "if", "type", "(", "peer_id", ")", "is", "str",...
e7258a341ba905cfa86264c22040654db732ec1c
train
Client.save_file
Use this method to upload a file onto Telegram servers, without actually sending the message to anyone. This is a utility method intended to be used **only** when working with Raw Functions (i.e: a Telegram API method you wish to use which is not available yet in the Client class as an easy-to-use meth...
pyrogram/client/client.py
def save_file(self, path: str, file_id: int = None, file_part: int = 0, progress: callable = None, progress_args: tuple = ()): """Use this method to upload a file onto Telegram servers, without actually sending the message...
def save_file(self, path: str, file_id: int = None, file_part: int = 0, progress: callable = None, progress_args: tuple = ()): """Use this method to upload a file onto Telegram servers, without actually sending the message...
[ "Use", "this", "method", "to", "upload", "a", "file", "onto", "Telegram", "servers", "without", "actually", "sending", "the", "message", "to", "anyone", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/client.py#L1388-L1519
[ "def", "save_file", "(", "self", ",", "path", ":", "str", ",", "file_id", ":", "int", "=", "None", ",", "file_part", ":", "int", "=", "0", ",", "progress", ":", "callable", "=", "None", ",", "progress_args", ":", "tuple", "=", "(", ")", ")", ":", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
SendChatAction.send_chat_action
Use this method when you need to tell the other party that something is happening on your side. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use "me" or "self"...
pyrogram/client/methods/messages/send_chat_action.py
def send_chat_action( self, chat_id: Union[int, str], action: Union[ChatAction, str], progress: int = 0 ): """Use this method when you need to tell the other party that something is happening on your side. Args: chat_id (``int`` | ``str``): ...
def send_chat_action( self, chat_id: Union[int, str], action: Union[ChatAction, str], progress: int = 0 ): """Use this method when you need to tell the other party that something is happening on your side. Args: chat_id (``int`` | ``str``): ...
[ "Use", "this", "method", "when", "you", "need", "to", "tell", "the", "other", "party", "that", "something", "is", "happening", "on", "your", "side", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/messages/send_chat_action.py#L26-L74
[ "def", "send_chat_action", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "action", ":", "Union", "[", "ChatAction", ",", "str", "]", ",", "progress", ":", "int", "=", "0", ")", ":", "# Resolve Enum type", "if", "isinstanc...
e7258a341ba905cfa86264c22040654db732ec1c
train
AnswerInlineQuery.answer_inline_query
Use this method to send answers to an inline query. No more than 50 results per query are allowed. Args: inline_query_id (``str``): Unique identifier for the answered query. results (List of :obj:`InlineQueryResult <pyrogram.InlineQueryResult>`): ...
pyrogram/client/methods/bots/answer_inline_query.py
def answer_inline_query( self, inline_query_id: str, results: List[InlineQueryResult], cache_time: int = 300, is_personal: bool = None, next_offset: str = "", switch_pm_text: str = "", switch_pm_parameter: str = "" ): """Use this method to send...
def answer_inline_query( self, inline_query_id: str, results: List[InlineQueryResult], cache_time: int = 300, is_personal: bool = None, next_offset: str = "", switch_pm_text: str = "", switch_pm_parameter: str = "" ): """Use this method to send...
[ "Use", "this", "method", "to", "send", "answers", "to", "an", "inline", "query", ".", "No", "more", "than", "50", "results", "per", "query", "are", "allowed", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/bots/answer_inline_query.py#L27-L91
[ "def", "answer_inline_query", "(", "self", ",", "inline_query_id", ":", "str", ",", "results", ":", "List", "[", "InlineQueryResult", "]", ",", "cache_time", ":", "int", "=", "300", ",", "is_personal", ":", "bool", "=", "None", ",", "next_offset", ":", "st...
e7258a341ba905cfa86264c22040654db732ec1c
train
SendLocation.send_location
Use this method to send points on the map. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use "me" or "self". For a contact that exists in your T...
pyrogram/client/methods/messages/send_location.py
def send_location( self, chat_id: Union[int, str], latitude: float, longitude: float, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", ...
def send_location( self, chat_id: Union[int, str], latitude: float, longitude: float, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", ...
[ "Use", "this", "method", "to", "send", "points", "on", "the", "map", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/messages/send_location.py#L27-L95
[ "def", "send_location", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "latitude", ":", "float", ",", "longitude", ":", "float", ",", "disable_notification", ":", "bool", "=", "None", ",", "reply_to_message_id", ":", "int", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
RetractVote.retract_vote
Use this method to retract your vote in a poll. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use "me" or "self". For a contact that exists in y...
pyrogram/client/methods/messages/retract_vote.py
def retract_vote( self, chat_id: Union[int, str], message_id: id ) -> bool: """Use this method to retract your vote in a poll. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For you...
def retract_vote( self, chat_id: Union[int, str], message_id: id ) -> bool: """Use this method to retract your vote in a poll. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For you...
[ "Use", "this", "method", "to", "retract", "your", "vote", "in", "a", "poll", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/messages/retract_vote.py#L26-L56
[ "def", "retract_vote", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "message_id", ":", "id", ")", "->", "bool", ":", "self", ".", "send", "(", "functions", ".", "messages", ".", "SendVote", "(", "peer", "=", "self", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
GetUserProfilePhotos.get_user_profile_photos
Use this method to get a list of profile pictures for a user. Args: user_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use "me" or "self". For a contact th...
pyrogram/client/methods/users/get_user_profile_photos.py
def get_user_profile_photos( self, user_id: Union[int, str], offset: int = 0, limit: int = 100 ) -> "pyrogram.UserProfilePhotos": """Use this method to get a list of profile pictures for a user. Args: user_id (``int`` | ``str``): Unique id...
def get_user_profile_photos( self, user_id: Union[int, str], offset: int = 0, limit: int = 100 ) -> "pyrogram.UserProfilePhotos": """Use this method to get a list of profile pictures for a user. Args: user_id (``int`` | ``str``): Unique id...
[ "Use", "this", "method", "to", "get", "a", "list", "of", "profile", "pictures", "for", "a", "user", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/users/get_user_profile_photos.py#L27-L65
[ "def", "get_user_profile_photos", "(", "self", ",", "user_id", ":", "Union", "[", "int", ",", "str", "]", ",", "offset", ":", "int", "=", "0", ",", "limit", ":", "int", "=", "100", ")", "->", "\"pyrogram.UserProfilePhotos\"", ":", "return", "pyrogram", "...
e7258a341ba905cfa86264c22040654db732ec1c
train
UpdateUsername.update_username
Use this method to update your own username. This method only works for users, not bots. Bot usernames must be changed via Bot Support or by recreating them from scratch using BotFather. To update a channel or supergroup username you can use :meth:`update_chat_username`. Args: ...
pyrogram/client/methods/users/update_username.py
def update_username( self, username: Union[str, None] ) -> bool: """Use this method to update your own username. This method only works for users, not bots. Bot usernames must be changed via Bot Support or by recreating them from scratch using BotFather. To update a ...
def update_username( self, username: Union[str, None] ) -> bool: """Use this method to update your own username. This method only works for users, not bots. Bot usernames must be changed via Bot Support or by recreating them from scratch using BotFather. To update a ...
[ "Use", "this", "method", "to", "update", "your", "own", "username", ".", "This", "method", "only", "works", "for", "users", "not", "bots", ".", "Bot", "usernames", "must", "be", "changed", "via", "Bot", "Support", "or", "by", "recreating", "them", "from", ...
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/users/update_username.py#L26-L53
[ "def", "update_username", "(", "self", ",", "username", ":", "Union", "[", "str", ",", "None", "]", ")", "->", "bool", ":", "return", "bool", "(", "self", ".", "send", "(", "functions", ".", "account", ".", "UpdateUsername", "(", "username", "=", "user...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply
Bound method *reply* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_message( chat_id=message.chat.id, text="hello", reply_to_message_id=message.message_id ) Example: ...
pyrogram/client/types/messages_and_media/message.py
def reply( self, text: str, quote: bool = None, parse_mode: str = "", disable_web_page_preview: bool = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup=None ) -> "Message": """Bound method *reply* of :obj:`...
def reply( self, text: str, quote: bool = None, parse_mode: str = "", disable_web_page_preview: bool = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup=None ) -> "Message": """Bound method *reply* of :obj:`...
[ "Bound", "method", "*", "reply", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L652-L727
[ "def", "reply", "(", "self", ",", "text", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "disable_web_page_preview", ":", "bool", "=", "None", ",", "disable_notification", ":", "bool", "=", "None", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_animation
Bound method *reply_animation* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_animation( chat_id=message.chat.id, animation=animation ) Example: .. code-block:: python ...
pyrogram/client/types/messages_and_media/message.py
def reply_animation( self, animation: str, quote: bool = None, caption: str = "", parse_mode: str = "", duration: int = 0, width: int = 0, height: int = 0, thumb: str = None, disable_notification: bool = None, reply_markup: Union[ ...
def reply_animation( self, animation: str, quote: bool = None, caption: str = "", parse_mode: str = "", duration: int = 0, width: int = 0, height: int = 0, thumb: str = None, disable_notification: bool = None, reply_markup: Union[ ...
[ "Bound", "method", "*", "reply_animation", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L729-L862
[ "def", "reply_animation", "(", "self", ",", "animation", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "caption", ":", "str", "=", "\"\"", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "duration", ":", "int", "=", "0", ",", "width", "...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_audio
Bound method *reply_audio* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_audio( chat_id=message.chat.id, audio=audio ) Example: .. code-block:: python messag...
pyrogram/client/types/messages_and_media/message.py
def reply_audio( self, audio: str, quote: bool = None, caption: str = "", parse_mode: str = "", duration: int = 0, performer: str = None, title: str = None, thumb: str = None, disable_notification: bool = None, reply_to_message_id: ...
def reply_audio( self, audio: str, quote: bool = None, caption: str = "", parse_mode: str = "", duration: int = 0, performer: str = None, title: str = None, thumb: str = None, disable_notification: bool = None, reply_to_message_id: ...
[ "Bound", "method", "*", "reply_audio", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L864-L997
[ "def", "reply_audio", "(", "self", ",", "audio", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "caption", ":", "str", "=", "\"\"", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "duration", ":", "int", "=", "0", ",", "performer", ":", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_cached_media
Bound method *reply_cached_media* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_cached_media( chat_id=message.chat.id, file_id=file_id ) Example: .. code-block:: python ...
pyrogram/client/types/messages_and_media/message.py
def reply_cached_media( self, file_id: str, quote: bool = None, caption: str = "", parse_mode: str = "", disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyro...
def reply_cached_media( self, file_id: str, quote: bool = None, caption: str = "", parse_mode: str = "", disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyro...
[ "Bound", "method", "*", "reply_cached_media", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L999-L1079
[ "def", "reply_cached_media", "(", "self", ",", "file_id", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "caption", ":", "str", "=", "\"\"", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "disable_notification", ":", "bool", "=", "None", ",...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_chat_action
Bound method *reply_chat_action* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_chat_action( chat_id=message.chat.id, action="typing" ) Example: .. code-block:: python ...
pyrogram/client/types/messages_and_media/message.py
def reply_chat_action( self, action: Union[ChatAction, str], progress: int = 0 ) -> "Message": """Bound method *reply_chat_action* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_chat_action( ...
def reply_chat_action( self, action: Union[ChatAction, str], progress: int = 0 ) -> "Message": """Bound method *reply_chat_action* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_chat_action( ...
[ "Bound", "method", "*", "reply_chat_action", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L1081-L1124
[ "def", "reply_chat_action", "(", "self", ",", "action", ":", "Union", "[", "ChatAction", ",", "str", "]", ",", "progress", ":", "int", "=", "0", ")", "->", "\"Message\"", ":", "return", "self", ".", "_client", ".", "send_chat_action", "(", "chat_id", "="...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_contact
Bound method *reply_contact* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_contact( chat_id=message.chat.id, phone_number=phone_number, first_name=first_name ) Example: ...
pyrogram/client/types/messages_and_media/message.py
def reply_contact( self, phone_number: str, first_name: str, quote: bool = None, last_name: str = "", vcard: str = "", disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMark...
def reply_contact( self, phone_number: str, first_name: str, quote: bool = None, last_name: str = "", vcard: str = "", disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMark...
[ "Bound", "method", "*", "reply_contact", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L1126-L1209
[ "def", "reply_contact", "(", "self", ",", "phone_number", ":", "str", ",", "first_name", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "last_name", ":", "str", "=", "\"\"", ",", "vcard", ":", "str", "=", "\"\"", ",", "disable_notification", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_document
Bound method *reply_document* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_document( chat_id=message.chat.id, document=document ) Example: .. code-block:: python ...
pyrogram/client/types/messages_and_media/message.py
def reply_document( self, document: str, quote: bool = None, thumb: str = None, caption: str = "", parse_mode: str = "", disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMa...
def reply_document( self, document: str, quote: bool = None, thumb: str = None, caption: str = "", parse_mode: str = "", disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMa...
[ "Bound", "method", "*", "reply_document", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L1211-L1329
[ "def", "reply_document", "(", "self", ",", "document", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "thumb", ":", "str", "=", "None", ",", "caption", ":", "str", "=", "\"\"", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "disable_notif...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_game
Bound method *reply_game* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_game( chat_id=message.chat.id, game_short_name="lumberjack" ) Example: .. code-block:: python ...
pyrogram/client/types/messages_and_media/message.py
def reply_game( self, game_short_name: str, quote: bool = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", "pyrogram.ReplyKey...
def reply_game( self, game_short_name: str, quote: bool = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", "pyrogram.ReplyKey...
[ "Bound", "method", "*", "reply_game", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L1331-L1398
[ "def", "reply_game", "(", "self", ",", "game_short_name", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "disable_notification", ":", "bool", "=", "None", ",", "reply_to_message_id", ":", "int", "=", "None", ",", "reply_markup", ":", "Union", "["...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_inline_bot_result
Bound method *reply_inline_bot_result* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_inline_bot_result( chat_id=message.chat.id, query_id=query_id, result_id=result_id ) ...
pyrogram/client/types/messages_and_media/message.py
def reply_inline_bot_result( self, query_id: int, result_id: str, quote: bool = None, disable_notification: bool = None, reply_to_message_id: int = None, hide_via: bool = None ) -> "Message": """Bound method *reply_inline_bot_result* of :obj:`Message <...
def reply_inline_bot_result( self, query_id: int, result_id: str, quote: bool = None, disable_notification: bool = None, reply_to_message_id: int = None, hide_via: bool = None ) -> "Message": """Bound method *reply_inline_bot_result* of :obj:`Message <...
[ "Bound", "method", "*", "reply_inline_bot_result", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L1400-L1467
[ "def", "reply_inline_bot_result", "(", "self", ",", "query_id", ":", "int", ",", "result_id", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "disable_notification", ":", "bool", "=", "None", ",", "reply_to_message_id", ":", "int", "=", "None", ",...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_location
Bound method *reply_location* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_location( chat_id=message.chat.id, latitude=41.890251, longitude=12.492373 ) Example: ...
pyrogram/client/types/messages_and_media/message.py
def reply_location( self, latitude: float, longitude: float, quote: bool = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", ...
def reply_location( self, latitude: float, longitude: float, quote: bool = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", ...
[ "Bound", "method", "*", "reply_location", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L1469-L1542
[ "def", "reply_location", "(", "self", ",", "latitude", ":", "float", ",", "longitude", ":", "float", ",", "quote", ":", "bool", "=", "None", ",", "disable_notification", ":", "bool", "=", "None", ",", "reply_to_message_id", ":", "int", "=", "None", ",", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_media_group
Bound method *reply_media_group* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_media_group( chat_id=message.chat.id, media=list_of_media ) Example: .. code-block:: python ...
pyrogram/client/types/messages_and_media/message.py
def reply_media_group( self, media: List[Union["pyrogram.InputMediaPhoto", "pyrogram.InputMediaVideo"]], quote: bool = None, disable_notification: bool = None, reply_to_message_id: int = None ) -> "Message": """Bound method *reply_media_group* of :obj:`Message <pyrogr...
def reply_media_group( self, media: List[Union["pyrogram.InputMediaPhoto", "pyrogram.InputMediaVideo"]], quote: bool = None, disable_notification: bool = None, reply_to_message_id: int = None ) -> "Message": """Bound method *reply_media_group* of :obj:`Message <pyrogr...
[ "Bound", "method", "*", "reply_media_group", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L1544-L1603
[ "def", "reply_media_group", "(", "self", ",", "media", ":", "List", "[", "Union", "[", "\"pyrogram.InputMediaPhoto\"", ",", "\"pyrogram.InputMediaVideo\"", "]", "]", ",", "quote", ":", "bool", "=", "None", ",", "disable_notification", ":", "bool", "=", "None", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_photo
Bound method *reply_photo* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_photo( chat_id=message.chat.id, photo=photo ) Example: .. code-block:: python messag...
pyrogram/client/types/messages_and_media/message.py
def reply_photo( self, photo: str, quote: bool = None, caption: str = "", parse_mode: str = "", ttl_seconds: int = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMa...
def reply_photo( self, photo: str, quote: bool = None, caption: str = "", parse_mode: str = "", ttl_seconds: int = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMa...
[ "Bound", "method", "*", "reply_photo", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L1605-L1722
[ "def", "reply_photo", "(", "self", ",", "photo", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "caption", ":", "str", "=", "\"\"", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "ttl_seconds", ":", "int", "=", "None", ",", "disable_notif...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_poll
Bound method *reply_poll* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_poll( chat_id=message.chat.id, question="Is Pyrogram the best?", options=["Yes", "Yes"] ) Example:...
pyrogram/client/types/messages_and_media/message.py
def reply_poll( self, question: str, options: List[str], quote: bool = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", ...
def reply_poll( self, question: str, options: List[str], quote: bool = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", ...
[ "Bound", "method", "*", "reply_poll", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L1724-L1797
[ "def", "reply_poll", "(", "self", ",", "question", ":", "str", ",", "options", ":", "List", "[", "str", "]", ",", "quote", ":", "bool", "=", "None", ",", "disable_notification", ":", "bool", "=", "None", ",", "reply_to_message_id", ":", "int", "=", "No...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_sticker
Bound method *reply_sticker* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_sticker( chat_id=message.chat.id, sticker=sticker ) Example: .. code-block:: python ...
pyrogram/client/types/messages_and_media/message.py
def reply_sticker( self, sticker: str, quote: bool = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", "pyrogram.ReplyKeyboard...
def reply_sticker( self, sticker: str, quote: bool = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", "pyrogram.ReplyKeyboard...
[ "Bound", "method", "*", "reply_sticker", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L1799-L1897
[ "def", "reply_sticker", "(", "self", ",", "sticker", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "disable_notification", ":", "bool", "=", "None", ",", "reply_to_message_id", ":", "int", "=", "None", ",", "reply_markup", ":", "Union", "[", "...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_venue
Bound method *reply_venue* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_venue( chat_id=message.chat.id, latitude=41.890251, longitude=12.492373, title="Coliseum", ...
pyrogram/client/types/messages_and_media/message.py
def reply_venue( self, latitude: float, longitude: float, title: str, address: str, quote: bool = None, foursquare_id: str = "", foursquare_type: str = "", disable_notification: bool = None, reply_to_message_id: int = None, reply_ma...
def reply_venue( self, latitude: float, longitude: float, title: str, address: str, quote: bool = None, foursquare_id: str = "", foursquare_type: str = "", disable_notification: bool = None, reply_to_message_id: int = None, reply_ma...
[ "Bound", "method", "*", "reply_venue", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L1899-L1995
[ "def", "reply_venue", "(", "self", ",", "latitude", ":", "float", ",", "longitude", ":", "float", ",", "title", ":", "str", ",", "address", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "foursquare_id", ":", "str", "=", "\"\"", ",", "fours...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_video
Bound method *reply_video* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_video( chat_id=message.chat.id, video=video ) Example: .. code-block:: python messag...
pyrogram/client/types/messages_and_media/message.py
def reply_video( self, video: str, quote: bool = None, caption: str = "", parse_mode: str = "", duration: int = 0, width: int = 0, height: int = 0, thumb: str = None, supports_streaming: bool = True, disable_notification: bool = Non...
def reply_video( self, video: str, quote: bool = None, caption: str = "", parse_mode: str = "", duration: int = 0, width: int = 0, height: int = 0, thumb: str = None, supports_streaming: bool = True, disable_notification: bool = Non...
[ "Bound", "method", "*", "reply_video", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L1997-L2135
[ "def", "reply_video", "(", "self", ",", "video", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "caption", ":", "str", "=", "\"\"", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "duration", ":", "int", "=", "0", ",", "width", ":", "i...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_video_note
Bound method *reply_video_note* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_video_note( chat_id=message.chat.id, video_note=video_note ) Example: .. code-block:: python ...
pyrogram/client/types/messages_and_media/message.py
def reply_video_note( self, video_note: str, quote: bool = None, duration: int = 0, length: int = 1, thumb: str = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMar...
def reply_video_note( self, video_note: str, quote: bool = None, duration: int = 0, length: int = 1, thumb: str = None, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMar...
[ "Bound", "method", "*", "reply_video_note", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L2137-L2253
[ "def", "reply_video_note", "(", "self", ",", "video_note", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "duration", ":", "int", "=", "0", ",", "length", ":", "int", "=", "1", ",", "thumb", ":", "str", "=", "None", ",", "disable_notificati...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.reply_voice
Bound method *reply_voice* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.send_voice( chat_id=message.chat.id, voice=voice ) Example: .. code-block:: python messag...
pyrogram/client/types/messages_and_media/message.py
def reply_voice( self, voice: str, quote: bool = None, caption: str = "", parse_mode: str = "", duration: int = 0, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup",...
def reply_voice( self, voice: str, quote: bool = None, caption: str = "", parse_mode: str = "", duration: int = 0, disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup",...
[ "Bound", "method", "*", "reply_voice", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L2255-L2370
[ "def", "reply_voice", "(", "self", ",", "voice", ":", "str", ",", "quote", ":", "bool", "=", "None", ",", "caption", ":", "str", "=", "\"\"", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "duration", ":", "int", "=", "0", ",", "disable_notificatio...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.edit
Bound method *edit* of :obj:`Message <pyrogram.Message>` Use as a shortcut for: .. code-block:: python client.edit_message_text( chat_id=message.chat.id, message_id=message.message_id, text="hello" ) Example: ...
pyrogram/client/types/messages_and_media/message.py
def edit( self, text: str, parse_mode: str = "", disable_web_page_preview: bool = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", "pyrogram.ReplyKeyboardRemove", "pyrogram.ForceReply" ...
def edit( self, text: str, parse_mode: str = "", disable_web_page_preview: bool = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", "pyrogram.ReplyKeyboardRemove", "pyrogram.ForceReply" ...
[ "Bound", "method", "*", "edit", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">" ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L2372-L2429
[ "def", "edit", "(", "self", ",", "text", ":", "str", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "disable_web_page_preview", ":", "bool", "=", "None", ",", "reply_markup", ":", "Union", "[", "\"pyrogram.InlineKeyboardMarkup\"", ",", "\"pyrogram.ReplyKeyboar...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.edit_caption
Bound method *edit_caption* of :obj:`Message <pyrogram.Message>` Use as a shortcut for: .. code-block:: python client.edit_message_caption( chat_id=message.chat.id, message_id=message.message_id, caption="hello" ) Exampl...
pyrogram/client/types/messages_and_media/message.py
def edit_caption( self, caption: str, parse_mode: str = "", reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", "pyrogram.ReplyKeyboardRemove", "pyrogram.ForceReply" ] = None ) -> "Message": ...
def edit_caption( self, caption: str, parse_mode: str = "", reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup", "pyrogram.ReplyKeyboardRemove", "pyrogram.ForceReply" ] = None ) -> "Message": ...
[ "Bound", "method", "*", "edit_caption", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">" ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L2431-L2483
[ "def", "edit_caption", "(", "self", ",", "caption", ":", "str", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "reply_markup", ":", "Union", "[", "\"pyrogram.InlineKeyboardMarkup\"", ",", "\"pyrogram.ReplyKeyboardMarkup\"", ",", "\"pyrogram.ReplyKeyboardRemove\"", "...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.forward
Bound method *forward* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.forward_messages( chat_id=chat_id, from_chat_id=message.chat.id, message_ids=message.message_id ) Example:...
pyrogram/client/types/messages_and_media/message.py
def forward( self, chat_id: int or str, disable_notification: bool = None, as_copy: bool = False, remove_caption: bool = False ) -> "Message": """Bound method *forward* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: pyth...
def forward( self, chat_id: int or str, disable_notification: bool = None, as_copy: bool = False, remove_caption: bool = False ) -> "Message": """Bound method *forward* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: pyth...
[ "Bound", "method", "*", "forward", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L2558-L2705
[ "def", "forward", "(", "self", ",", "chat_id", ":", "int", "or", "str", ",", "disable_notification", ":", "bool", "=", "None", ",", "as_copy", ":", "bool", "=", "False", ",", "remove_caption", ":", "bool", "=", "False", ")", "->", "\"Message\"", ":", "...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.delete
Bound method *delete* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.delete_messages( chat_id=chat_id, message_ids=message.message_id ) Example: .. code-block:: python ...
pyrogram/client/types/messages_and_media/message.py
def delete(self, revoke: bool = True): """Bound method *delete* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.delete_messages( chat_id=chat_id, message_ids=message.message_id ) Exampl...
def delete(self, revoke: bool = True): """Bound method *delete* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.delete_messages( chat_id=chat_id, message_ids=message.message_id ) Exampl...
[ "Bound", "method", "*", "delete", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L2707-L2741
[ "def", "delete", "(", "self", ",", "revoke", ":", "bool", "=", "True", ")", ":", "return", "self", ".", "_client", ".", "delete_messages", "(", "chat_id", "=", "self", ".", "chat", ".", "id", ",", "message_ids", "=", "self", ".", "message_id", ",", "...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.click
Bound method *click* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for clicking a button attached to the message instead of. - Clicking inline buttons: .. code-block:: python client.request_callback_answer( chat_id=message.chat.id, messag...
pyrogram/client/types/messages_and_media/message.py
def click(self, x: int or str, y: int = None, quote: bool = None): """Bound method *click* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for clicking a button attached to the message instead of. - Clicking inline buttons: .. code-block:: python client.request_ca...
def click(self, x: int or str, y: int = None, quote: bool = None): """Bound method *click* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for clicking a button attached to the message instead of. - Clicking inline buttons: .. code-block:: python client.request_ca...
[ "Bound", "method", "*", "click", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L2743-L2853
[ "def", "click", "(", "self", ",", "x", ":", "int", "or", "str", ",", "y", ":", "int", "=", "None", ",", "quote", ":", "bool", "=", "None", ")", ":", "if", "isinstance", "(", "self", ".", "reply_markup", ",", "pyrogram", ".", "ReplyKeyboardMarkup", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.download
Bound method *download* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.download_media(message) Example: .. code-block:: python message.download() Args: file_name (``str``, *optional*): ...
pyrogram/client/types/messages_and_media/message.py
def download( self, file_name: str = "", block: bool = True, progress: callable = None, progress_args: tuple = () ) -> "Message": """Bound method *download* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python ...
def download( self, file_name: str = "", block: bool = True, progress: callable = None, progress_args: tuple = () ) -> "Message": """Bound method *download* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python ...
[ "Bound", "method", "*", "download", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L2855-L2908
[ "def", "download", "(", "self", ",", "file_name", ":", "str", "=", "\"\"", ",", "block", ":", "bool", "=", "True", ",", "progress", ":", "callable", "=", "None", ",", "progress_args", ":", "tuple", "=", "(", ")", ")", "->", "\"Message\"", ":", "retur...
e7258a341ba905cfa86264c22040654db732ec1c
train
Message.pin
Bound method *pin* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.pin_chat_message( chat_id=message.chat.id, message_id=message_id ) Example: .. code-block:: python ...
pyrogram/client/types/messages_and_media/message.py
def pin(self, disable_notification: bool = None) -> "Message": """Bound method *pin* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.pin_chat_message( chat_id=message.chat.id, message_id=message_id ...
def pin(self, disable_notification: bool = None) -> "Message": """Bound method *pin* of :obj:`Message <pyrogram.Message>`. Use as a shortcut for: .. code-block:: python client.pin_chat_message( chat_id=message.chat.id, message_id=message_id ...
[ "Bound", "method", "*", "pin", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Message", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/message.py#L2910-L2942
[ "def", "pin", "(", "self", ",", "disable_notification", ":", "bool", "=", "None", ")", "->", "\"Message\"", ":", "return", "self", ".", "_client", ".", "pin_chat_message", "(", "chat_id", "=", "self", ".", "chat", ".", "id", ",", "message_id", "=", "self...
e7258a341ba905cfa86264c22040654db732ec1c
train
GetDialogs.get_dialogs
Use this method to get a chunk of the user's dialogs. You can get up to 100 dialogs at once. For a more convenient way of getting a user's dialogs see :meth:`iter_dialogs`. Args: offset_date (``int``): The offset date in Unix time taken from the top message of a :ob...
pyrogram/client/methods/chats/get_dialogs.py
def get_dialogs( self, offset_date: int = 0, limit: int = 100, pinned_only: bool = False ) -> "pyrogram.Dialogs": """Use this method to get a chunk of the user's dialogs. You can get up to 100 dialogs at once. For a more convenient way of getting a user's dia...
def get_dialogs( self, offset_date: int = 0, limit: int = 100, pinned_only: bool = False ) -> "pyrogram.Dialogs": """Use this method to get a chunk of the user's dialogs. You can get up to 100 dialogs at once. For a more convenient way of getting a user's dia...
[ "Use", "this", "method", "to", "get", "a", "chunk", "of", "the", "user", "s", "dialogs", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/chats/get_dialogs.py#L31-L83
[ "def", "get_dialogs", "(", "self", ",", "offset_date", ":", "int", "=", "0", ",", "limit", ":", "int", "=", "100", ",", "pinned_only", ":", "bool", "=", "False", ")", "->", "\"pyrogram.Dialogs\"", ":", "while", "True", ":", "try", ":", "if", "pinned_on...
e7258a341ba905cfa86264c22040654db732ec1c
train
GetUsers.get_users
Use this method to get information about a user. You can retrieve up to 200 users at once. Args: user_ids (``iterable``): A list of User identifiers (id or username) or a single user id/username. For a contact that exists in your Telegram address book you can...
pyrogram/client/methods/users/get_users.py
def get_users( self, user_ids: Iterable[Union[int, str]] ) -> Union["pyrogram.User", List["pyrogram.User"]]: """Use this method to get information about a user. You can retrieve up to 200 users at once. Args: user_ids (``iterable``): A list of Use...
def get_users( self, user_ids: Iterable[Union[int, str]] ) -> Union["pyrogram.User", List["pyrogram.User"]]: """Use this method to get information about a user. You can retrieve up to 200 users at once. Args: user_ids (``iterable``): A list of Use...
[ "Use", "this", "method", "to", "get", "information", "about", "a", "user", ".", "You", "can", "retrieve", "up", "to", "200", "users", "at", "once", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/users/get_users.py#L27-L63
[ "def", "get_users", "(", "self", ",", "user_ids", ":", "Iterable", "[", "Union", "[", "int", ",", "str", "]", "]", ")", "->", "Union", "[", "\"pyrogram.User\"", ",", "List", "[", "\"pyrogram.User\"", "]", "]", ":", "is_iterable", "=", "not", "isinstance"...
e7258a341ba905cfa86264c22040654db732ec1c
train
VotePoll.vote_poll
Use this method to vote a poll. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use "me" or "self". For a contact that exists in your Telegram add...
pyrogram/client/methods/messages/vote_poll.py
def vote_poll( self, chat_id: Union[int, str], message_id: id, option: int ) -> bool: """Use this method to vote a poll. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For y...
def vote_poll( self, chat_id: Union[int, str], message_id: id, option: int ) -> bool: """Use this method to vote a poll. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For y...
[ "Use", "this", "method", "to", "vote", "a", "poll", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/messages/vote_poll.py#L26-L62
[ "def", "vote_poll", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "message_id", ":", "id", ",", "option", ":", "int", ")", "->", "bool", ":", "poll", "=", "self", ".", "get_messages", "(", "chat_id", ",", "message_id", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
SendAnimation.send_animation
Use this method to send animation files (animation or H.264/MPEG-4 AVC video without sound). Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use "me" or "self". ...
pyrogram/client/methods/messages/send_animation.py
def send_animation( self, chat_id: Union[int, str], animation: str, caption: str = "", parse_mode: str = "", duration: int = 0, width: int = 0, height: int = 0, thumb: str = None, disable_notification: bool = None, reply_to_message_...
def send_animation( self, chat_id: Union[int, str], animation: str, caption: str = "", parse_mode: str = "", duration: int = 0, width: int = 0, height: int = 0, thumb: str = None, disable_notification: bool = None, reply_to_message_...
[ "Use", "this", "method", "to", "send", "animation", "files", "(", "animation", "or", "H", ".", "264", "/", "MPEG", "-", "4", "AVC", "video", "without", "sound", ")", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/messages/send_animation.py#L31-L204
[ "def", "send_animation", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "animation", ":", "str", ",", "caption", ":", "str", "=", "\"\"", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "duration", ":", "int", "=", "0...
e7258a341ba905cfa86264c22040654db732ec1c
train
OnRawUpdate.on_raw_update
Use this decorator to automatically register a function for handling raw updates. This does the same thing as :meth:`add_handler` using the :class:`RawUpdateHandler`. Args: group (``int``, *optional*): The group identifier, defaults to 0.
pyrogram/client/methods/decorators/on_raw_update.py
def on_raw_update( self=None, group: int = 0 ) -> callable: """Use this decorator to automatically register a function for handling raw updates. This does the same thing as :meth:`add_handler` using the :class:`RawUpdateHandler`. Args: group (``int``, *optional*)...
def on_raw_update( self=None, group: int = 0 ) -> callable: """Use this decorator to automatically register a function for handling raw updates. This does the same thing as :meth:`add_handler` using the :class:`RawUpdateHandler`. Args: group (``int``, *optional*)...
[ "Use", "this", "decorator", "to", "automatically", "register", "a", "function", "for", "handling", "raw", "updates", ".", "This", "does", "the", "same", "thing", "as", ":", "meth", ":", "add_handler", "using", "the", ":", "class", ":", "RawUpdateHandler", "....
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/decorators/on_raw_update.py#L27-L53
[ "def", "on_raw_update", "(", "self", "=", "None", ",", "group", ":", "int", "=", "0", ")", "->", "callable", ":", "def", "decorator", "(", "func", ":", "callable", ")", "->", "Tuple", "[", "Handler", ",", "int", "]", ":", "if", "isinstance", "(", "...
e7258a341ba905cfa86264c22040654db732ec1c
train
ClosePoll.close_poll
Use this method to close (stop) a poll. Closed polls can't be reopened and nobody will be able to vote in it anymore. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) yo...
pyrogram/client/methods/messages/close_poll.py
def close_poll( self, chat_id: Union[int, str], message_id: id ) -> bool: """Use this method to close (stop) a poll. Closed polls can't be reopened and nobody will be able to vote in it anymore. Args: chat_id (``int`` | ``str``): Unique i...
def close_poll( self, chat_id: Union[int, str], message_id: id ) -> bool: """Use this method to close (stop) a poll. Closed polls can't be reopened and nobody will be able to vote in it anymore. Args: chat_id (``int`` | ``str``): Unique i...
[ "Use", "this", "method", "to", "close", "(", "stop", ")", "a", "poll", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/messages/close_poll.py#L26-L67
[ "def", "close_poll", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "message_id", ":", "id", ")", "->", "bool", ":", "poll", "=", "self", ".", "get_messages", "(", "chat_id", ",", "message_id", ")", ".", "poll", "self", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
SendInlineBotResult.send_inline_bot_result
Use this method to send an inline bot result. Bot results can be retrieved using :obj:`get_inline_bot_results <pyrogram.Client.get_inline_bot_results>` Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your p...
pyrogram/client/methods/bots/send_inline_bot_result.py
def send_inline_bot_result( self, chat_id: Union[int, str], query_id: int, result_id: str, disable_notification: bool = None, reply_to_message_id: int = None, hide_via: bool = None ): """Use this method to send an inline bot result. Bot results...
def send_inline_bot_result( self, chat_id: Union[int, str], query_id: int, result_id: str, disable_notification: bool = None, reply_to_message_id: int = None, hide_via: bool = None ): """Use this method to send an inline bot result. Bot results...
[ "Use", "this", "method", "to", "send", "an", "inline", "bot", "result", ".", "Bot", "results", "can", "be", "retrieved", "using", ":", "obj", ":", "get_inline_bot_results", "<pyrogram", ".", "Client", ".", "get_inline_bot_results", ">" ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/bots/send_inline_bot_result.py#L26-L76
[ "def", "send_inline_bot_result", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "query_id", ":", "int", ",", "result_id", ":", "str", ",", "disable_notification", ":", "bool", "=", "None", ",", "reply_to_message_id", ":", "int...
e7258a341ba905cfa86264c22040654db732ec1c
train
SendCachedMedia.send_cached_media
Use this method to send any media stored on the Telegram servers using a file_id. This convenience method works with any valid file_id only. It does the same as calling the relevant method for sending media using a file_id, thus saving you from the hassle of using the correct method for the med...
pyrogram/client/methods/messages/send_cached_media.py
def send_cached_media( self, chat_id: Union[int, str], file_id: str, caption: str = "", parse_mode: str = "", disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", ...
def send_cached_media( self, chat_id: Union[int, str], file_id: str, caption: str = "", parse_mode: str = "", disable_notification: bool = None, reply_to_message_id: int = None, reply_markup: Union[ "pyrogram.InlineKeyboardMarkup", ...
[ "Use", "this", "method", "to", "send", "any", "media", "stored", "on", "the", "Telegram", "servers", "using", "a", "file_id", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/messages/send_cached_media.py#L30-L135
[ "def", "send_cached_media", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "file_id", ":", "str", ",", "caption", ":", "str", "=", "\"\"", ",", "parse_mode", ":", "str", "=", "\"\"", ",", "disable_notification", ":", "bool...
e7258a341ba905cfa86264c22040654db732ec1c
train
Messages.forward
Bound method *forward* of :obj:`Message <pyrogram.Messages>`. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use "me" or "self". For a contact th...
pyrogram/client/types/messages_and_media/messages.py
def forward( self, chat_id: Union[int, str], disable_notification: bool = None, as_copy: bool = False, remove_caption: bool = False ): """Bound method *forward* of :obj:`Message <pyrogram.Messages>`. Args: chat_id (``int`` | ``str``): ...
def forward( self, chat_id: Union[int, str], disable_notification: bool = None, as_copy: bool = False, remove_caption: bool = False ): """Bound method *forward* of :obj:`Message <pyrogram.Messages>`. Args: chat_id (``int`` | ``str``): ...
[ "Bound", "method", "*", "forward", "*", "of", ":", "obj", ":", "Message", "<pyrogram", ".", "Messages", ">", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/types/messages_and_media/messages.py#L120-L170
[ "def", "forward", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "disable_notification", ":", "bool", "=", "None", ",", "as_copy", ":", "bool", "=", "False", ",", "remove_caption", ":", "bool", "=", "False", ")", ":", "f...
e7258a341ba905cfa86264c22040654db732ec1c
train
DeleteMessages.delete_messages
Use this method to delete messages, including service messages. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use "me" or "self". For a contact ...
pyrogram/client/methods/messages/delete_messages.py
def delete_messages( self, chat_id: Union[int, str], message_ids: Iterable[int], revoke: bool = True ) -> bool: """Use this method to delete messages, including service messages. Args: chat_id (``int`` | ``str``): Unique identifier (int) o...
def delete_messages( self, chat_id: Union[int, str], message_ids: Iterable[int], revoke: bool = True ) -> bool: """Use this method to delete messages, including service messages. Args: chat_id (``int`` | ``str``): Unique identifier (int) o...
[ "Use", "this", "method", "to", "delete", "messages", "including", "service", "messages", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/messages/delete_messages.py#L26-L76
[ "def", "delete_messages", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "message_ids", ":", "Iterable", "[", "int", "]", ",", "revoke", ":", "bool", "=", "True", ")", "->", "bool", ":", "peer", "=", "self", ".", "reso...
e7258a341ba905cfa86264c22040654db732ec1c
train
SetChatDescription.set_chat_description
Use this method to change the description of a supergroup or a channel. You must be an administrator in the chat for this to work and must have the appropriate admin rights. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. ...
pyrogram/client/methods/chats/set_chat_description.py
def set_chat_description( self, chat_id: Union[int, str], description: str ) -> bool: """Use this method to change the description of a supergroup or a channel. You must be an administrator in the chat for this to work and must have the appropriate admin rights. Args...
def set_chat_description( self, chat_id: Union[int, str], description: str ) -> bool: """Use this method to change the description of a supergroup or a channel. You must be an administrator in the chat for this to work and must have the appropriate admin rights. Args...
[ "Use", "this", "method", "to", "change", "the", "description", "of", "a", "supergroup", "or", "a", "channel", ".", "You", "must", "be", "an", "administrator", "in", "the", "chat", "for", "this", "to", "work", "and", "must", "have", "the", "appropriate", ...
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/chats/set_chat_description.py#L26-L60
[ "def", "set_chat_description", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "description", ":", "str", ")", "->", "bool", ":", "peer", "=", "self", ".", "resolve_peer", "(", "chat_id", ")", "if", "isinstance", "(", "peer...
e7258a341ba905cfa86264c22040654db732ec1c
train
UnbanChatMember.unban_chat_member
Use this method to unban a previously kicked user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. You must be an administrator for this to work. Args: chat_id (``int`` | ``str``): ...
pyrogram/client/methods/chats/unban_chat_member.py
def unban_chat_member( self, chat_id: Union[int, str], user_id: Union[int, str] ) -> bool: """Use this method to unban a previously kicked user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, e...
def unban_chat_member( self, chat_id: Union[int, str], user_id: Union[int, str] ) -> bool: """Use this method to unban a previously kicked user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, e...
[ "Use", "this", "method", "to", "unban", "a", "previously", "kicked", "user", "in", "a", "supergroup", "or", "channel", ".", "The", "user", "will", "**", "not", "**", "return", "to", "the", "group", "or", "channel", "automatically", "but", "will", "be", "...
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/chats/unban_chat_member.py#L26-L59
[ "def", "unban_chat_member", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "user_id", ":", "Union", "[", "int", ",", "str", "]", ")", "->", "bool", ":", "self", ".", "send", "(", "functions", ".", "channels", ".", "Edi...
e7258a341ba905cfa86264c22040654db732ec1c
train
RestrictChat.restrict_chat
Use this method to restrict a chat. Pass True for all boolean parameters to lift restrictions from a chat. Args: chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. can_send_messages (``bool``, *optional*): ...
pyrogram/client/methods/chats/restrict_chat.py
def restrict_chat( self, chat_id: Union[int, str], can_send_messages: bool = False, can_send_media_messages: bool = False, can_send_other_messages: bool = False, can_add_web_page_previews: bool = False, can_send_polls: bool = False, can_change_info: bool =...
def restrict_chat( self, chat_id: Union[int, str], can_send_messages: bool = False, can_send_media_messages: bool = False, can_send_other_messages: bool = False, can_add_web_page_previews: bool = False, can_send_polls: bool = False, can_change_info: bool =...
[ "Use", "this", "method", "to", "restrict", "a", "chat", ".", "Pass", "True", "for", "all", "boolean", "parameters", "to", "lift", "restrictions", "from", "a", "chat", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/chats/restrict_chat.py#L27-L143
[ "def", "restrict_chat", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ",", "can_send_messages", ":", "bool", "=", "False", ",", "can_send_media_messages", ":", "bool", "=", "False", ",", "can_send_other_messages", ":", "bool", "=", ...
e7258a341ba905cfa86264c22040654db732ec1c
train
DeleteChatPhoto.delete_chat_photo
Use this method to delete a chat photo. Photos can't be changed for private chats. You must be an administrator in the chat for this to work and must have the appropriate admin rights. Note: In regular groups (non-supergroups), this method will only work if the "All Members Are Admi...
pyrogram/client/methods/chats/delete_chat_photo.py
def delete_chat_photo( self, chat_id: Union[int, str] ) -> bool: """Use this method to delete a chat photo. Photos can't be changed for private chats. You must be an administrator in the chat for this to work and must have the appropriate admin rights. Note: ...
def delete_chat_photo( self, chat_id: Union[int, str] ) -> bool: """Use this method to delete a chat photo. Photos can't be changed for private chats. You must be an administrator in the chat for this to work and must have the appropriate admin rights. Note: ...
[ "Use", "this", "method", "to", "delete", "a", "chat", "photo", ".", "Photos", "can", "t", "be", "changed", "for", "private", "chats", ".", "You", "must", "be", "an", "administrator", "in", "the", "chat", "for", "this", "to", "work", "and", "must", "hav...
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/chats/delete_chat_photo.py#L26-L68
[ "def", "delete_chat_photo", "(", "self", ",", "chat_id", ":", "Union", "[", "int", ",", "str", "]", ")", "->", "bool", ":", "peer", "=", "self", ".", "resolve_peer", "(", "chat_id", ")", "if", "isinstance", "(", "peer", ",", "types", ".", "InputPeerCha...
e7258a341ba905cfa86264c22040654db732ec1c
train
AddContacts.add_contacts
Use this method to add contacts to your Telegram address book. Args: contacts (List of :obj:`InputPhoneContact <pyrogram.InputPhoneContact>`): The contact list to be added Returns: On success, the added contacts are returned. Raises: :class:...
pyrogram/client/methods/contacts/add_contacts.py
def add_contacts( self, contacts: List["pyrogram.InputPhoneContact"] ): """Use this method to add contacts to your Telegram address book. Args: contacts (List of :obj:`InputPhoneContact <pyrogram.InputPhoneContact>`): The contact list to be added ...
def add_contacts( self, contacts: List["pyrogram.InputPhoneContact"] ): """Use this method to add contacts to your Telegram address book. Args: contacts (List of :obj:`InputPhoneContact <pyrogram.InputPhoneContact>`): The contact list to be added ...
[ "Use", "this", "method", "to", "add", "contacts", "to", "your", "Telegram", "address", "book", "." ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/pyrogram/client/methods/contacts/add_contacts.py#L27-L49
[ "def", "add_contacts", "(", "self", ",", "contacts", ":", "List", "[", "\"pyrogram.InputPhoneContact\"", "]", ")", ":", "imported_contacts", "=", "self", ".", "send", "(", "functions", ".", "contacts", ".", "ImportContacts", "(", "contacts", "=", "contacts", "...
e7258a341ba905cfa86264c22040654db732ec1c
train
sort_args
Put flags at the end
compiler/api/compiler.py
def sort_args(args): """Put flags at the end""" args = args.copy() flags = [i for i in args if FLAGS_RE.match(i[1])] for i in flags: args.remove(i) return args + flags
def sort_args(args): """Put flags at the end""" args = args.copy() flags = [i for i in args if FLAGS_RE.match(i[1])] for i in flags: args.remove(i) return args + flags
[ "Put", "flags", "at", "the", "end" ]
pyrogram/pyrogram
python
https://github.com/pyrogram/pyrogram/blob/e7258a341ba905cfa86264c22040654db732ec1c/compiler/api/compiler.py#L158-L166
[ "def", "sort_args", "(", "args", ")", ":", "args", "=", "args", ".", "copy", "(", ")", "flags", "=", "[", "i", "for", "i", "in", "args", "if", "FLAGS_RE", ".", "match", "(", "i", "[", "1", "]", ")", "]", "for", "i", "in", "flags", ":", "args"...
e7258a341ba905cfa86264c22040654db732ec1c