repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_documentation_string stringlengths 1 47.2k | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|
delph-in/pydelphin | delphin/mrs/xmrs.py | Mrs.to_dict | def to_dict(self, short_pred=True, properties=True):
"""
Encode the Mrs as a dictionary suitable for JSON serialization.
"""
def _lnk(obj): return {'from': obj.cfrom, 'to': obj.cto}
def _ep(ep, short_pred=True):
p = ep.pred.short_form() if short_pred else ep.pred.stri... | python | def to_dict(self, short_pred=True, properties=True):
"""
Encode the Mrs as a dictionary suitable for JSON serialization.
"""
def _lnk(obj): return {'from': obj.cfrom, 'to': obj.cto}
def _ep(ep, short_pred=True):
p = ep.pred.short_form() if short_pred else ep.pred.stri... | Encode the Mrs as a dictionary suitable for JSON serialization. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/xmrs.py#L783-L813 |
delph-in/pydelphin | delphin/mrs/xmrs.py | Mrs.from_dict | def from_dict(cls, d):
"""
Decode a dictionary, as from :meth:`to_dict`, into an Mrs object.
"""
def _lnk(o):
return None if o is None else Lnk.charspan(o['from'], o['to'])
def _ep(ep):
return ElementaryPredication(
nodeid=None,
... | python | def from_dict(cls, d):
"""
Decode a dictionary, as from :meth:`to_dict`, into an Mrs object.
"""
def _lnk(o):
return None if o is None else Lnk.charspan(o['from'], o['to'])
def _ep(ep):
return ElementaryPredication(
nodeid=None,
... | Decode a dictionary, as from :meth:`to_dict`, into an Mrs object. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/xmrs.py#L816-L850 |
delph-in/pydelphin | delphin/mrs/xmrs.py | Dmrs.to_dict | def to_dict(self, short_pred=True, properties=True):
"""
Encode the Dmrs as a dictionary suitable for JSON serialization.
"""
qs = set(self.nodeids(quantifier=True))
def _lnk(obj): return {'from': obj.cfrom, 'to': obj.cto}
def _node(node, short_pred=True):
p =... | python | def to_dict(self, short_pred=True, properties=True):
"""
Encode the Dmrs as a dictionary suitable for JSON serialization.
"""
qs = set(self.nodeids(quantifier=True))
def _lnk(obj): return {'from': obj.cfrom, 'to': obj.cto}
def _node(node, short_pred=True):
p =... | Encode the Dmrs as a dictionary suitable for JSON serialization. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/xmrs.py#L1011-L1049 |
delph-in/pydelphin | delphin/mrs/xmrs.py | Dmrs.from_dict | def from_dict(cls, d):
"""
Decode a dictionary, as from :meth:`to_dict`, into a Dmrs object.
"""
def _node(obj):
return Node(
obj.get('nodeid'),
Pred.surface_or_abstract(obj.get('predicate')),
sortinfo=obj.get('sortinfo'),
... | python | def from_dict(cls, d):
"""
Decode a dictionary, as from :meth:`to_dict`, into a Dmrs object.
"""
def _node(obj):
return Node(
obj.get('nodeid'),
Pred.surface_or_abstract(obj.get('predicate')),
sortinfo=obj.get('sortinfo'),
... | Decode a dictionary, as from :meth:`to_dict`, into a Dmrs object. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/xmrs.py#L1052-L1077 |
delph-in/pydelphin | delphin/mrs/xmrs.py | Dmrs.to_triples | def to_triples(self, short_pred=True, properties=True):
"""
Encode the Dmrs as triples suitable for PENMAN serialization.
"""
ts = []
qs = set(self.nodeids(quantifier=True))
for n in nodes(self):
pred = n.pred.short_form() if short_pred else n.pred.string
... | python | def to_triples(self, short_pred=True, properties=True):
"""
Encode the Dmrs as triples suitable for PENMAN serialization.
"""
ts = []
qs = set(self.nodeids(quantifier=True))
for n in nodes(self):
pred = n.pred.short_form() if short_pred else n.pred.string
... | Encode the Dmrs as triples suitable for PENMAN serialization. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/xmrs.py#L1079-L1102 |
delph-in/pydelphin | delphin/mrs/xmrs.py | Dmrs.from_triples | def from_triples(cls, triples, remap_nodeids=True):
"""
Decode triples, as from :meth:`to_triples`, into a Dmrs object.
"""
top_nid = str(LTOP_NODEID)
top = lnk = surface = identifier = None
nids, nd, edges = [], {}, []
for src, rel, tgt in triples:
sr... | python | def from_triples(cls, triples, remap_nodeids=True):
"""
Decode triples, as from :meth:`to_triples`, into a Dmrs object.
"""
top_nid = str(LTOP_NODEID)
top = lnk = surface = identifier = None
nids, nd, edges = [], {}, []
for src, rel, tgt in triples:
sr... | Decode triples, as from :meth:`to_triples`, into a Dmrs object. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/xmrs.py#L1105-L1158 |
luckydonald/pytgbot | pytgbot/api_types/receivable/payments.py | Invoice.to_array | def to_array(self):
"""
Serializes this Invoice to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Invoice, self).to_array()
array['title'] = u(self.title) # py2: type unicode, py3: type str
array['descript... | python | def to_array(self):
"""
Serializes this Invoice to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Invoice, self).to_array()
array['title'] = u(self.title) # py2: type unicode, py3: type str
array['descript... | Serializes this Invoice to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/payments.py#L88-L101 |
luckydonald/pytgbot | pytgbot/api_types/receivable/payments.py | ShippingAddress.to_array | def to_array(self):
"""
Serializes this ShippingAddress to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(ShippingAddress, self).to_array()
array['country_code'] = u(self.country_code) # py2: type unicode, py3: ty... | python | def to_array(self):
"""
Serializes this ShippingAddress to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(ShippingAddress, self).to_array()
array['country_code'] = u(self.country_code) # py2: type unicode, py3: ty... | Serializes this ShippingAddress to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/payments.py#L243-L257 |
luckydonald/pytgbot | pytgbot/api_types/receivable/payments.py | OrderInfo.to_array | def to_array(self):
"""
Serializes this OrderInfo to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(OrderInfo, self).to_array()
if self.name is not None:
array['name'] = u(self.name) # py2: type unicod... | python | def to_array(self):
"""
Serializes this OrderInfo to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(OrderInfo, self).to_array()
if self.name is not None:
array['name'] = u(self.name) # py2: type unicod... | Serializes this OrderInfo to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/payments.py#L377-L393 |
luckydonald/pytgbot | pytgbot/api_types/receivable/payments.py | OrderInfo.from_array | def from_array(array):
"""
Deserialize a new OrderInfo from a given dictionary.
:return: new OrderInfo instance.
:rtype: OrderInfo
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array"... | python | def from_array(array):
"""
Deserialize a new OrderInfo from a given dictionary.
:return: new OrderInfo instance.
:rtype: OrderInfo
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array"... | Deserialize a new OrderInfo from a given dictionary.
:return: new OrderInfo instance.
:rtype: OrderInfo | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/payments.py#L397-L415 |
luckydonald/pytgbot | pytgbot/api_types/receivable/payments.py | SuccessfulPayment.to_array | def to_array(self):
"""
Serializes this SuccessfulPayment to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(SuccessfulPayment, self).to_array()
array['currency'] = u(self.currency) # py2: type unicode, py3: type s... | python | def to_array(self):
"""
Serializes this SuccessfulPayment to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(SuccessfulPayment, self).to_array()
array['currency'] = u(self.currency) # py2: type unicode, py3: type s... | Serializes this SuccessfulPayment to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/payments.py#L544-L561 |
luckydonald/pytgbot | pytgbot/api_types/receivable/payments.py | SuccessfulPayment.from_array | def from_array(array):
"""
Deserialize a new SuccessfulPayment from a given dictionary.
:return: new SuccessfulPayment instance.
:rtype: SuccessfulPayment
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict... | python | def from_array(array):
"""
Deserialize a new SuccessfulPayment from a given dictionary.
:return: new SuccessfulPayment instance.
:rtype: SuccessfulPayment
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict... | Deserialize a new SuccessfulPayment from a given dictionary.
:return: new SuccessfulPayment instance.
:rtype: SuccessfulPayment | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/payments.py#L565-L586 |
luckydonald/pytgbot | pytgbot/api_types/receivable/payments.py | ShippingQuery.to_array | def to_array(self):
"""
Serializes this ShippingQuery to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(ShippingQuery, self).to_array()
array['id'] = u(self.id) # py2: type unicode, py3: type str
array['fr... | python | def to_array(self):
"""
Serializes this ShippingQuery to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(ShippingQuery, self).to_array()
array['id'] = u(self.id) # py2: type unicode, py3: type str
array['fr... | Serializes this ShippingQuery to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/payments.py#L689-L701 |
luckydonald/pytgbot | pytgbot/api_types/receivable/payments.py | ShippingQuery.from_array | def from_array(array):
"""
Deserialize a new ShippingQuery from a given dictionary.
:return: new ShippingQuery instance.
:rtype: ShippingQuery
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_... | python | def from_array(array):
"""
Deserialize a new ShippingQuery from a given dictionary.
:return: new ShippingQuery instance.
:rtype: ShippingQuery
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_... | Deserialize a new ShippingQuery from a given dictionary.
:return: new ShippingQuery instance.
:rtype: ShippingQuery | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/payments.py#L705-L724 |
luckydonald/pytgbot | pytgbot/api_types/receivable/payments.py | PreCheckoutQuery.to_array | def to_array(self):
"""
Serializes this PreCheckoutQuery to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(PreCheckoutQuery, self).to_array()
array['id'] = u(self.id) # py2: type unicode, py3: type str
arr... | python | def to_array(self):
"""
Serializes this PreCheckoutQuery to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(PreCheckoutQuery, self).to_array()
array['id'] = u(self.id) # py2: type unicode, py3: type str
arr... | Serializes this PreCheckoutQuery to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/payments.py#L854-L871 |
luckydonald/pytgbot | pytgbot/api_types/receivable/payments.py | PreCheckoutQuery.from_array | def from_array(array):
"""
Deserialize a new PreCheckoutQuery from a given dictionary.
:return: new PreCheckoutQuery instance.
:rtype: PreCheckoutQuery
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, p... | python | def from_array(array):
"""
Deserialize a new PreCheckoutQuery from a given dictionary.
:return: new PreCheckoutQuery instance.
:rtype: PreCheckoutQuery
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, p... | Deserialize a new PreCheckoutQuery from a given dictionary.
:return: new PreCheckoutQuery instance.
:rtype: PreCheckoutQuery | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/payments.py#L875-L897 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/input_media.py | InputMediaPhoto.to_array | def to_array(self):
"""
Serializes this InputMediaPhoto to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InputMediaPhoto, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type str
... | python | def to_array(self):
"""
Serializes this InputMediaPhoto to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InputMediaPhoto, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type str
... | Serializes this InputMediaPhoto to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/input_media.py#L72-L90 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/input_media.py | InputMediaAnimation.to_array | def to_array(self):
"""
Serializes this InputMediaAnimation to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InputMediaAnimation, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type str
... | python | def to_array(self):
"""
Serializes this InputMediaAnimation to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InputMediaAnimation, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type str
... | Serializes this InputMediaAnimation to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/input_media.py#L457-L490 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/input_media.py | InputMediaAudio.to_array | def to_array(self):
"""
Serializes this InputMediaAudio to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InputMediaAudio, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type str
... | python | def to_array(self):
"""
Serializes this InputMediaAudio to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InputMediaAudio, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type str
... | Serializes this InputMediaAudio to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/input_media.py#L658-L693 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/input_media.py | InputMediaDocument.to_array | def to_array(self):
"""
Serializes this InputMediaDocument to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InputMediaDocument, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type str
... | python | def to_array(self):
"""
Serializes this InputMediaDocument to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InputMediaDocument, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type str
... | Serializes this InputMediaDocument to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/input_media.py#L834-L861 |
delph-in/pydelphin | delphin/mrs/prolog.py | dump | def dump(destination, ms, single=False, pretty_print=False, **kwargs):
"""
Serialize Xmrs objects to the Prolog representation and write to a file.
Args:
destination: filename or file object where data will be written
ms: an iterator of Xmrs objects to serialize (unless the
*sin... | python | def dump(destination, ms, single=False, pretty_print=False, **kwargs):
"""
Serialize Xmrs objects to the Prolog representation and write to a file.
Args:
destination: filename or file object where data will be written
ms: an iterator of Xmrs objects to serialize (unless the
*sin... | Serialize Xmrs objects to the Prolog representation and write to a file.
Args:
destination: filename or file object where data will be written
ms: an iterator of Xmrs objects to serialize (unless the
*single* option is `True`)
single: if `True`, treat *ms* as a single Xmrs objec... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/prolog.py#L32-L53 |
delph-in/pydelphin | delphin/mrs/prolog.py | dumps | def dumps(ms, single=False, pretty_print=False, **kwargs):
"""
Serialize an Xmrs object to the Prolog representation
Args:
ms: an iterator of Xmrs objects to serialize (unless the
*single* option is `True`)
single: if `True`, treat *ms* as a single Xmrs object instead
... | python | def dumps(ms, single=False, pretty_print=False, **kwargs):
"""
Serialize an Xmrs object to the Prolog representation
Args:
ms: an iterator of Xmrs objects to serialize (unless the
*single* option is `True`)
single: if `True`, treat *ms* as a single Xmrs object instead
... | Serialize an Xmrs object to the Prolog representation
Args:
ms: an iterator of Xmrs objects to serialize (unless the
*single* option is `True`)
single: if `True`, treat *ms* as a single Xmrs object instead
of as an iterator
pretty_print: if `True`, add newlines and i... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/prolog.py#L56-L71 |
delph-in/pydelphin | delphin/mrs/vpm.py | load | def load(source, semi=None):
"""
Read a variable-property mapping from *source* and return the VPM.
Args:
source: a filename or file-like object containing the VPM
definitions
semi (:class:`~delphin.mrs.semi.SemI`, optional): if provided,
it is passed to the VPM cons... | python | def load(source, semi=None):
"""
Read a variable-property mapping from *source* and return the VPM.
Args:
source: a filename or file-like object containing the VPM
definitions
semi (:class:`~delphin.mrs.semi.SemI`, optional): if provided,
it is passed to the VPM cons... | Read a variable-property mapping from *source* and return the VPM.
Args:
source: a filename or file-like object containing the VPM
definitions
semi (:class:`~delphin.mrs.semi.SemI`, optional): if provided,
it is passed to the VPM constructor
Returns:
a :class:`VP... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/vpm.py#L25-L41 |
delph-in/pydelphin | delphin/mrs/vpm.py | _valmatch | def _valmatch(vs, ss, op, varsort, semi, section):
"""
Return `True` if for every paired *v* and *s* from *vs* and *ss*:
v <> s (subsumption or equality if *semi* is `None`)
v == s (equality)
s == '*'
s == '!' and v == `None`
s == '[xyz]' and varsort == 'xyz'
"""
... | python | def _valmatch(vs, ss, op, varsort, semi, section):
"""
Return `True` if for every paired *v* and *s* from *vs* and *ss*:
v <> s (subsumption or equality if *semi* is `None`)
v == s (equality)
s == '*'
s == '!' and v == `None`
s == '[xyz]' and varsort == 'xyz'
"""
... | Return `True` if for every paired *v* and *s* from *vs* and *ss*:
v <> s (subsumption or equality if *semi* is `None`)
v == s (equality)
s == '*'
s == '!' and v == `None`
s == '[xyz]' and varsort == 'xyz' | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/vpm.py#L151-L173 |
delph-in/pydelphin | delphin/mrs/vpm.py | VPM.apply | def apply(self, var, props, reverse=False):
"""
Apply the VPM to variable *var* and properties *props*.
Args:
var: a variable
props: a dictionary mapping properties to values
reverse: if `True`, apply the rules in reverse (e.g. from
grammar-ex... | python | def apply(self, var, props, reverse=False):
"""
Apply the VPM to variable *var* and properties *props*.
Args:
var: a variable
props: a dictionary mapping properties to values
reverse: if `True`, apply the rules in reverse (e.g. from
grammar-ex... | Apply the VPM to variable *var* and properties *props*.
Args:
var: a variable
props: a dictionary mapping properties to values
reverse: if `True`, apply the rules in reverse (e.g. from
grammar-external to grammar-internal forms)
Returns:
a... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/vpm.py#L102-L148 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/payments.py | OrderInfo.from_array | def from_array(array):
"""
Deserialize a new OrderInfo from a given dictionary.
:return: new OrderInfo instance.
:rtype: OrderInfo
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array"... | python | def from_array(array):
"""
Deserialize a new OrderInfo from a given dictionary.
:return: new OrderInfo instance.
:rtype: OrderInfo
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array"... | Deserialize a new OrderInfo from a given dictionary.
:return: new OrderInfo instance.
:rtype: OrderInfo | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/payments.py#L411-L431 |
delph-in/pydelphin | delphin/commands.py | convert | def convert(path, source_fmt, target_fmt, select='result:mrs',
properties=True, show_status=False, predicate_modifiers=False,
color=False, pretty_print=False, indent=None):
"""
Convert between various DELPH-IN Semantics representations.
Args:
path (str, file): filename, test... | python | def convert(path, source_fmt, target_fmt, select='result:mrs',
properties=True, show_status=False, predicate_modifiers=False,
color=False, pretty_print=False, indent=None):
"""
Convert between various DELPH-IN Semantics representations.
Args:
path (str, file): filename, test... | Convert between various DELPH-IN Semantics representations.
Args:
path (str, file): filename, testsuite directory, open file, or
stream of input representations
source_fmt (str): convert from this format
target_fmt (str): convert to this format
select (str): TSQL query f... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/commands.py#L29-L127 |
delph-in/pydelphin | delphin/commands.py | select | def select(dataspec, testsuite, mode='list', cast=True):
"""
Select data from [incr tsdb()] profiles.
Args:
query (str): TSQL select query (e.g., `'i-id i-input mrs'` or
`'* from item where readings > 0'`)
testsuite (str, TestSuite): testsuite or path to testsuite
co... | python | def select(dataspec, testsuite, mode='list', cast=True):
"""
Select data from [incr tsdb()] profiles.
Args:
query (str): TSQL select query (e.g., `'i-id i-input mrs'` or
`'* from item where readings > 0'`)
testsuite (str, TestSuite): testsuite or path to testsuite
co... | Select data from [incr tsdb()] profiles.
Args:
query (str): TSQL select query (e.g., `'i-id i-input mrs'` or
`'* from item where readings > 0'`)
testsuite (str, TestSuite): testsuite or path to testsuite
containing data to select
mode (str): see :func:`delphin.itsdb.... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/commands.py#L298-L318 |
delph-in/pydelphin | delphin/commands.py | mkprof | def mkprof(destination, source=None, relations=None, where=None,
in_place=False, skeleton=False, full=False, gzip=False):
"""
Create [incr tsdb()] profiles or skeletons.
Data for the testsuite may come from an existing testsuite or from
a list of sentences. There are four main usage patterns... | python | def mkprof(destination, source=None, relations=None, where=None,
in_place=False, skeleton=False, full=False, gzip=False):
"""
Create [incr tsdb()] profiles or skeletons.
Data for the testsuite may come from an existing testsuite or from
a list of sentences. There are four main usage patterns... | Create [incr tsdb()] profiles or skeletons.
Data for the testsuite may come from an existing testsuite or from
a list of sentences. There are four main usage patterns:
- `source="testsuite/"` -- read data from `testsuite/`
- `source=None, in_place=True` -- read data from *destination*
... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/commands.py#L324-L422 |
delph-in/pydelphin | delphin/commands.py | process | def process(grammar, testsuite, source=None, select=None,
generate=False, transfer=False, options=None,
all_items=False, result_id=None, gzip=False):
"""
Process (e.g., parse) a [incr tsdb()] profile.
Results are written to directly to *testsuite*.
If *select* is `None`, the de... | python | def process(grammar, testsuite, source=None, select=None,
generate=False, transfer=False, options=None,
all_items=False, result_id=None, gzip=False):
"""
Process (e.g., parse) a [incr tsdb()] profile.
Results are written to directly to *testsuite*.
If *select* is `None`, the de... | Process (e.g., parse) a [incr tsdb()] profile.
Results are written to directly to *testsuite*.
If *select* is `None`, the defaults depend on the task:
========== =========================
Task Default value of *select*
========== =========================
Parsing ... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/commands.py#L448-L518 |
delph-in/pydelphin | delphin/commands.py | repp | def repp(file, config=None, module=None, active=None,
format=None, trace_level=0):
"""
Tokenize with a Regular Expression PreProcessor (REPP).
Results are printed directly to stdout. If more programmatic
access is desired, the :mod:`delphin.repp` module provides a
similar interface.
A... | python | def repp(file, config=None, module=None, active=None,
format=None, trace_level=0):
"""
Tokenize with a Regular Expression PreProcessor (REPP).
Results are printed directly to stdout. If more programmatic
access is desired, the :mod:`delphin.repp` module provides a
similar interface.
A... | Tokenize with a Regular Expression PreProcessor (REPP).
Results are printed directly to stdout. If more programmatic
access is desired, the :mod:`delphin.repp` module provides a
similar interface.
Args:
file (str, file): filename, open file, or stream of sentence
inputs
con... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/commands.py#L544-L587 |
delph-in/pydelphin | delphin/commands.py | compare | def compare(testsuite, gold, select='i-id i-input mrs'):
"""
Compare two [incr tsdb()] profiles.
Args:
testsuite (str, TestSuite): path to the test [incr tsdb()]
testsuite or a :class:`TestSuite` object
gold (str, TestSuite): path to the gold [incr tsdb()]
testsuite ... | python | def compare(testsuite, gold, select='i-id i-input mrs'):
"""
Compare two [incr tsdb()] profiles.
Args:
testsuite (str, TestSuite): path to the test [incr tsdb()]
testsuite or a :class:`TestSuite` object
gold (str, TestSuite): path to the gold [incr tsdb()]
testsuite ... | Compare two [incr tsdb()] profiles.
Args:
testsuite (str, TestSuite): path to the test [incr tsdb()]
testsuite or a :class:`TestSuite` object
gold (str, TestSuite): path to the gold [incr tsdb()]
testsuite or a :class:`TestSuite` object
select: TSQL query to select (... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/commands.py#L625-L678 |
delph-in/pydelphin | delphin/mrs/eds.py | non_argument_modifiers | def non_argument_modifiers(role='ARG1', only_connecting=True):
"""
Return a function that finds non-argument modifier dependencies.
Args:
role (str): the role that is assigned to the dependency
only_connecting (bool): if `True`, only return dependencies
that connect separate com... | python | def non_argument_modifiers(role='ARG1', only_connecting=True):
"""
Return a function that finds non-argument modifier dependencies.
Args:
role (str): the role that is assigned to the dependency
only_connecting (bool): if `True`, only return dependencies
that connect separate com... | Return a function that finds non-argument modifier dependencies.
Args:
role (str): the role that is assigned to the dependency
only_connecting (bool): if `True`, only return dependencies
that connect separate components in the basic dependencies;
if `False`, all non-argument... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/eds.py#L277-L332 |
delph-in/pydelphin | delphin/mrs/eds.py | load | def load(fh, single=False):
"""
Deserialize :class:`Eds` from a file (handle or filename)
Args:
fh (str, file): input filename or file object
single (bool): if `True`, only return the first Xmrs object
Returns:
a generator of :class:`Eds` objects (unless the *single* option
... | python | def load(fh, single=False):
"""
Deserialize :class:`Eds` from a file (handle or filename)
Args:
fh (str, file): input filename or file object
single (bool): if `True`, only return the first Xmrs object
Returns:
a generator of :class:`Eds` objects (unless the *single* option
... | Deserialize :class:`Eds` from a file (handle or filename)
Args:
fh (str, file): input filename or file object
single (bool): if `True`, only return the first Xmrs object
Returns:
a generator of :class:`Eds` objects (unless the *single* option
is `True`) | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/eds.py#L370-L385 |
delph-in/pydelphin | delphin/mrs/eds.py | loads | def loads(s, single=False):
"""
Deserialize :class:`Eds` string representations
Args:
s (str): Eds string
single (bool): if `True`, only return the first Xmrs object
Returns:
a generator of :class:`Eds` objects (unless the *single* option
is `True`)
"""
es = dese... | python | def loads(s, single=False):
"""
Deserialize :class:`Eds` string representations
Args:
s (str): Eds string
single (bool): if `True`, only return the first Xmrs object
Returns:
a generator of :class:`Eds` objects (unless the *single* option
is `True`)
"""
es = dese... | Deserialize :class:`Eds` string representations
Args:
s (str): Eds string
single (bool): if `True`, only return the first Xmrs object
Returns:
a generator of :class:`Eds` objects (unless the *single* option
is `True`) | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/eds.py#L388-L402 |
delph-in/pydelphin | delphin/mrs/eds.py | dumps | def dumps(ms, single=False,
properties=False, pretty_print=True,
show_status=False, predicate_modifiers=False, **kwargs):
"""
Serialize an Xmrs object to a Eds representation
Args:
ms: an iterator of :class:`~delphin.mrs.xmrs.Xmrs` objects to
serialize (unless the *s... | python | def dumps(ms, single=False,
properties=False, pretty_print=True,
show_status=False, predicate_modifiers=False, **kwargs):
"""
Serialize an Xmrs object to a Eds representation
Args:
ms: an iterator of :class:`~delphin.mrs.xmrs.Xmrs` objects to
serialize (unless the *s... | Serialize an Xmrs object to a Eds representation
Args:
ms: an iterator of :class:`~delphin.mrs.xmrs.Xmrs` objects to
serialize (unless the *single* option is `True`)
single (bool): if `True`, treat *ms* as a single
:class:`~delphin.mrs.xmrs.Xmrs` object instead of as an
... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/eds.py#L438-L468 |
delph-in/pydelphin | delphin/mrs/eds.py | Eds.from_xmrs | def from_xmrs(cls, xmrs, predicate_modifiers=False, **kwargs):
"""
Instantiate an Eds from an Xmrs (lossy conversion).
Args:
xmrs (:class:`~delphin.mrs.xmrs.Xmrs`): Xmrs instance to
convert from
predicate_modifiers (function, bool): function that is
... | python | def from_xmrs(cls, xmrs, predicate_modifiers=False, **kwargs):
"""
Instantiate an Eds from an Xmrs (lossy conversion).
Args:
xmrs (:class:`~delphin.mrs.xmrs.Xmrs`): Xmrs instance to
convert from
predicate_modifiers (function, bool): function that is
... | Instantiate an Eds from an Xmrs (lossy conversion).
Args:
xmrs (:class:`~delphin.mrs.xmrs.Xmrs`): Xmrs instance to
convert from
predicate_modifiers (function, bool): function that is
called as `func(xmrs, deps)` after finding the basic
dep... | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/eds.py#L67-L110 |
delph-in/pydelphin | delphin/mrs/eds.py | Eds.nodes | def nodes(self):
"""Return the list of nodes."""
getnode = self._nodes.__getitem__
return [getnode(nid) for nid in self._nodeids] | python | def nodes(self):
"""Return the list of nodes."""
getnode = self._nodes.__getitem__
return [getnode(nid) for nid in self._nodeids] | Return the list of nodes. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/eds.py#L129-L132 |
delph-in/pydelphin | delphin/mrs/eds.py | Eds.to_dict | def to_dict(self, properties=True):
"""
Encode the Eds as a dictionary suitable for JSON serialization.
"""
nodes = {}
for node in self.nodes():
nd = {
'label': node.pred.short_form(),
'edges': self.edges(node.nodeid)
}
... | python | def to_dict(self, properties=True):
"""
Encode the Eds as a dictionary suitable for JSON serialization.
"""
nodes = {}
for node in self.nodes():
nd = {
'label': node.pred.short_form(),
'edges': self.edges(node.nodeid)
}
... | Encode the Eds as a dictionary suitable for JSON serialization. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/eds.py#L138-L159 |
delph-in/pydelphin | delphin/mrs/eds.py | Eds.from_dict | def from_dict(cls, d):
"""
Decode a dictionary, as from :meth:`to_dict`, into an Eds object.
"""
makepred, charspan = Pred.surface_or_abstract, Lnk.charspan
top = d.get('top')
nodes, edges = [], []
for nid, node in d.get('nodes', {}).items():
props = n... | python | def from_dict(cls, d):
"""
Decode a dictionary, as from :meth:`to_dict`, into an Eds object.
"""
makepred, charspan = Pred.surface_or_abstract, Lnk.charspan
top = d.get('top')
nodes, edges = [], []
for nid, node in d.get('nodes', {}).items():
props = n... | Decode a dictionary, as from :meth:`to_dict`, into an Eds object. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/eds.py#L162-L192 |
delph-in/pydelphin | delphin/mrs/eds.py | Eds.to_triples | def to_triples(self, short_pred=True, properties=True):
"""
Encode the Eds as triples suitable for PENMAN serialization.
"""
node_triples, edge_triples = [], []
# sort nodeids just so top var is first
nodes = sorted(self.nodes(), key=lambda n: n.nodeid != self.top)
... | python | def to_triples(self, short_pred=True, properties=True):
"""
Encode the Eds as triples suitable for PENMAN serialization.
"""
node_triples, edge_triples = [], []
# sort nodeids just so top var is first
nodes = sorted(self.nodes(), key=lambda n: n.nodeid != self.top)
... | Encode the Eds as triples suitable for PENMAN serialization. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/eds.py#L194-L221 |
delph-in/pydelphin | delphin/mrs/eds.py | Eds.from_triples | def from_triples(cls, triples):
"""
Decode triples, as from :meth:`to_triples`, into an Eds object.
"""
nids, nd, edges = [], {}, []
for src, rel, tgt in triples:
if src not in nd:
nids.append(src)
nd[src] = {'pred': None, 'lnk': None, ... | python | def from_triples(cls, triples):
"""
Decode triples, as from :meth:`to_triples`, into an Eds object.
"""
nids, nd, edges = [], {}, []
for src, rel, tgt in triples:
if src not in nd:
nids.append(src)
nd[src] = {'pred': None, 'lnk': None, ... | Decode triples, as from :meth:`to_triples`, into an Eds object. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/mrs/eds.py#L224-L258 |
delph-in/pydelphin | delphin/util.py | LookaheadIterator.next | def next(self, skip=None):
"""
Remove the next datum from the buffer and return it.
"""
buffer = self._buffer
popleft = buffer.popleft
if skip is not None:
while True:
try:
if not skip(buffer[0]):
bre... | python | def next(self, skip=None):
"""
Remove the next datum from the buffer and return it.
"""
buffer = self._buffer
popleft = buffer.popleft
if skip is not None:
while True:
try:
if not skip(buffer[0]):
bre... | Remove the next datum from the buffer and return it. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/util.py#L266-L285 |
delph-in/pydelphin | delphin/util.py | LookaheadIterator.peek | def peek(self, n=0, skip=None, drop=False):
"""
Return the *n*th datum from the buffer.
"""
buffer = self._buffer
popleft = buffer.popleft
datum = None
if skip is not None:
stack = []
stackpush = stack.append
while n >= 0:
... | python | def peek(self, n=0, skip=None, drop=False):
"""
Return the *n*th datum from the buffer.
"""
buffer = self._buffer
popleft = buffer.popleft
datum = None
if skip is not None:
stack = []
stackpush = stack.append
while n >= 0:
... | Return the *n*th datum from the buffer. | https://github.com/delph-in/pydelphin/blob/7bd2cd63ab7cf74803e1d6547b9ebc014b382abd/delphin/util.py#L287-L312 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/inline.py | InlineQueryResultPhoto.to_array | def to_array(self):
"""
Serializes this InlineQueryResultPhoto to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultPhoto, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type... | python | def to_array(self):
"""
Serializes this InlineQueryResultPhoto to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultPhoto, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type... | Serializes this InlineQueryResultPhoto to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/inline.py#L374-L412 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/inline.py | InlineQueryResultMpeg4Gif.to_array | def to_array(self):
"""
Serializes this InlineQueryResultMpeg4Gif to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultMpeg4Gif, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3... | python | def to_array(self):
"""
Serializes this InlineQueryResultMpeg4Gif to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultMpeg4Gif, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3... | Serializes this InlineQueryResultMpeg4Gif to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/inline.py#L853-L890 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/inline.py | InlineQueryResultVideo.to_array | def to_array(self):
"""
Serializes this InlineQueryResultVideo to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultVideo, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type... | python | def to_array(self):
"""
Serializes this InlineQueryResultVideo to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultVideo, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type... | Serializes this InlineQueryResultVideo to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/inline.py#L1114-L1155 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/inline.py | InlineQueryResultVoice.to_array | def to_array(self):
"""
Serializes this InlineQueryResultVoice to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultVoice, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type... | python | def to_array(self):
"""
Serializes this InlineQueryResultVoice to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultVoice, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type... | Serializes this InlineQueryResultVoice to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/inline.py#L1551-L1581 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/inline.py | InlineQueryResultDocument.to_array | def to_array(self):
"""
Serializes this InlineQueryResultDocument to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultDocument, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3... | python | def to_array(self):
"""
Serializes this InlineQueryResultDocument to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultDocument, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3... | Serializes this InlineQueryResultDocument to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/inline.py#L1791-L1831 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/inline.py | InlineQueryResultVenue.to_array | def to_array(self):
"""
Serializes this InlineQueryResultVenue to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultVenue, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type... | python | def to_array(self):
"""
Serializes this InlineQueryResultVenue to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultVenue, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type... | Serializes this InlineQueryResultVenue to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/inline.py#L2270-L2307 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/inline.py | InlineQueryResultGame.to_array | def to_array(self):
"""
Serializes this InlineQueryResultGame to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultGame, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type s... | python | def to_array(self):
"""
Serializes this InlineQueryResultGame to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultGame, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type s... | Serializes this InlineQueryResultGame to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/inline.py#L2668-L2685 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/inline.py | InlineQueryResultCachedPhoto.to_array | def to_array(self):
"""
Serializes this InlineQueryResultCachedPhoto to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultCachedPhoto, self).to_array()
array['type'] = u(self.type) # py2: type unicod... | python | def to_array(self):
"""
Serializes this InlineQueryResultCachedPhoto to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultCachedPhoto, self).to_array()
array['type'] = u(self.type) # py2: type unicod... | Serializes this InlineQueryResultCachedPhoto to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/inline.py#L2851-L2883 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/inline.py | InlineQueryResultCachedMpeg4Gif.to_array | def to_array(self):
"""
Serializes this InlineQueryResultCachedMpeg4Gif to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultCachedMpeg4Gif, self).to_array()
array['type'] = u(self.type) # py2: type ... | python | def to_array(self):
"""
Serializes this InlineQueryResultCachedMpeg4Gif to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultCachedMpeg4Gif, self).to_array()
array['type'] = u(self.type) # py2: type ... | Serializes this InlineQueryResultCachedMpeg4Gif to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/inline.py#L3237-L3266 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/inline.py | InlineQueryResultCachedSticker.to_array | def to_array(self):
"""
Serializes this InlineQueryResultCachedSticker to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultCachedSticker, self).to_array()
array['type'] = u(self.type) # py2: type un... | python | def to_array(self):
"""
Serializes this InlineQueryResultCachedSticker to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultCachedSticker, self).to_array()
array['type'] = u(self.type) # py2: type un... | Serializes this InlineQueryResultCachedSticker to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/inline.py#L3403-L3423 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/inline.py | InlineQueryResultCachedVideo.to_array | def to_array(self):
"""
Serializes this InlineQueryResultCachedVideo to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultCachedVideo, self).to_array()
array['type'] = u(self.type) # py2: type unicod... | python | def to_array(self):
"""
Serializes this InlineQueryResultCachedVideo to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultCachedVideo, self).to_array()
array['type'] = u(self.type) # py2: type unicod... | Serializes this InlineQueryResultCachedVideo to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/inline.py#L3796-L3827 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/inline.py | InlineQueryResultCachedAudio.to_array | def to_array(self):
"""
Serializes this InlineQueryResultCachedAudio to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultCachedAudio, self).to_array()
array['type'] = u(self.type) # py2: type unicod... | python | def to_array(self):
"""
Serializes this InlineQueryResultCachedAudio to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineQueryResultCachedAudio, self).to_array()
array['type'] = u(self.type) # py2: type unicod... | Serializes this InlineQueryResultCachedAudio to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/inline.py#L4175-L4201 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | MessageEntity.to_array | def to_array(self):
"""
Serializes this MessageEntity to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(MessageEntity, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type str
arra... | python | def to_array(self):
"""
Serializes this MessageEntity to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(MessageEntity, self).to_array()
array['type'] = u(self.type) # py2: type unicode, py3: type str
arra... | Serializes this MessageEntity to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L92-L110 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | PhotoSize.to_array | def to_array(self):
"""
Serializes this PhotoSize to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(PhotoSize, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
array[... | python | def to_array(self):
"""
Serializes this PhotoSize to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(PhotoSize, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
array[... | Serializes this PhotoSize to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L235-L249 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Audio.to_array | def to_array(self):
"""
Serializes this Audio to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Audio, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
array['duratio... | python | def to_array(self):
"""
Serializes this Audio to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Audio, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
array['duratio... | Serializes this Audio to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L400-L425 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Audio.from_array | def from_array(array):
"""
Deserialize a new Audio from a given dictionary.
:return: new Audio instance.
:rtype: Audio
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
fr... | python | def from_array(array):
"""
Deserialize a new Audio from a given dictionary.
:return: new Audio instance.
:rtype: Audio
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
fr... | Deserialize a new Audio from a given dictionary.
:return: new Audio instance.
:rtype: Audio | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L429-L452 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Document.to_array | def to_array(self):
"""
Serializes this Document to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Document, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
if self.... | python | def to_array(self):
"""
Serializes this Document to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Document, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
if self.... | Serializes this Document to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L563-L584 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Animation.to_array | def to_array(self):
"""
Serializes this Animation to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Animation, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
array[... | python | def to_array(self):
"""
Serializes this Animation to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Animation, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
array[... | Serializes this Animation to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L924-L948 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Voice.to_array | def to_array(self):
"""
Serializes this Voice to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Voice, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
array['duratio... | python | def to_array(self):
"""
Serializes this Voice to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Voice, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
array['duratio... | Serializes this Voice to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L1076-L1092 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | VideoNote.to_array | def to_array(self):
"""
Serializes this VideoNote to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(VideoNote, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
array[... | python | def to_array(self):
"""
Serializes this VideoNote to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(VideoNote, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
array[... | Serializes this VideoNote to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L1225-L1242 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Contact.to_array | def to_array(self):
"""
Serializes this Contact to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Contact, self).to_array()
array['phone_number'] = u(self.phone_number) # py2: type unicode, py3: type str
... | python | def to_array(self):
"""
Serializes this Contact to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Contact, self).to_array()
array['phone_number'] = u(self.phone_number) # py2: type unicode, py3: type str
... | Serializes this Contact to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L1376-L1396 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Location.to_array | def to_array(self):
"""
Serializes this Location to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Location, self).to_array()
array['longitude'] = float(self.longitude) # type float
array['latitude'] = flo... | python | def to_array(self):
"""
Serializes this Location to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Location, self).to_array()
array['longitude'] = float(self.longitude) # type float
array['latitude'] = flo... | Serializes this Location to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L1501-L1511 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Location.from_array | def from_array(array):
"""
Deserialize a new Location from a given dictionary.
:return: new Location instance.
:rtype: Location
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
... | python | def from_array(array):
"""
Deserialize a new Location from a given dictionary.
:return: new Location instance.
:rtype: Location
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
... | Deserialize a new Location from a given dictionary.
:return: new Location instance.
:rtype: Location | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L1515-L1531 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Venue.to_array | def to_array(self):
"""
Serializes this Venue to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Venue, self).to_array()
array['location'] = self.location.to_array() # type Location
array['title'] = u(self... | python | def to_array(self):
"""
Serializes this Venue to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Venue, self).to_array()
array['location'] = self.location.to_array() # type Location
array['title'] = u(self... | Serializes this Venue to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L1642-L1662 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Venue.from_array | def from_array(array):
"""
Deserialize a new Venue from a given dictionary.
:return: new Venue instance.
:rtype: Venue
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
fr... | python | def from_array(array):
"""
Deserialize a new Venue from a given dictionary.
:return: new Venue instance.
:rtype: Venue
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
fr... | Deserialize a new Venue from a given dictionary.
:return: new Venue instance.
:rtype: Venue | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L1666-L1687 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | UserProfilePhotos.to_array | def to_array(self):
"""
Serializes this UserProfilePhotos to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(UserProfilePhotos, self).to_array()
array['total_count'] = int(self.total_count) # type int
array... | python | def to_array(self):
"""
Serializes this UserProfilePhotos to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(UserProfilePhotos, self).to_array()
array['total_count'] = int(self.total_count) # type int
array... | Serializes this UserProfilePhotos to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L1771-L1782 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | UserProfilePhotos.from_array | def from_array(array):
"""
Deserialize a new UserProfilePhotos from a given dictionary.
:return: new UserProfilePhotos instance.
:rtype: UserProfilePhotos
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict... | python | def from_array(array):
"""
Deserialize a new UserProfilePhotos from a given dictionary.
:return: new UserProfilePhotos instance.
:rtype: UserProfilePhotos
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict... | Deserialize a new UserProfilePhotos from a given dictionary.
:return: new UserProfilePhotos instance.
:rtype: UserProfilePhotos | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L1786-L1804 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | File.to_array | def to_array(self):
"""
Serializes this File to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(File, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
if self.file_siz... | python | def to_array(self):
"""
Serializes this File to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(File, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
if self.file_siz... | Serializes this File to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L1899-L1914 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | ChatPhoto.to_array | def to_array(self):
"""
Serializes this ChatPhoto to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(ChatPhoto, self).to_array()
array['small_file_id'] = u(self.small_file_id) # py2: type unicode, py3: type str
... | python | def to_array(self):
"""
Serializes this ChatPhoto to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(ChatPhoto, self).to_array()
array['small_file_id'] = u(self.small_file_id) # py2: type unicode, py3: type str
... | Serializes this ChatPhoto to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L2017-L2029 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Sticker.to_array | def to_array(self):
"""
Serializes this Sticker to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Sticker, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
array['wid... | python | def to_array(self):
"""
Serializes this Sticker to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Sticker, self).to_array()
array['file_id'] = u(self.file_id) # py2: type unicode, py3: type str
array['wid... | Serializes this Sticker to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L2188-L2214 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Sticker.from_array | def from_array(array):
"""
Deserialize a new Sticker from a given dictionary.
:return: new Sticker instance.
:rtype: Sticker
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
... | python | def from_array(array):
"""
Deserialize a new Sticker from a given dictionary.
:return: new Sticker instance.
:rtype: Sticker
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
... | Deserialize a new Sticker from a given dictionary.
:return: new Sticker instance.
:rtype: Sticker | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L2218-L2243 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Game.to_array | def to_array(self):
"""
Serializes this Game to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Game, self).to_array()
array['title'] = u(self.title) # py2: type unicode, py3: type str
array['description']... | python | def to_array(self):
"""
Serializes this Game to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(Game, self).to_array()
array['title'] = u(self.title) # py2: type unicode, py3: type str
array['description']... | Serializes this Game to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L2365-L2388 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/receivable/media.py | Game.from_array | def from_array(array):
"""
Deserialize a new Game from a given dictionary.
:return: new Game instance.
:rtype: Game
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
from ... | python | def from_array(array):
"""
Deserialize a new Game from a given dictionary.
:return: new Game instance.
:rtype: Game
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
from ... | Deserialize a new Game from a given dictionary.
:return: new Game instance.
:rtype: Game | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/receivable/media.py#L2392-L2416 |
luckydonald/pytgbot | pytgbot/api_types/receivable/media.py | DownloadableMedia.from_array | def from_array(array):
"""
Subclass for all :class:`Media` which has a :py:attr:`file_id` and optionally a :py:attr:`file_size`
:param array: a array to parse
:type array: dict
:return: a dict with file_id and file_size extracted from the array
:rtype: dict
"""
... | python | def from_array(array):
"""
Subclass for all :class:`Media` which has a :py:attr:`file_id` and optionally a :py:attr:`file_size`
:param array: a array to parse
:type array: dict
:return: a dict with file_id and file_size extracted from the array
:rtype: dict
"""
... | Subclass for all :class:`Media` which has a :py:attr:`file_id` and optionally a :py:attr:`file_size`
:param array: a array to parse
:type array: dict
:return: a dict with file_id and file_size extracted from the array
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/media.py#L165-L176 |
luckydonald/pytgbot | pytgbot/api_types/receivable/media.py | Sticker.from_array | def from_array(array):
"""
Deserialize a new Sticker from a given dictionary.
:return: new Sticker instance.
:rtype: Sticker
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
... | python | def from_array(array):
"""
Deserialize a new Sticker from a given dictionary.
:return: new Sticker instance.
:rtype: Sticker
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
... | Deserialize a new Sticker from a given dictionary.
:return: new Sticker instance.
:rtype: Sticker | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/media.py#L965-L989 |
luckydonald/pytgbot | pytgbot/api_types/receivable/media.py | VideoNote.from_array | def from_array(array):
"""
Deserialize a new VideoNote from a given dictionary.
:return: new VideoNote instance.
:rtype: VideoNote
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array"... | python | def from_array(array):
"""
Deserialize a new VideoNote from a given dictionary.
:return: new VideoNote instance.
:rtype: VideoNote
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array"... | Deserialize a new VideoNote from a given dictionary.
:return: new VideoNote instance.
:rtype: VideoNote | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/media.py#L1428-L1447 |
luckydonald/pytgbot | pytgbot/api_types/receivable/media.py | Venue.from_array | def from_array(array):
"""
Deserialize a new Venue from a given dictionary.
:return: new Venue instance.
:rtype: Venue
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
d... | python | def from_array(array):
"""
Deserialize a new Venue from a given dictionary.
:return: new Venue instance.
:rtype: Venue
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
d... | Deserialize a new Venue from a given dictionary.
:return: new Venue instance.
:rtype: Venue | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/media.py#L1837-L1856 |
luckydonald/pytgbot | pytgbot/api_types/receivable/media.py | UserProfilePhotos.from_array | def from_array(array):
"""
Deserialize a new UserProfilePhotos from a given dictionary.
:return: new UserProfilePhotos instance.
:rtype: UserProfilePhotos
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict... | python | def from_array(array):
"""
Deserialize a new UserProfilePhotos from a given dictionary.
:return: new UserProfilePhotos instance.
:rtype: UserProfilePhotos
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict... | Deserialize a new UserProfilePhotos from a given dictionary.
:return: new UserProfilePhotos instance.
:rtype: UserProfilePhotos | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/media.py#L1953-L1969 |
luckydonald/pytgbot | pytgbot/api_types/receivable/media.py | Game.from_array | def from_array(array):
"""
Deserialize a new Game from a given dictionary.
:return: new Game instance.
:rtype: Game
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
data... | python | def from_array(array):
"""
Deserialize a new Game from a given dictionary.
:return: new Game instance.
:rtype: Game
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="array")
data... | Deserialize a new Game from a given dictionary.
:return: new Game instance.
:rtype: Game | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/receivable/media.py#L2371-L2391 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/reply_markup.py | ReplyKeyboardMarkup.to_array | def to_array(self):
"""
Serializes this ReplyKeyboardMarkup to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(ReplyKeyboardMarkup, self).to_array()
array['keyboard'] = self._as_array(self.keyboard) # type list of ... | python | def to_array(self):
"""
Serializes this ReplyKeyboardMarkup to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(ReplyKeyboardMarkup, self).to_array()
array['keyboard'] = self._as_array(self.keyboard) # type list of ... | Serializes this ReplyKeyboardMarkup to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/reply_markup.py#L74-L90 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/reply_markup.py | ReplyKeyboardMarkup.from_array | def from_array(array):
"""
Deserialize a new ReplyKeyboardMarkup from a given dictionary.
:return: new ReplyKeyboardMarkup instance.
:rtype: ReplyKeyboardMarkup
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array... | python | def from_array(array):
"""
Deserialize a new ReplyKeyboardMarkup from a given dictionary.
:return: new ReplyKeyboardMarkup instance.
:rtype: ReplyKeyboardMarkup
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array... | Deserialize a new ReplyKeyboardMarkup from a given dictionary.
:return: new ReplyKeyboardMarkup instance.
:rtype: ReplyKeyboardMarkup | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/reply_markup.py#L94-L116 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/reply_markup.py | KeyboardButton.to_array | def to_array(self):
"""
Serializes this KeyboardButton to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(KeyboardButton, self).to_array()
array['text'] = u(self.text) # py2: type unicode, py3: type str
if... | python | def to_array(self):
"""
Serializes this KeyboardButton to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(KeyboardButton, self).to_array()
array['text'] = u(self.text) # py2: type unicode, py3: type str
if... | Serializes this KeyboardButton to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/reply_markup.py#L201-L215 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/reply_markup.py | KeyboardButton.from_array | def from_array(array):
"""
Deserialize a new KeyboardButton from a given dictionary.
:return: new KeyboardButton instance.
:rtype: KeyboardButton
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, paramet... | python | def from_array(array):
"""
Deserialize a new KeyboardButton from a given dictionary.
:return: new KeyboardButton instance.
:rtype: KeyboardButton
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, paramet... | Deserialize a new KeyboardButton from a given dictionary.
:return: new KeyboardButton instance.
:rtype: KeyboardButton | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/reply_markup.py#L219-L238 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/reply_markup.py | ReplyKeyboardRemove.to_array | def to_array(self):
"""
Serializes this ReplyKeyboardRemove to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(ReplyKeyboardRemove, self).to_array()
array['remove_keyboard'] = bool(self.remove_keyboard) # type bool... | python | def to_array(self):
"""
Serializes this ReplyKeyboardRemove to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(ReplyKeyboardRemove, self).to_array()
array['remove_keyboard'] = bool(self.remove_keyboard) # type bool... | Serializes this ReplyKeyboardRemove to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/reply_markup.py#L312-L323 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/reply_markup.py | InlineKeyboardMarkup.to_array | def to_array(self):
"""
Serializes this InlineKeyboardMarkup to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineKeyboardMarkup, self).to_array()
array['inline_keyboard'] = self._as_array(self.inline_keyboard) ... | python | def to_array(self):
"""
Serializes this InlineKeyboardMarkup to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineKeyboardMarkup, self).to_array()
array['inline_keyboard'] = self._as_array(self.inline_keyboard) ... | Serializes this InlineKeyboardMarkup to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/reply_markup.py#L414-L424 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/reply_markup.py | InlineKeyboardMarkup.from_array | def from_array(array):
"""
Deserialize a new InlineKeyboardMarkup from a given dictionary.
:return: new InlineKeyboardMarkup instance.
:rtype: InlineKeyboardMarkup
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(ar... | python | def from_array(array):
"""
Deserialize a new InlineKeyboardMarkup from a given dictionary.
:return: new InlineKeyboardMarkup instance.
:rtype: InlineKeyboardMarkup
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(ar... | Deserialize a new InlineKeyboardMarkup from a given dictionary.
:return: new InlineKeyboardMarkup instance.
:rtype: InlineKeyboardMarkup | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/reply_markup.py#L428-L447 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/reply_markup.py | InlineKeyboardButton.to_array | def to_array(self):
"""
Serializes this InlineKeyboardButton to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineKeyboardButton, self).to_array()
array['text'] = u(self.text) # py2: type unicode, py3: type str... | python | def to_array(self):
"""
Serializes this InlineKeyboardButton to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(InlineKeyboardButton, self).to_array()
array['text'] = u(self.text) # py2: type unicode, py3: type str... | Serializes this InlineKeyboardButton to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/reply_markup.py#L568-L595 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/reply_markup.py | InlineKeyboardButton.from_array | def from_array(array):
"""
Deserialize a new InlineKeyboardButton from a given dictionary.
:return: new InlineKeyboardButton instance.
:rtype: InlineKeyboardButton
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(ar... | python | def from_array(array):
"""
Deserialize a new InlineKeyboardButton from a given dictionary.
:return: new InlineKeyboardButton instance.
:rtype: InlineKeyboardButton
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(ar... | Deserialize a new InlineKeyboardButton from a given dictionary.
:return: new InlineKeyboardButton instance.
:rtype: InlineKeyboardButton | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/reply_markup.py#L599-L624 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/reply_markup.py | ForceReply.to_array | def to_array(self):
"""
Serializes this ForceReply to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(ForceReply, self).to_array()
array['force_reply'] = bool(self.force_reply) # type bool
if self.selective... | python | def to_array(self):
"""
Serializes this ForceReply to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(ForceReply, self).to_array()
array['force_reply'] = bool(self.force_reply) # type bool
if self.selective... | Serializes this ForceReply to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/reply_markup.py#L706-L717 |
luckydonald/pytgbot | code_generation/output/pytgbot/api_types/sendable/reply_markup.py | ForceReply.from_array | def from_array(array):
"""
Deserialize a new ForceReply from a given dictionary.
:return: new ForceReply instance.
:rtype: ForceReply
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="arr... | python | def from_array(array):
"""
Deserialize a new ForceReply from a given dictionary.
:return: new ForceReply instance.
:rtype: ForceReply
"""
if array is None or not array:
return None
# end if
assert_type_or_raise(array, dict, parameter_name="arr... | Deserialize a new ForceReply from a given dictionary.
:return: new ForceReply instance.
:rtype: ForceReply | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/code_generation/output/pytgbot/api_types/sendable/reply_markup.py#L721-L739 |
luckydonald/pytgbot | pytgbot/api_types/sendable/passport.py | PassportElementErrorDataField.to_array | def to_array(self):
"""
Serializes this PassportElementErrorDataField to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(PassportElementErrorDataField, self).to_array()
array['source'] = u(self.source) # py2: type ... | python | def to_array(self):
"""
Serializes this PassportElementErrorDataField to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(PassportElementErrorDataField, self).to_array()
array['source'] = u(self.source) # py2: type ... | Serializes this PassportElementErrorDataField to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/sendable/passport.py#L91-L104 |
luckydonald/pytgbot | pytgbot/api_types/sendable/passport.py | PassportElementErrorReverseSide.to_array | def to_array(self):
"""
Serializes this PassportElementErrorReverseSide to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(PassportElementErrorReverseSide, self).to_array()
array['source'] = u(self.source) # py2: t... | python | def to_array(self):
"""
Serializes this PassportElementErrorReverseSide to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(PassportElementErrorReverseSide, self).to_array()
array['source'] = u(self.source) # py2: t... | Serializes this PassportElementErrorReverseSide to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/sendable/passport.py#L351-L363 |
luckydonald/pytgbot | pytgbot/api_types/sendable/passport.py | PassportElementErrorFiles.to_array | def to_array(self):
"""
Serializes this PassportElementErrorFiles to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(PassportElementErrorFiles, self).to_array()
array['source'] = u(self.source) # py2: type unicode,... | python | def to_array(self):
"""
Serializes this PassportElementErrorFiles to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(PassportElementErrorFiles, self).to_array()
array['source'] = u(self.source) # py2: type unicode,... | Serializes this PassportElementErrorFiles to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/sendable/passport.py#L738-L750 |
luckydonald/pytgbot | pytgbot/api_types/sendable/passport.py | PassportElementErrorFiles.from_array | def from_array(array):
"""
Deserialize a new PassportElementErrorFiles from a given dictionary.
:return: new PassportElementErrorFiles instance.
:rtype: PassportElementErrorFiles
"""
if array is None or not array:
return None
# end if
assert_t... | python | def from_array(array):
"""
Deserialize a new PassportElementErrorFiles from a given dictionary.
:return: new PassportElementErrorFiles instance.
:rtype: PassportElementErrorFiles
"""
if array is None or not array:
return None
# end if
assert_t... | Deserialize a new PassportElementErrorFiles from a given dictionary.
:return: new PassportElementErrorFiles instance.
:rtype: PassportElementErrorFiles | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/sendable/passport.py#L754-L774 |
luckydonald/pytgbot | pytgbot/api_types/sendable/passport.py | PassportElementErrorUnspecified.to_array | def to_array(self):
"""
Serializes this PassportElementErrorUnspecified to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(PassportElementErrorUnspecified, self).to_array()
array['source'] = u(self.source) # py2: t... | python | def to_array(self):
"""
Serializes this PassportElementErrorUnspecified to a dictionary.
:return: dictionary representation of this object.
:rtype: dict
"""
array = super(PassportElementErrorUnspecified, self).to_array()
array['source'] = u(self.source) # py2: t... | Serializes this PassportElementErrorUnspecified to a dictionary.
:return: dictionary representation of this object.
:rtype: dict | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/sendable/passport.py#L1130-L1146 |
luckydonald/pytgbot | pytgbot/api_types/sendable/passport.py | PassportElementErrorUnspecified.from_array | def from_array(array):
"""
Deserialize a new PassportElementErrorUnspecified from a given dictionary.
:return: new PassportElementErrorUnspecified instance.
:rtype: PassportElementErrorUnspecified
"""
if array is None or not array:
return None
# end i... | python | def from_array(array):
"""
Deserialize a new PassportElementErrorUnspecified from a given dictionary.
:return: new PassportElementErrorUnspecified instance.
:rtype: PassportElementErrorUnspecified
"""
if array is None or not array:
return None
# end i... | Deserialize a new PassportElementErrorUnspecified from a given dictionary.
:return: new PassportElementErrorUnspecified instance.
:rtype: PassportElementErrorUnspecified | https://github.com/luckydonald/pytgbot/blob/67f4b5a1510d4583d40b5477e876b1ef0eb8971b/pytgbot/api_types/sendable/passport.py#L1150-L1170 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.