index int64 0 731k | package stringlengths 2 98 ⌀ | name stringlengths 1 76 | docstring stringlengths 0 281k ⌀ | code stringlengths 4 8.19k | signature stringlengths 2 42.8k ⌀ | embed_func_code listlengths 768 768 |
|---|---|---|---|---|---|---|
721,919 | apprise.asset | __init__ |
Asset Initialization
| def __init__(self, plugin_paths=None, **kwargs):
"""
Asset Initialization
"""
# Assign default arguments if specified
for key, value in kwargs.items():
if not hasattr(AppriseAsset, key):
raise AttributeError(
'AppriseAsset init(): '
'An invalid key... | (self, plugin_paths=None, **kwargs) | [
-0.00849927682429552,
-0.08776506781578064,
-0.010140768252313137,
0.021211715415120125,
0.006023361347615719,
-0.004067250527441502,
0.02914559096097946,
0.07645701617002487,
-0.0507403202354908,
0.0302034392952919,
0.03501848131418228,
0.08951599150896072,
-0.015065242536365986,
0.001414... |
721,920 | apprise.asset | ascii |
Returns an ascii representation based on passed in notify type
| def ascii(self, notify_type):
"""
Returns an ascii representation based on passed in notify type
"""
# look our response up
return self.ascii_notify_map.get(notify_type, self.default_html_color)
| (self, notify_type) | [
-0.010234707966446877,
-0.0612025260925293,
0.012291936203837395,
-0.047521959990262985,
0.05441367253661156,
-0.03740725666284561,
-0.019097931683063507,
0.03212704136967659,
0.07070006430149078,
-0.04515615105628967,
0.028766902163624763,
0.012643379159271717,
0.017555009573698044,
-0.01... |
721,921 | apprise.asset | color |
Returns an HTML mapped color based on passed in notify type
if color_type is:
None then a standard hex string is returned as
a string format ('#000000').
int then the integer representation is returned
tuple then the the red, green, blue is... | def color(self, notify_type, color_type=None):
"""
Returns an HTML mapped color based on passed in notify type
if color_type is:
None then a standard hex string is returned as
a string format ('#000000').
int then the integer representation is returned
tuple then... | (self, notify_type, color_type=None) | [
0.0010517829796299338,
-0.07658623158931732,
-0.003011612920090556,
-0.000790548394434154,
0.026520445942878723,
-0.05552319064736366,
0.007337383925914764,
0.0033150557428598404,
0.02075275033712387,
-0.018361711874604225,
0.016527365893125534,
0.025224540382623672,
0.05059509724378586,
-... |
721,922 | apprise.asset | details |
Returns the details associated with the AppriseAsset object
| def details(self):
"""
Returns the details associated with the AppriseAsset object
"""
return {
'app_id': self.app_id,
'app_desc': self.app_desc,
'default_extension': self.default_extension,
'theme': self.theme,
'image_path_mask': self.image_path_mask,
'im... | (self) | [
0.03521301969885826,
-0.06738849729299545,
-0.03729429841041565,
0.0009463030146434903,
0.034688010811805725,
-0.05996338278055191,
0.0161533635109663,
-0.0223128292709589,
0.022500332444906235,
0.03933807834982872,
-0.001396895619109273,
0.01844089664518833,
-0.0020883120596408844,
-0.026... |
721,923 | apprise.asset | hex_to_int |
Takes a hex string (such as #00ff00) and returns its integer
equivalent
eg: #00000f becomes : 15
| @staticmethod
def hex_to_int(value):
"""
Takes a hex string (such as #00ff00) and returns its integer
equivalent
eg: #00000f becomes : 15
"""
return int(value.lstrip('#'), 16)
| (value) | [
-0.01111648790538311,
-0.05335913971066475,
0.0026545803993940353,
0.002103368518874049,
0.0004041834909003228,
-0.009714242070913315,
0.05583152174949646,
0.0907769650220871,
-0.0040014744736254215,
-0.0408865325152874,
0.039742596447467804,
0.010507618077099323,
0.05236280709505081,
-0.0... |
721,924 | apprise.asset | hex_to_rgb |
Takes a hex string (such as #00ff00) and returns a tuple in the form
of (red, green, blue)
eg: #00ff00 becomes : (0, 65535, 0)
| @staticmethod
def hex_to_rgb(value):
"""
Takes a hex string (such as #00ff00) and returns a tuple in the form
of (red, green, blue)
eg: #00ff00 becomes : (0, 65535, 0)
"""
value = value.lstrip('#')
lv = len(value)
return tuple(int(value[i:i + lv // 3], 16)
for i in range... | (value) | [
-0.02049495466053486,
-0.033373672515153885,
-0.07076596468687057,
-0.014285232871770859,
0.0003217287012375891,
0.007453580852597952,
0.03873182833194733,
0.06318799406290054,
0.04657770320773125,
-0.031153863295912743,
0.06360899657011032,
0.018925780430436134,
0.05105559527873993,
0.020... |
721,925 | apprise.asset | image_path |
Apply our mask to our image file path
| def image_path(self, notify_type, image_size, must_exist=True,
extension=None):
"""
Apply our mask to our image file path
"""
if not self.image_path_mask:
# No image to return
return None
if extension is None:
extension = self.default_extension
re_map = {
... | (self, notify_type, image_size, must_exist=True, extension=None) | [
0.07583477348089218,
-0.052959296852350235,
-0.040418241173028946,
0.020944666117429733,
0.02778524160385132,
-0.05560726299881935,
0.030010268092155457,
-0.014214422553777695,
0.043948862701654434,
-0.023555854335427284,
0.09142833948135376,
0.040087245404720306,
0.03685084357857704,
-0.0... |
721,926 | apprise.asset | image_raw |
Returns the raw image if it can (otherwise the function returns None)
| def image_raw(self, notify_type, image_size, extension=None):
"""
Returns the raw image if it can (otherwise the function returns None)
"""
path = self.image_path(
notify_type=notify_type,
image_size=image_size,
extension=extension,
)
if path:
try:
wit... | (self, notify_type, image_size, extension=None) | [
0.05203745514154434,
-0.09306629002094269,
-0.02781124971807003,
0.03650226444005966,
0.018423141911625862,
-0.0666673332452774,
-0.0012753612827509642,
0.019265083596110344,
0.08618590235710144,
-0.055477648973464966,
0.06061983481049538,
0.04175308719277382,
0.012185527943074703,
-0.0065... |
721,927 | apprise.asset | image_url |
Apply our mask to our image URL
if logo is set to True, then the logo_url is used instead
| def image_url(self, notify_type, image_size, logo=False, extension=None):
"""
Apply our mask to our image URL
if logo is set to True, then the logo_url is used instead
"""
url_mask = self.image_url_logo if logo else self.image_url_mask
if not url_mask:
# No image to return
return... | (self, notify_type, image_size, logo=False, extension=None) | [
0.045994359999895096,
-0.10179499536752701,
-0.043030522763729095,
0.010071557015180588,
0.0012086326023563743,
-0.042884159833192825,
-0.0014967834576964378,
-0.030827565118670464,
0.06513123214244843,
0.009696504101157188,
0.04932410269975662,
0.043323248624801636,
0.017417116090655327,
... |
721,928 | apprise.apprise_attachment | AppriseAttachment |
Our Apprise Attachment File Manager
| class AppriseAttachment:
"""
Our Apprise Attachment File Manager
"""
def __init__(self, paths=None, asset=None, cache=True, location=None,
**kwargs):
"""
Loads all of the paths/urls specified (if any).
The path can either be a single string identifying one exp... | (paths=None, asset=None, cache=True, location=None, **kwargs) | [
0.04721708223223686,
-0.04027339071035385,
-0.11832045018672943,
0.07181757688522339,
0.03219887614250183,
-0.02952059544622898,
0.022457871586084366,
0.02702086791396141,
-0.039678219705820084,
0.012498638592660427,
0.00019715115195140243,
0.027695396915078163,
-0.03981709107756615,
0.008... |
721,929 | apprise.apprise_attachment | __bool__ |
Allows the Apprise object to be wrapped in an 'if statement'.
True is returned if at least one service has been loaded.
| def __bool__(self):
"""
Allows the Apprise object to be wrapped in an 'if statement'.
True is returned if at least one service has been loaded.
"""
return True if self.attachments else False
| (self) | [
0.029736408963799477,
-0.05154545605182648,
-0.0220732931047678,
0.01483297161757946,
0.034070033580064774,
-0.03304828330874443,
0.013229883275926113,
0.0012485592160373926,
-0.010085363872349262,
0.011582753621041775,
0.014084276743233204,
0.01368790864944458,
-0.016356786713004112,
-0.0... |
721,930 | apprise.apprise_attachment | __getitem__ |
Returns the indexed entry of a loaded apprise attachments
| def __getitem__(self, index):
"""
Returns the indexed entry of a loaded apprise attachments
"""
return self.attachments[index]
| (self, index) | [
0.03136337548494339,
-0.03860371559858322,
-0.12476721405982971,
0.04268713295459747,
0.029373139142990112,
-0.026833873242139816,
0.012378925457596779,
-0.00034502072958275676,
0.06358461081981659,
0.0042635658755898476,
-0.02007393352687359,
-0.0044136918149888515,
-0.018890084698796272,
... |
721,931 | apprise.apprise_attachment | __init__ |
Loads all of the paths/urls specified (if any).
The path can either be a single string identifying one explicit
location, otherwise you can pass in a series of locations to scan
via a list.
By default we cache our responses so that subsiquent calls does not
cause the c... | def __init__(self, paths=None, asset=None, cache=True, location=None,
**kwargs):
"""
Loads all of the paths/urls specified (if any).
The path can either be a single string identifying one explicit
location, otherwise you can pass in a series of locations to scan
via a list.
By defau... | (self, paths=None, asset=None, cache=True, location=None, **kwargs) | [
0.018730275332927704,
-0.05671843886375427,
-0.09399055689573288,
0.05374119430780411,
0.021519089117646217,
-0.026022646576166153,
0.025645779445767403,
0.0246093962341547,
-0.042774371802806854,
0.026625633239746094,
0.006411444861441851,
0.05611545220017433,
-0.03702715411782265,
-0.001... |
721,932 | apprise.apprise_attachment | __iter__ |
Returns an iterator to our attachment list
| def __iter__(self):
"""
Returns an iterator to our attachment list
"""
return iter(self.attachments)
| (self) | [
0.021047044545412064,
-0.03820795193314552,
-0.12359979748725891,
0.026669906452298164,
-0.03096873126924038,
-0.03237874433398247,
0.0027727417182177305,
0.03241313621401787,
0.09037848562002182,
0.05120759829878807,
0.008623441681265831,
-0.017427435144782066,
-0.030796777456998825,
0.05... |
721,933 | apprise.apprise_attachment | __len__ |
Returns the number of attachment entries loaded
| def __len__(self):
"""
Returns the number of attachment entries loaded
"""
return len(self.attachments)
| (self) | [
-0.013318979181349277,
-0.013509606011211872,
-0.09494849294424057,
0.051485687494277954,
0.015175513923168182,
0.02290831319987774,
0.0019508119439706206,
-0.021648522466421127,
0.03326844051480293,
0.004421702120453119,
-0.007637485861778259,
-0.023604514077305794,
-0.020653950050473213,
... |
721,934 | apprise.apprise_attachment | add |
Adds one or more attachments into our list.
By default we cache our responses so that subsiquent calls does not
cause the content to be retrieved again. For local file references
this makes no difference at all. But for remote content, this does
mean more then one call can be... | def add(self, attachments, asset=None, cache=None):
"""
Adds one or more attachments into our list.
By default we cache our responses so that subsiquent calls does not
cause the content to be retrieved again. For local file references
this makes no difference at all. But for remote content, this d... | (self, attachments, asset=None, cache=None) | [
0.020544620230793953,
-0.03217034414410591,
-0.11917827278375626,
0.07618062198162079,
0.028723523020744324,
-0.02083672396838665,
0.004065108485519886,
0.018383054062724113,
-0.03417612239718437,
-0.005657073576003313,
-0.00010680038394639269,
0.03328033909201622,
-0.04288081079721451,
0.... |
721,935 | apprise.apprise_attachment | clear |
Empties our attachment list
| def clear(self):
"""
Empties our attachment list
"""
self.attachments[:] = []
| (self) | [
-0.005768052767962217,
0.035595182329416275,
-0.09371809661388397,
0.005036411806941032,
-0.050193969160318375,
-0.021336691454052925,
-0.05441366508603096,
0.017746545374393463,
0.0573062002658844,
0.047505613416433334,
-0.03692234307527542,
-0.03695637360215187,
-0.02965698018670082,
0.0... |
721,936 | apprise.apprise_attachment | instantiate |
Returns the instance of a instantiated attachment plugin based on
the provided Attachment URL. If the url fails to be parsed, then None
is returned.
A specified cache value will over-ride anything set
| @staticmethod
def instantiate(url, asset=None, cache=None, suppress_exceptions=True):
"""
Returns the instance of a instantiated attachment plugin based on
the provided Attachment URL. If the url fails to be parsed, then None
is returned.
A specified cache value will over-ride anything set
"""
... | (url, asset=None, cache=None, suppress_exceptions=True) | [
0.024265184998512268,
-0.06158386170864105,
-0.07817788422107697,
0.03477950394153595,
0.02387179248034954,
-0.013697223737835884,
0.055861782282590866,
0.04756477102637291,
-0.076747365295887,
0.02412213385105133,
0.03302711620926857,
0.059438083320856094,
-0.05382329225540161,
0.00095777... |
721,937 | apprise.apprise_attachment | pop |
Removes an indexed Apprise Attachment from the stack and returns it.
by default the last element is poped from the list
| def pop(self, index=-1):
"""
Removes an indexed Apprise Attachment from the stack and returns it.
by default the last element is poped from the list
"""
# Remove our entry
return self.attachments.pop(index)
| (self, index=-1) | [
0.00886401068419218,
0.02152075432240963,
-0.12486843019723892,
0.006285467650741339,
-0.014475882053375244,
-0.045512791723012924,
-0.01679271087050438,
0.023562995716929436,
0.08477873355150223,
-0.015926044434309006,
-0.018809208646416664,
-0.04300718754529953,
-0.07551141828298569,
-0.... |
721,938 | apprise.apprise_attachment | size |
Returns the total size of accumulated attachments
| def size(self):
"""
Returns the total size of accumulated attachments
"""
return sum([len(a) for a in self.attachments if len(a) > 0])
| (self) | [
-0.005933193955570459,
-0.03226494789123535,
-0.06517963856458664,
0.05755368992686272,
0.03438516706228256,
0.0011060619726777077,
-0.004084414336830378,
-0.05844281613826752,
0.0367276668548584,
0.0020539623219519854,
0.0008196613634936512,
-0.0209457129240036,
0.0015784091083332896,
-0.... |
721,939 | apprise.apprise_config | AppriseConfig |
Our Apprise Configuration File Manager
- Supports a list of URLs defined one after another (text format)
- Supports a destinct YAML configuration format
| class AppriseConfig:
"""
Our Apprise Configuration File Manager
- Supports a list of URLs defined one after another (text format)
- Supports a destinct YAML configuration format
"""
def __init__(self, paths=None, asset=None, cache=True, recursion=0,
insecure_includes=... | (paths=None, asset=None, cache=True, recursion=0, insecure_includes=False, **kwargs) | [
0.006813020911067724,
-0.08292362093925476,
-0.04097876325249672,
0.0034115423914045095,
0.009716354310512543,
0.02336755581200123,
-0.003147374140098691,
0.015517989173531532,
-0.050961799919605255,
-0.028459709137678146,
-0.00559030007570982,
-0.001090636826120317,
-0.014189600944519043,
... |
721,940 | apprise.apprise_config | __bool__ |
Allows the Apprise object to be wrapped in an 'if statement'.
True is returned if at least one service has been loaded.
| def __bool__(self):
"""
Allows the Apprise object to be wrapped in an 'if statement'.
True is returned if at least one service has been loaded.
"""
return True if self.configs else False
| (self) | [
0.02674100361764431,
-0.060641296207904816,
0.006583355367183685,
-0.023037312552332878,
0.03887989744544029,
-0.0018983632326126099,
0.00737637048587203,
-0.006849170662462711,
-0.016817238181829453,
0.012165473774075508,
0.0011003640247508883,
0.012050286866724491,
0.005316303111612797,
... |
721,941 | apprise.apprise_config | __getitem__ |
Returns the indexed config entry of a loaded apprise configuration
| def __getitem__(self, index):
"""
Returns the indexed config entry of a loaded apprise configuration
"""
return self.configs[index]
| (self, index) | [
0.031242303550243378,
-0.07074125111103058,
-0.049644824117422104,
-0.021831128746271133,
0.035335641354322433,
0.027831191197037697,
0.0009391495841555297,
-0.024210162460803986,
0.04495673254132271,
-0.005519007332623005,
-0.03542310371994972,
-0.006634179037064314,
-0.0024336986243724823,... |
721,942 | apprise.apprise_config | __init__ |
Loads all of the paths specified (if any).
The path can either be a single string identifying one explicit
location, otherwise you can pass in a series of locations to scan
via a list.
If no path is specified then a default list is used.
By default we cache our respon... | def __init__(self, paths=None, asset=None, cache=True, recursion=0,
insecure_includes=False, **kwargs):
"""
Loads all of the paths specified (if any).
The path can either be a single string identifying one explicit
location, otherwise you can pass in a series of locations to scan
via a ... | (self, paths=None, asset=None, cache=True, recursion=0, insecure_includes=False, **kwargs) | [
-0.008447043597698212,
-0.0971859022974968,
-0.0242964755743742,
0.012384585104882717,
-0.00964295957237482,
0.010380362160503864,
-0.005223269574344158,
0.009898214600980282,
-0.05566445738077164,
-0.003840639488771558,
0.00897173397243023,
0.055702272802591324,
-0.029949897900223732,
0.0... |
721,943 | apprise.apprise_config | __iter__ |
Returns an iterator to our config list
| def __iter__(self):
"""
Returns an iterator to our config list
"""
return iter(self.configs)
| (self) | [
0.039974987506866455,
-0.05100493133068085,
-0.06926257163286209,
-0.04103687405586243,
-0.02639308199286461,
0.0204499289393425,
-0.019405167549848557,
0.010053691454231739,
0.0722084566950798,
0.026684245094656944,
-0.020655455067753792,
-0.02853398770093918,
-0.01717006228864193,
0.0654... |
721,944 | apprise.apprise_config | __len__ |
Returns the number of config entries loaded
| def __len__(self):
"""
Returns the number of config entries loaded
"""
return len(self.configs)
| (self) | [
-0.006376981269568205,
-0.04275551065802574,
-0.03654373809695244,
-0.015116419643163681,
0.02268289029598236,
0.07017983496189117,
-0.012117916718125343,
-0.044341497123241425,
0.020650846883654594,
-0.00864031445235014,
-0.02104734256863594,
-0.031058872118592262,
0.005150320939719677,
-... |
721,945 | apprise.apprise_config | add |
Adds one or more config URLs into our list.
You can override the global asset if you wish by including it with the
config(s) that you add.
By default we cache our responses so that subsiquent calls does not
cause the content to be retrieved again. Setting this to False does
... | def add(self, configs, asset=None, tag=None, cache=True, recursion=None,
insecure_includes=None):
"""
Adds one or more config URLs into our list.
You can override the global asset if you wish by including it with the
config(s) that you add.
By default we cache our responses so that subsiquen... | (self, configs, asset=None, tag=None, cache=True, recursion=None, insecure_includes=None) | [
-0.021097248420119286,
-0.04906517267227173,
-0.04735720902681351,
0.003314034081995487,
0.0041146427392959595,
0.054111432284116745,
-0.030064063146710396,
0.006264155264943838,
-0.07553862780332565,
-0.006215633358806372,
0.010383649729192257,
0.022746985778212547,
-0.011198814958333969,
... |
721,946 | apprise.apprise_config | add_config |
Adds one configuration file in it's raw format. Content gets loaded as
a memory based object and only exists for the life of this
AppriseConfig object it was loaded into.
If you know the format ('yaml' or 'text') you can specify
it for slightly less overhead during this call. ... | def add_config(self, content, asset=None, tag=None, format=None,
recursion=None, insecure_includes=None):
"""
Adds one configuration file in it's raw format. Content gets loaded as
a memory based object and only exists for the life of this
AppriseConfig object it was loaded into.
If y... | (self, content, asset=None, tag=None, format=None, recursion=None, insecure_includes=None) | [
-0.01828821375966072,
-0.06244025379419327,
0.025751454755663872,
-0.010459772311151028,
0.01566624827682972,
0.04790706932544708,
-0.009097286500036716,
0.02726844884455204,
-0.04108995571732521,
-0.053975049406290054,
0.019646018743515015,
-0.006302082911133766,
-0.004373065195977688,
0.... |
721,947 | apprise.apprise_config | clear |
Empties our configuration list
| def clear(self):
"""
Empties our configuration list
"""
self.configs[:] = []
| (self) | [
0.009572441689670086,
0.005754458252340555,
-0.027804052457213402,
-0.06555262207984924,
-0.05987004190683365,
0.013952763751149178,
-0.07962377369403839,
-0.007674020249396563,
0.061865709722042084,
0.02665400691330433,
-0.05980239063501358,
-0.042585525661706924,
-0.005792511161416769,
0... |
721,948 | apprise.apprise_config | instantiate |
Returns the instance of a instantiated configuration plugin based on
the provided Config URL. If the url fails to be parsed, then None
is returned.
| @staticmethod
def instantiate(url, asset=None, tag=None, cache=None,
recursion=0, insecure_includes=False,
suppress_exceptions=True):
"""
Returns the instance of a instantiated configuration plugin based on
the provided Config URL. If the url fails to be parsed, then None
... | (url, asset=None, tag=None, cache=None, recursion=0, insecure_includes=False, suppress_exceptions=True) | [
0.011850432492792606,
-0.0953259989619255,
-0.043557338416576385,
-0.02026703767478466,
0.009741615504026413,
0.012149025686085224,
0.043855931609869,
0.03230409324169159,
-0.07162513583898544,
-0.0042782858945429325,
0.021312115713953972,
0.05553840473294258,
-0.027563918381929398,
0.0012... |
721,949 | apprise.apprise_config | pop |
Removes an indexed Apprise Configuration from the stack and returns it.
By default, the last element is removed from the list
| def pop(self, index=-1):
"""
Removes an indexed Apprise Configuration from the stack and returns it.
By default, the last element is removed from the list
"""
# Remove our entry
return self.configs.pop(index)
| (self, index=-1) | [
0.014659754000604153,
-0.0026509577874094248,
-0.06623527407646179,
-0.06259182095527649,
-0.019145328551530838,
-0.007334173657000065,
-0.038084425032138824,
-0.006436198949813843,
0.0820121318101883,
-0.025693237781524658,
-0.03708763048052788,
-0.029646044597029686,
-0.06114818900823593,
... |
721,950 | apprise.apprise_config | server_pop |
Removes an indexed Apprise Notification from the servers
| def server_pop(self, index):
"""
Removes an indexed Apprise Notification from the servers
"""
# Tracking variables
prev_offset = -1
offset = prev_offset
for entry in self.configs:
servers = entry.servers(cache=True)
if len(servers) > 0:
# Acquire a new maximum off... | (self, index) | [
0.008563368581235409,
0.022114524617791176,
-0.08172758668661118,
-0.028621826320886612,
0.0027836314402520657,
-0.03533516451716423,
-0.03037313185632229,
0.04093247279524803,
0.07925515621900558,
-0.01266262587159872,
-0.03962757810950279,
-0.01329790335148573,
-0.04598035290837288,
-0.0... |
721,951 | apprise.apprise_config | servers |
Returns all of our servers dynamically build based on parsed
configuration.
If a tag is specified, it applies to the configuration sources
themselves and not the notification services inside them.
This is for filtering the configuration files polled for
results.
... | def servers(self, tag=common.MATCH_ALL_TAG, match_always=True, *args,
**kwargs):
"""
Returns all of our servers dynamically build based on parsed
configuration.
If a tag is specified, it applies to the configuration sources
themselves and not the notification services inside them.
Th... | (self, tag='all', match_always=True, *args, **kwargs) | [
0.07192833721637726,
-0.015964234247803688,
-0.027892766520380974,
-0.056071244180202484,
-0.013758883811533451,
0.035214170813560486,
-0.005089269019663334,
-0.036964163184165955,
0.026464199647307396,
0.01511602196842432,
-0.0017790120327845216,
0.042749859392642975,
-0.025303488597273827,... |
721,952 | apprise.locale | AppriseLocale |
A wrapper class to gettext so that we can manipulate multiple lanaguages
on the fly if required.
| class AppriseLocale:
"""
A wrapper class to gettext so that we can manipulate multiple lanaguages
on the fly if required.
"""
# Define our translation domain
_domain = 'apprise'
# The path to our translations
_locale_dir = abspath(join(dirname(__file__), 'i18n'))
# Locale regular... | (language=None) | [
0.040774326771497726,
-0.0847248062491417,
-0.005220537073910236,
0.03656696155667305,
0.020614031702280045,
-0.04060933366417885,
0.0373094379901886,
0.003542231163010001,
0.051643356680870056,
-0.08163115382194519,
0.0016731498762965202,
0.004916328005492687,
0.007517573423683643,
0.0241... |
721,953 | apprise.locale | __getstate__ |
Pickle Support dumps()
| def __getstate__(self):
"""
Pickle Support dumps()
"""
state = self.__dict__.copy()
# Remove the unpicklable entries.
del state['_gtobjs']
del state['_AppriseLocale__fn_map']
return state
| (self) | [
0.01083881501108408,
-0.052738115191459656,
-0.0009335671202279627,
0.024984996765851974,
-0.003399487351998687,
-0.037315722554922104,
-0.02904730662703514,
0.004331931006163359,
0.03515874221920967,
-0.07880160212516785,
-0.03363088518381119,
0.0037095530424267054,
-0.05672852694988251,
... |
721,954 | apprise.locale | __init__ |
Initializes our object, if a language is specified, then we
initialize ourselves to that, otherwise we use whatever we detect
from the local operating system. If all else fails, we resort to the
defined default_language.
| def __init__(self, language=None):
"""
Initializes our object, if a language is specified, then we
initialize ourselves to that, otherwise we use whatever we detect
from the local operating system. If all else fails, we resort to the
defined default_language.
"""
# Cache previously loaded tr... | (self, language=None) | [
0.02155311219394207,
-0.05396675691008568,
0.008411312475800514,
0.019929632544517517,
-0.007818834856152534,
-0.04706229642033577,
0.02007891796529293,
0.04090426117181778,
0.034428998827934265,
-0.032917480915784836,
0.03411176800727844,
0.03562328219413757,
-0.017354454845190048,
0.0150... |
721,955 | apprise.locale | __setstate__ |
Pickle Support loads()
| def __setstate__(self, state):
"""
Pickle Support loads()
"""
self.__dict__.update(state)
# Our mapping to our _fn
self.__fn_map = None
self._gtobjs = {}
self.add(state['lang'], set_default=True)
| (self, state) | [
-0.0054084849543869495,
-0.03816503286361694,
-0.008903402835130692,
0.028384579345583916,
-0.018046000972390175,
-0.0042191497050225735,
-0.04426009953022003,
0.025921747088432312,
0.008934409357607365,
-0.08093680441379547,
-0.019472317770123482,
0.06123414635658264,
-0.013394969515502453,... |
721,956 | apprise.locale | add |
Add a language to our list
| def add(self, lang=None, set_default=True):
"""
Add a language to our list
"""
lang = lang if lang else self._default_language
if lang not in self._gtobjs:
# Load our gettext object and install our language
try:
self._gtobjs[lang] = gettext.translation(
se... | (self, lang=None, set_default=True) | [
-0.005279005970805883,
-0.006132086273282766,
0.015153637155890465,
0.037407100200653076,
0.01257605105638504,
-0.01803392916917801,
0.016703857108950615,
0.0517718680202961,
0.02707841247320175,
-0.03159147873520851,
-0.0015238486230373383,
-0.0119706392288208,
0.018189867958426476,
0.014... |
721,957 | apprise.locale | detect_language |
Returns the language (if it's retrievable)
| @staticmethod
def detect_language(lang=None, detect_fallback=True):
"""
Returns the language (if it's retrievable)
"""
# We want to only use the 2 character version of this language
# hence en_CA becomes en, en_US becomes en.
if not isinstance(lang, str):
if detect_fallback is False:
... | (lang=None, detect_fallback=True) | [
0.034938711673021317,
-0.08676478266716003,
0.01783888228237629,
0.04918395355343819,
0.028305716812610626,
-0.02797314152121544,
0.07257496565580368,
-0.019862039014697075,
0.03924369439482689,
-0.07612241804599762,
0.0327400304377079,
-0.00393314566463232,
-0.02928496152162552,
-0.045636... |
721,958 | apprise.locale | lang_at |
The syntax works as:
with at.lang_at('fr'):
# apprise works as though the french language has been
# defined. afterwards, the language falls back to whatever
# it was.
| def __init__(self, text, *args, **kwargs):
"""
Store our text
"""
self.text = text
super().__init__(*args, **kwargs)
| (self, lang, mapto='gettext') | [
-0.00851432140916586,
-0.042978666722774506,
0.04233415424823761,
0.005215445999056101,
-0.00866272859275341,
-0.0023745119106024504,
0.009302998892962933,
0.052714165300130844,
0.10685303807258606,
-0.013178541325032711,
0.017910605296492577,
0.05814162269234657,
-0.03346365690231323,
0.0... |
721,959 | apprise.attachment.base | AttachBase |
This is the base class for all supported attachment types
| class AttachBase(URLBase):
"""
This is the base class for all supported attachment types
"""
# For attachment type detection; this amount of data is read into memory
# 128KB (131072B)
max_detect_buffer_size = 131072
# Unknown mimetype
unknown_mimetype = 'application/octet-stream'
... | (name=None, mimetype=None, cache=None, **kwargs) | [
0.06300116330385208,
-0.02913706935942173,
-0.08299415558576584,
0.0631948933005333,
0.049091313034296036,
-0.05494197458028793,
0.01870468072593212,
0.04506171867251396,
-0.02150408737361431,
0.009584817104041576,
0.02592114359140396,
0.041884537786245346,
-0.018191294744610786,
0.0108585... |
721,960 | apprise.attachment.base | __bool__ |
Allows the Apprise object to be wrapped in an based 'if statement'.
True is returned if our content was downloaded correctly.
| def __bool__(self):
"""
Allows the Apprise object to be wrapped in an based 'if statement'.
True is returned if our content was downloaded correctly.
"""
return True if self.path else False
| (self) | [
0.047071609646081924,
-0.047691427171230316,
-0.03002665936946869,
0.007545403204858303,
0.06418542563915253,
-0.049447573721408844,
0.005505174398422241,
0.037567757070064545,
-0.025343602523207664,
0.01985134184360504,
0.05853821337223053,
0.028666507452726364,
0.021917395293712616,
0.01... |
721,961 | apprise.url | __contains__ |
Returns true if the tag specified is associated with this notification.
tag can also be a tuple, set, and/or list
| def __contains__(self, tags):
"""
Returns true if the tag specified is associated with this notification.
tag can also be a tuple, set, and/or list
"""
if isinstance(tags, (tuple, set, list)):
return bool(set(tags) & self.tags)
# return any match
return tags in self.tags
| (self, tags) | [
0.03173494711518288,
-0.05277068540453911,
-0.04341340810060501,
0.004388489760458469,
-0.01809798739850521,
-0.016148554161190987,
0.006124844774603844,
-0.02121707983314991,
0.03316755220293999,
-0.02908734604716301,
-0.0010721879079937935,
-0.005095725879073143,
0.04885368421673775,
-0.... |
721,962 | apprise.attachment.base | __init__ |
Initialize some general logging and common server arguments that will
keep things consistent when working with the configurations that
inherit this class.
Optionally provide a filename to over-ride name associated with the
actual file retrieved (from where-ever).
The m... | def __init__(self, name=None, mimetype=None, cache=None, **kwargs):
"""
Initialize some general logging and common server arguments that will
keep things consistent when working with the configurations that
inherit this class.
Optionally provide a filename to over-ride name associated with the
a... | (self, name=None, mimetype=None, cache=None, **kwargs) | [
0.04454990476369858,
-0.015719590708613396,
-0.06602796912193298,
0.04614368453621864,
0.04523295536637306,
-0.032786302268505096,
0.010786465369164944,
0.05494741350412369,
-0.0042951381765306,
0.02136422134935856,
0.033810872584581375,
0.045422688126564026,
-0.020377596840262413,
0.00560... |
721,963 | apprise.attachment.base | __len__ |
Returns the filesize of the attachment.
| def __len__(self):
"""
Returns the filesize of the attachment.
"""
return os.path.getsize(self.path) if self.path else 0
| (self) | [
0.027163682505488396,
-0.013136264868080616,
-0.044293634593486786,
0.0751209482550621,
0.03732943534851074,
-0.03462296724319458,
0.025166837498545647,
0.010999145917594433,
-0.0031376034021377563,
0.0022051925770938396,
0.016931919381022453,
-0.027807293459773064,
0.010297775268554688,
-... |
721,964 | apprise.url | __str__ |
Returns the url path
| def __str__(self):
"""
Returns the url path
"""
return self.url(privacy=True)
| (self) | [
-0.056701987981796265,
-0.02408490888774395,
0.02326192334294319,
0.00017701000615488738,
0.06069934368133545,
-0.007776368409395218,
0.04148516431450844,
-0.029274752363562584,
0.07161649316549301,
0.021061697974801064,
0.001152598881162703,
-0.001580887008458376,
0.01813926175236702,
0.0... |
721,965 | apprise.attachment.base | download |
This function must be over-ridden by inheriting classes.
Inherited classes MUST populate:
- detected_name: Should identify a human readable filename
- download_path: Must contain a absolute path to content
- detected_mimetype: Should identify mimetype of content
... | def download(self):
"""
This function must be over-ridden by inheriting classes.
Inherited classes MUST populate:
- detected_name: Should identify a human readable filename
- download_path: Must contain a absolute path to content
- detected_mimetype: Should identify mimetype of content
... | (self) | [
0.01323011890053749,
-0.03373201936483383,
-0.07946769893169403,
0.04074285179376602,
0.00874614343047142,
-0.06134043261408806,
0.01235159020870924,
0.05890490859746933,
0.035280317068099976,
0.02870439924299717,
0.05535599961876869,
0.03195756673812866,
0.027938948944211006,
0.0149088911... |
721,966 | apprise.url | escape_html |
Takes html text as input and escapes it so that it won't
conflict with any xml/html wrapping characters.
Args:
html (str): The HTML code to escape
convert_new_lines (:obj:`bool`, optional): escape new lines (
)
whitespace (:obj:`bool`, optional): escape whit... | @staticmethod
def escape_html(html, convert_new_lines=False, whitespace=True):
"""
Takes html text as input and escapes it so that it won't
conflict with any xml/html wrapping characters.
Args:
html (str): The HTML code to escape
convert_new_lines (:obj:`bool`, optional): escape new line... | (html, convert_new_lines=False, whitespace=True) | [
-0.01275679748505354,
-0.11311336606740952,
0.07388737052679062,
-0.013461900874972343,
0.007686550263315439,
-0.01786879450082779,
-0.051398295909166336,
0.00398939847946167,
-0.009495696052908897,
0.025921812281012535,
0.028185565024614334,
-0.03378927707672119,
0.02477138116955757,
0.04... |
721,967 | apprise.attachment.base | exists |
Simply returns true if the object has downloaded and stored the
attachment AND the attachment has not expired.
| def exists(self, retrieve_if_missing=True):
"""
Simply returns true if the object has downloaded and stored the
attachment AND the attachment has not expired.
"""
cache = self.template_args['cache']['default'] \
if self.cache is None else self.cache
if self.download_path and os.path.isfi... | (self, retrieve_if_missing=True) | [
0.08537743985652924,
-0.009048903360962868,
-0.11093541234731674,
0.037128131836652756,
0.09035088121891022,
-0.03315628692507744,
0.002577383304014802,
0.03370889276266098,
-0.027008557692170143,
0.022950368002057076,
0.02369293011724949,
0.0037732545752078295,
0.03177477419376373,
-0.051... |
721,968 | apprise.url | http_response_code_lookup | Parses the interger response code returned by a remote call from
a web request into it's human readable string version.
You can over-ride codes or add new ones by providing your own
response_mask that contains a dictionary of integer -> string mapped
variables
| @staticmethod
def http_response_code_lookup(code, response_mask=None):
"""Parses the interger response code returned by a remote call from
a web request into it's human readable string version.
You can over-ride codes or add new ones by providing your own
response_mask that contains a dictionary of inte... | (code, response_mask=None) | [
0.028179066255688667,
-0.05467097833752632,
-0.024050923064351082,
-0.03769174590706825,
-0.009979338385164738,
0.009997286833822727,
-0.0388045497238636,
-0.029094437137246132,
0.011271626688539982,
-0.062065739184617996,
0.02957904525101185,
0.037943024188280106,
0.025648334994912148,
-0... |
721,969 | apprise.attachment.base | invalidate |
Release any temporary data that may be open by child classes.
Externally fetched content should be automatically cleaned up when
this function is called.
This function should also reset the following entries to None:
- detected_name : Should identify a human readable filename... | def invalidate(self):
"""
Release any temporary data that may be open by child classes.
Externally fetched content should be automatically cleaned up when
this function is called.
This function should also reset the following entries to None:
- detected_name : Should identify a human readable ... | (self) | [
0.04965415224432945,
-0.013327248394489288,
-0.049617234617471695,
0.021615246310830116,
-0.013705654069781303,
-0.03525629639625549,
-0.04736526310443878,
0.029737114906311035,
0.021984422579407692,
0.023571878671646118,
0.0302908793091774,
-0.004476257134228945,
0.03379805013537407,
0.03... |
721,970 | apprise.url | parse_list | A wrapper to utils.parse_list() with unquoting support
Parses a specified set of data and breaks it into a list.
Args:
content (str): The path to split up into a list. If a list is
provided, then it's individual entries are processed.
allow_whitespace (:obj:`b... | @staticmethod
def parse_list(content, allow_whitespace=True, unquote=True):
"""A wrapper to utils.parse_list() with unquoting support
Parses a specified set of data and breaks it into a list.
Args:
content (str): The path to split up into a list. If a list is
provided, then it's individ... | (content, allow_whitespace=True, unquote=True) | [
-0.026190251111984253,
-0.01962096430361271,
-0.03618321195244789,
-0.007108037360012531,
-0.02280133217573166,
0.06635326892137527,
0.030361225828528404,
-0.02977033704519272,
0.012799681164324284,
0.013529601506888866,
0.0421963706612587,
0.013164641335606575,
-0.018612978979945183,
0.00... |
721,971 | apprise.url | parse_phone_no | A wrapper to utils.parse_phone_no() with unquoting support
Parses a specified set of data and breaks it into a list.
Args:
content (str): The path to split up into a list. If a list is
provided, then it's individual entries are processed.
unquote (:obj:`bool`,... | @staticmethod
def parse_phone_no(content, unquote=True):
"""A wrapper to utils.parse_phone_no() with unquoting support
Parses a specified set of data and breaks it into a list.
Args:
content (str): The path to split up into a list. If a list is
provided, then it's individual entries are... | (content, unquote=True) | [
-0.028887007385492325,
0.035087231546640396,
0.004579105880111456,
0.018653972074389458,
-0.030077308416366577,
0.03819622844457626,
-0.005889325402677059,
-0.04732779040932655,
0.05400769039988518,
-0.06090077757835388,
0.054824911057949066,
0.04924648627638817,
-0.016593152657151222,
-0.... |
721,972 | apprise.attachment.base | parse_url | Parses the URL and returns it broken apart into a dictionary.
This is very specific and customized for Apprise.
Args:
url (str): The URL you want to fully parse.
verify_host (:obj:`bool`, optional): a flag kept with the parsed
URL which some child classes will ... | @staticmethod
def parse_url(url, verify_host=True, mimetype_db=None, sanitize=True):
"""Parses the URL and returns it broken apart into a dictionary.
This is very specific and customized for Apprise.
Args:
url (str): The URL you want to fully parse.
verify_host (:obj:`bool`, optional): a fla... | (url, verify_host=True, mimetype_db=None, sanitize=True) | [
-0.004196477588266134,
-0.03827797248959541,
-0.042603056877851486,
0.022959161549806595,
0.007278339937329292,
0.008245292119681835,
0.010479285381734371,
-0.007983310148119926,
-0.00801665335893631,
-0.011365260928869247,
0.008912155404686928,
0.07415523380041122,
-0.0019065154483541846,
... |
721,973 | apprise.url | post_process_parse_url_results |
After parsing the URL, this function applies a bit of extra logic to
support extra entries like `pass` becoming `password`, etc
This function assumes that parse_url() was called previously setting
up the basics to be checked
| @staticmethod
def post_process_parse_url_results(results):
"""
After parsing the URL, this function applies a bit of extra logic to
support extra entries like `pass` becoming `password`, etc
This function assumes that parse_url() was called previously setting
up the basics to be checked
"""
... | (results) | [
0.016886290162801743,
0.008230769075453281,
-0.014554868452250957,
0.03339502215385437,
-0.01396965328603983,
0.0018146390793845057,
0.002921356586739421,
-0.03313073143362999,
0.03735938295722008,
-0.035811394453048706,
0.019595270976424217,
0.05546329915523529,
0.020369265228509903,
0.00... |
721,974 | apprise.url | pprint |
Privacy Print is used to mainpulate the string before passing it into
part of the URL. It is used to mask/hide private details such as
tokens, passwords, apikeys, etc from on-lookers. If the privacy=False
is set, then the quote variable is the next flag checked.
Quoting is ne... | @staticmethod
def pprint(content, privacy=True, mode=PrivacyMode.Outer,
# privacy print; quoting is ignored when privacy is set to True
quote=True, safe='/', encoding=None, errors=None):
"""
Privacy Print is used to mainpulate the string before passing it into
part of the URL. It is u... | (content, privacy=True, mode='o', quote=True, safe='/', encoding=None, errors=None) | [
-0.03449907526373863,
-0.027463901787996292,
0.004626295994967222,
0.0015216907486319542,
0.04758984595537186,
-0.0008142770384438336,
0.038862667977809906,
-0.05571146681904793,
0.015415050089359283,
-0.01598498784005642,
0.008744990453124046,
0.031346604228019714,
-0.02009032480418682,
0... |
721,975 | apprise.url | quote | Replaces single character non-ascii characters and URI specific
ones by their %xx code.
Wrapper to Python's `quote` while remaining compatible with both
Python 2 & 3 since the reference to this function changed between
versions.
Args:
content (str): The URI string ... | @staticmethod
def quote(content, safe='/', encoding=None, errors=None):
""" Replaces single character non-ascii characters and URI specific
ones by their %xx code.
Wrapper to Python's `quote` while remaining compatible with both
Python 2 & 3 since the reference to this function changed between
versi... | (content, safe='/', encoding=None, errors=None) | [
-0.04901130497455597,
-0.026723986491560936,
0.017018776386976242,
0.048907320946455,
0.002354813041165471,
0.008604707196354866,
-0.005688812118023634,
-0.007673180662095547,
0.08589109778404236,
-0.03100467659533024,
0.05438383296132088,
0.07784964144229889,
0.012443464249372482,
0.03622... |
721,976 | apprise.url | schemas | A simple function that returns a set of all schemas associated
with this object based on the object.protocol and
object.secure_protocol
| def schemas(self):
"""A simple function that returns a set of all schemas associated
with this object based on the object.protocol and
object.secure_protocol
"""
schemas = set([])
for key in ('protocol', 'secure_protocol'):
schema = getattr(self, key, None)
if isinstance(schema, ... | (self) | [
0.012018571607768536,
-0.01338452659547329,
-0.023395419120788574,
-0.04675417020916939,
-0.03454308211803436,
-0.0025325175374746323,
0.02867589145898819,
-0.05537160485982895,
0.08067385852336884,
0.036449916660785675,
-0.03575319051742554,
0.02205696702003479,
0.006981039419770241,
-0.0... |
721,977 | apprise.url | split_path | Splits a URL up into a list object.
Parses a specified URL and breaks it into a list.
Args:
path (str): The path to split up into a list.
unquote (:obj:`bool`, optional): call unquote on each element
added to the returned list.
Returns:
lis... | @staticmethod
def split_path(path, unquote=True):
"""Splits a URL up into a list object.
Parses a specified URL and breaks it into a list.
Args:
path (str): The path to split up into a list.
unquote (:obj:`bool`, optional): call unquote on each element
added to the returned list... | (path, unquote=True) | [
-0.03795887902379036,
0.0037322372663766146,
-0.06466540694236755,
-0.004976316355168819,
-0.04397675022482872,
0.016121840104460716,
0.05003022775053978,
-0.006600963417440653,
-0.0009185932576656342,
0.017937883734703064,
0.07200080156326294,
0.026208005845546722,
0.0014788740081712604,
... |
721,978 | apprise.url | throttle |
A common throttle control
if a wait is specified, then it will force a sleep of the
specified time if it is larger then the calculated throttle
time.
| def throttle(self, last_io=None, wait=None):
"""
A common throttle control
if a wait is specified, then it will force a sleep of the
specified time if it is larger then the calculated throttle
time.
"""
if last_io is not None:
# Assume specified last_io
self._last_io_datetime... | (self, last_io=None, wait=None) | [
-0.017847899347543716,
-0.02894352376461029,
-0.08241422474384308,
-0.004329666495323181,
0.013422423042356968,
0.007149196695536375,
-0.037995219230651855,
-0.013294677250087261,
-0.08606410026550293,
-0.058252036571502686,
-0.02210000529885292,
-0.009115567430853844,
0.015758343040943146,
... |
721,979 | apprise.url | unquote |
Replace %xx escapes by their single-character equivalent. The optional
encoding and errors parameters specify how to decode percent-encoded
sequences.
Wrapper to Python's `unquote` while remaining compatible with both
Python 2 & 3 since the reference to this function changed be... | @staticmethod
def unquote(content, encoding='utf-8', errors='replace'):
"""
Replace %xx escapes by their single-character equivalent. The optional
encoding and errors parameters specify how to decode percent-encoded
sequences.
Wrapper to Python's `unquote` while remaining compatible with both
Py... | (content, encoding='utf-8', errors='replace') | [
-0.04720479995012283,
-0.010100126266479492,
0.024576975032687187,
0.04295211657881737,
-0.00918757077306509,
0.028971415013074875,
0.01212015189230442,
-0.022450631484389305,
0.09207062423229218,
-0.01911936141550541,
0.04894131422042847,
0.06822015345096588,
-0.02383275516331196,
0.04738... |
721,980 | apprise.url | url |
Assembles the URL associated with the notification based on the
arguments provied.
| def url(self, privacy=False, *args, **kwargs):
"""
Assembles the URL associated with the notification based on the
arguments provied.
"""
# Our default parameters
params = self.url_parameters(privacy=privacy, *args, **kwargs)
# Determine Authentication
auth = ''
if self.user and self... | (self, privacy=False, *args, **kwargs) | [
-0.04688991978764534,
-0.006197834853082895,
0.01976485550403595,
0.012997052632272243,
0.030679507181048393,
-0.04118127003312111,
0.0048155514523386955,
0.004981604870408773,
0.021739544346928596,
0.02897409163415432,
-0.01360741164535284,
0.033192750066518784,
0.04735666513442993,
-0.01... |
721,981 | apprise.url | url_parameters |
Provides a default set of args to work with. This can greatly
simplify URL construction in the acommpanied url() function.
The following property returns a dictionary (of strings) containing
all of the parameters that can be set on a URL and managed through
this class.
| def url_parameters(self, *args, **kwargs):
"""
Provides a default set of args to work with. This can greatly
simplify URL construction in the acommpanied url() function.
The following property returns a dictionary (of strings) containing
all of the parameters that can be set on a URL and managed thr... | (self, *args, **kwargs) | [
-0.02880985662341118,
0.010447531007230282,
0.019203273579478264,
-0.02026187814772129,
-0.003927717451006174,
0.013296857476234436,
-0.0618145577609539,
0.014652266167104244,
0.01931210234761238,
-0.03130301833152771,
-0.018174350261688232,
0.05200020968914032,
-0.0035492912866175175,
0.0... |
721,982 | apprise.url | urlencode | Convert a mapping object or a sequence of two-element tuples
Wrapper to Python's `urlencode` while remaining compatible with both
Python 2 & 3 since the reference to this function changed between
versions.
The resulting string is a series of key=value pairs separated by '&'
cha... | @staticmethod
def urlencode(query, doseq=False, safe='', encoding=None, errors=None):
"""Convert a mapping object or a sequence of two-element tuples
Wrapper to Python's `urlencode` while remaining compatible with both
Python 2 & 3 since the reference to this function changed between
versions.
The r... | (query, doseq=False, safe='', encoding=None, errors=None) | [
-0.032628294080495834,
0.01591411978006363,
-0.02575826272368431,
0.01897519640624523,
-0.037915606051683426,
-0.015679320320487022,
-0.027480117976665497,
-0.0472031906247139,
0.04824674129486084,
-0.03565458580851555,
-0.011461644433438778,
0.03492410108447075,
0.027480117976665497,
0.06... |
721,983 | apprise.config.base | ConfigBase |
This is the base class for all supported configuration sources
| class ConfigBase(URLBase):
"""
This is the base class for all supported configuration sources
"""
# The Default Encoding to use if not otherwise detected
encoding = 'utf-8'
# The default expected configuration format unless otherwise
# detected by the sub-modules
default_config_format ... | (cache=True, recursion=0, insecure_includes=False, **kwargs) | [
0.003262696787714958,
-0.07157710939645767,
-0.03651852905750275,
0.008054397068917751,
0.0004830542311538011,
0.03855062648653984,
-0.024227311834692955,
-0.004569748416543007,
-0.04131269454956055,
-0.043088313192129135,
0.004283676855266094,
0.017312269657850266,
-0.0159805566072464,
0.... |
721,984 | apprise.config.base | __normalize_tag_groups |
Used to normalize a tag assign map which looks like:
{
'group': set('{tag1}', '{group1}', '{tag2}'),
'group1': set('{tag2}','{tag3}'),
}
Then normalized it (merging groups); with respect to the above, the
output would be:
{
... | @staticmethod
def __normalize_tag_groups(group_tags):
"""
Used to normalize a tag assign map which looks like:
{
'group': set('{tag1}', '{group1}', '{tag2}'),
'group1': set('{tag2}','{tag3}'),
}
Then normalized it (merging groups); with respect to the above, the
output ... | (group_tags) | [
0.050931163132190704,
-0.005499117076396942,
-0.08104764670133591,
0.015439461916685104,
-0.019747262820601463,
-0.02950652688741684,
-0.013781148940324783,
-0.03156512230634689,
0.03976137936115265,
-0.028648778796195984,
-0.0000967944652074948,
-0.00034994923043996096,
0.02975432015955448,... |
721,985 | apprise.config.base | __bool__ |
Allows the Apprise object to be wrapped in an 'if statement'.
True is returned if our content was downloaded correctly.
| def __bool__(self):
"""
Allows the Apprise object to be wrapped in an 'if statement'.
True is returned if our content was downloaded correctly.
"""
if not isinstance(self._cached_servers, list):
# Generate ourselves a list of content we can pull from
self.servers()
return True if... | (self) | [
0.03574379161000252,
-0.05485840514302254,
-0.048993490636348724,
0.015627849847078323,
0.057933907955884933,
-0.008555980399250984,
-0.00045959337148815393,
0.0087258480489254,
-0.002447439357638359,
0.0027648243121802807,
0.025784164667129517,
0.04577494040131569,
-0.0027156518772244453,
... |
721,987 | apprise.config.base | __getitem__ |
Returns the indexed server entry associated with the loaded
notification servers
| def __getitem__(self, index):
"""
Returns the indexed server entry associated with the loaded
notification servers
"""
if not isinstance(self._cached_servers, list):
# Generate ourselves a list of content we can pull from
self.servers()
return self._cached_servers[index]
| (self, index) | [
0.02529393695294857,
-0.0122268320992589,
-0.0998038724064827,
-0.002576551865786314,
0.051959749311208725,
0.014610463753342628,
0.004857293330132961,
0.034931354224681854,
0.06845653802156448,
-0.014824818819761276,
-0.036663345992565155,
0.020046517252922058,
-0.023150382563471794,
-0.0... |
721,988 | apprise.config.base | __init__ |
Initialize some general logging and common server arguments that will
keep things consistent when working with the configurations that
inherit this class.
By default we cache our responses so that subsiquent calls does not
cause the content to be retrieved again. For local fil... | def __init__(self, cache=True, recursion=0, insecure_includes=False,
**kwargs):
"""
Initialize some general logging and common server arguments that will
keep things consistent when working with the configurations that
inherit this class.
By default we cache our responses so that subsiq... | (self, cache=True, recursion=0, insecure_includes=False, **kwargs) | [
-0.013640543445944786,
-0.072749562561512,
0.002883483190089464,
0.02608003281056881,
0.007821150124073029,
0.029435358941555023,
-0.03694671392440796,
0.01132422499358654,
-0.029721323400735855,
-0.04937667027115822,
0.015709025785326958,
0.05135936290025711,
-0.02449769154191017,
0.01553... |
721,989 | apprise.config.base | __iter__ |
Returns an iterator to our server list
| def __iter__(self):
"""
Returns an iterator to our server list
"""
if not isinstance(self._cached_servers, list):
# Generate ourselves a list of content we can pull from
self.servers()
return iter(self._cached_servers)
| (self) | [
0.034428250044584274,
-0.04544879496097565,
-0.10021862387657166,
-0.004739359952509403,
-0.013017908670008183,
0.019903559237718582,
0.002956624608486891,
0.039982326328754425,
0.07667075097560883,
0.006088456604629755,
-0.008729708380997181,
0.021603070199489594,
-0.04923327639698982,
0.... |
721,990 | apprise.config.base | __len__ |
Returns the total number of servers loaded
| def __len__(self):
"""
Returns the total number of servers loaded
"""
if not isinstance(self._cached_servers, list):
# Generate ourselves a list of content we can pull from
self.servers()
return len(self._cached_servers)
| (self) | [
-0.012900218367576599,
-0.04845612868666649,
-0.06123799458146095,
0.0425385981798172,
0.04791509732604027,
0.06299635022878647,
-0.0009304261184297502,
-0.024532394483685493,
0.019781462848186493,
-0.03276621550321579,
-0.0044804164208471775,
0.013973827473819256,
-0.010338773019611835,
-... |
721,992 | apprise.config.base | _special_token_handler |
This function takes a list of tokens and updates them to no longer
include any special tokens such as +,-, and :
- schema must be a valid schema of a supported plugin type
- tokens must be a dictionary containing the yaml entries parsed.
The idea here is we can post process a ... | @staticmethod
def _special_token_handler(schema, tokens):
"""
This function takes a list of tokens and updates them to no longer
include any special tokens such as +,-, and :
- schema must be a valid schema of a supported plugin type
- tokens must be a dictionary containing the yaml entries parsed.
... | (schema, tokens) | [
0.06984513252973557,
-0.044129423797130585,
0.006800970993936062,
-0.02410847507417202,
-0.01489169616252184,
0.01869150996208191,
0.017788682132959366,
0.0011310148984193802,
0.031926367431879044,
-0.03273990377783775,
0.024386268109083176,
0.030537402257323265,
-0.010298187844455242,
-0.... |
721,993 | apprise.config.base | config_parse |
Takes the specified config content and loads it based on the specified
config_format. If a format isn't specified, then it is auto detected.
| @staticmethod
def config_parse(content, asset=None, config_format=None, **kwargs):
"""
Takes the specified config content and loads it based on the specified
config_format. If a format isn't specified, then it is auto detected.
"""
if config_format is None:
# Detect the format
config... | (content, asset=None, config_format=None, **kwargs) | [
0.03494860231876373,
-0.06295135617256165,
0.001539968536235392,
-0.05830860137939453,
-0.018388230353593826,
0.06050202623009682,
0.020819278433918953,
0.007672424893826246,
-0.023780403658747673,
-0.029538150876760483,
0.01698078028857708,
0.032060589641332626,
-0.032517556101083755,
-0.... |
721,994 | apprise.config.base | config_parse_text |
Parse the specified content as though it were a simple text file only
containing a list of URLs.
Return a tuple that looks like (servers, configs) where:
- servers contains a list of loaded notification plugins
- configs contains a list of additional configuration files
... | @staticmethod
def config_parse_text(content, asset=None):
"""
Parse the specified content as though it were a simple text file only
containing a list of URLs.
Return a tuple that looks like (servers, configs) where:
- servers contains a list of loaded notification plugins
- configs contains ... | (content, asset=None) | [
0.007285201456397772,
-0.037710390985012054,
-0.09466550499200821,
-0.004100557882338762,
0.010790941305458546,
0.01452829223126173,
0.013780822046101093,
0.012475380674004555,
-0.008732766844332218,
-0.017297089099884033,
-0.006100829690694809,
0.01839197613298893,
-0.027561644092202187,
... |
721,995 | apprise.config.base | config_parse_yaml |
Parse the specified content as though it were a yaml file
specifically formatted for Apprise.
Return a tuple that looks like (servers, configs) where:
- servers contains a list of loaded notification plugins
- configs contains a list of additional configuration files
... | @staticmethod
def config_parse_yaml(content, asset=None):
"""
Parse the specified content as though it were a yaml file
specifically formatted for Apprise.
Return a tuple that looks like (servers, configs) where:
- servers contains a list of loaded notification plugins
- configs contains a l... | (content, asset=None) | [
0.013769296929240227,
-0.030964234843850136,
-0.07781098783016205,
-0.02902897074818611,
-0.005321978125721216,
0.04600146412849426,
-0.008319414220750332,
-0.033833764493465424,
-0.03174278885126114,
-0.0024482766166329384,
-0.01425867434591055,
-0.013680319301784039,
-0.02856183797121048,
... |
721,996 | apprise.config.base | detect_config_format |
Takes the specified content and attempts to detect the format type
The function returns the actual format type if detected, otherwise
it returns None
| @staticmethod
def detect_config_format(content, **kwargs):
"""
Takes the specified content and attempts to detect the format type
The function returns the actual format type if detected, otherwise
it returns None
"""
# Detect Format Logic:
# - A pound/hashtag (#) is alawys a comment charact... | (content, **kwargs) | [
0.02075289934873581,
-0.10549867153167725,
0.05362595245242119,
-0.005245395470410585,
-0.02098158188164234,
-0.02747996523976326,
0.06033395975828171,
-0.005974319763481617,
-0.012606100179255009,
-0.017294082790613174,
0.010157296434044838,
0.027346566319465637,
-0.02340180054306984,
-0.... |
721,998 | apprise.config.base | expired |
Simply returns True if the configuration should be considered
as expired or False if content should be retrieved.
| def expired(self):
"""
Simply returns True if the configuration should be considered
as expired or False if content should be retrieved.
"""
if isinstance(self._cached_servers, list) and self.cache:
# We have enough reason to look further into our cached content
# and verify it has n... | (self) | [
0.06575079262256622,
-0.002032061805948615,
0.01735234074294567,
0.0023728960659354925,
0.08207631856203079,
0.01065646018832922,
-0.028284920379519463,
-0.021951446309685707,
0.02935488149523735,
-0.006238559260964394,
0.012106084264814854,
0.0010057843755930662,
0.012917183339595795,
0.0... |
722,002 | apprise.config.base | parse_url | Parses the URL and returns it broken apart into a dictionary.
This is very specific and customized for Apprise.
Args:
url (str): The URL you want to fully parse.
verify_host (:obj:`bool`, optional): a flag kept with the parsed
URL which some child classes will ... | @staticmethod
def parse_url(url, verify_host=True):
"""Parses the URL and returns it broken apart into a dictionary.
This is very specific and customized for Apprise.
Args:
url (str): The URL you want to fully parse.
verify_host (:obj:`bool`, optional): a flag kept with the parsed
... | (url, verify_host=True) | [
-0.011426625773310661,
-0.04815233498811722,
-0.037203412503004074,
0.014311944134533405,
-0.01112089678645134,
0.020273661240935326,
-0.01522913109511137,
-0.013566729612648487,
-0.004905996844172478,
-0.0236175749450922,
-0.002622582484036684,
0.06122225522994995,
0.017904261127114296,
0... |
722,003 | apprise.config.base | pop |
Removes an indexed Notification Service from the stack and returns it.
By default, the last element of the list is removed.
| def pop(self, index=-1):
"""
Removes an indexed Notification Service from the stack and returns it.
By default, the last element of the list is removed.
"""
if not isinstance(self._cached_servers, list):
# Generate ourselves a list of content we can pull from
self.servers()
# Pop... | (self, index=-1) | [
-0.002631282201036811,
0.02151460014283657,
-0.09066744893789291,
-0.037938617169857025,
0.007433801889419556,
-0.026347216218709946,
-0.02239169552922249,
0.04505855590105057,
0.10401303321123123,
-0.023595549166202545,
-0.0248166024684906,
-0.01488480158150196,
-0.07690910995006561,
-0.0... |
722,007 | apprise.config.base | read |
This object should be implimented by the child classes
| def read(self):
"""
This object should be implimented by the child classes
"""
return None
| (self) | [
-0.010167705826461315,
-0.025533555075526237,
-0.047545239329338074,
0.024940932169556618,
0.006125174928456545,
-0.03298366442322731,
0.024263650178909302,
0.06346138566732407,
0.0316629633307457,
-0.05052528530359268,
0.009930656291544437,
-0.004465832374989986,
-0.02570287510752678,
0.0... |
722,009 | apprise.config.base | servers |
Performs reads loaded configuration and returns all of the services
that could be parsed and loaded.
| def servers(self, asset=None, **kwargs):
"""
Performs reads loaded configuration and returns all of the services
that could be parsed and loaded.
"""
if not self.expired():
# We already have cached results to return; use them
return self._cached_servers
# Our cached response obje... | (self, asset=None, **kwargs) | [
0.010125967673957348,
-0.05710382014513016,
-0.0526120699942112,
0.013309252448379993,
-0.0010545848635956645,
0.02562250755727291,
-0.00458695599809289,
-0.005385218188166618,
-0.045581504702568054,
-0.022009577602148056,
0.0012681871885433793,
0.030954020097851753,
-0.030329080298542976,
... |
722,016 | apprise.common | ConfigFormat |
A list of pre-defined config formats that can be passed via the
apprise library.
| class ConfigFormat:
"""
A list of pre-defined config formats that can be passed via the
apprise library.
"""
# A text based configuration. This consists of a list of URLs delimited by
# a new line. pound/hashtag (#) or semi-colon (;) can be used as comment
# characters.
TEXT = 'text'
... | () | [
-0.005426529794931412,
-0.07440989464521408,
0.026283996179699898,
-0.06719392538070679,
0.013384470716118813,
-0.011978131718933582,
0.0017373140435665846,
-0.011949034407734871,
0.003828637534752488,
0.0033679401967674494,
-0.021453948691487312,
0.0080694779753685,
-0.004163249395787716,
... |
722,017 | apprise.common | ContentIncludeMode |
The different Content inclusion modes. All content based plugins will
have one of these associated with it.
| class ContentIncludeMode:
"""
The different Content inclusion modes. All content based plugins will
have one of these associated with it.
"""
# - Content inclusion of same type only; hence a file:// can include
# a file://
# - Cross file inclusion is not allowed unless insecure_includes (... | () | [
0.014415815472602844,
-0.07991298288106918,
-0.02462850883603096,
-0.022696860134601593,
0.08291776478290558,
0.05018706992268562,
0.06911006569862366,
0.01033789198845625,
-0.0564112663269043,
-0.02035384252667427,
0.026452841237187386,
-0.008692414499819279,
-0.04771885275840759,
0.00001... |
722,018 | apprise.common | ContentLocation |
This is primarily used for handling file attachments. The idea is
to track the source of the attachment itself. We don't want
remote calls to a server to access local attachments for example.
By knowing the attachment type and cross-associating it with how
we plan on accessing the content, we ca... | class ContentLocation:
"""
This is primarily used for handling file attachments. The idea is
to track the source of the attachment itself. We don't want
remote calls to a server to access local attachments for example.
By knowing the attachment type and cross-associating it with how
we plan o... | () | [
0.0667002946138382,
-0.05392304062843323,
-0.06860166788101196,
0.038008518517017365,
0.06259331852197647,
-0.05365685001015663,
0.037970490753650665,
0.004083206411451101,
-0.0015817077364772558,
-0.006849709432572126,
-0.01024841982871294,
0.02156161144375801,
-0.011027984321117401,
0.00... |
722,019 | apprise.logger | LogCapture |
A class used to allow one to instantiate loggers that write to
memory for temporary purposes. e.g.:
1. with LogCapture() as captured:
2.
3. # Send our notification(s)
4. aobj.notify("hello world")
5.
6. # retrieve our logs produced by the above call vi... | class LogCapture:
"""
A class used to allow one to instantiate loggers that write to
memory for temporary purposes. e.g.:
1. with LogCapture() as captured:
2.
3. # Send our notification(s)
4. aobj.notify("hello world")
5.
6. # retrieve our logs prod... | (path=None, level=None, name='apprise', delete=True, fmt='%(asctime)s - %(levelname)s - %(message)s') | [
0.022850919514894485,
-0.03378496319055557,
-0.04410473257303238,
0.043613314628601074,
0.05397403612732887,
-0.00790875218808651,
-0.027294153347611427,
0.07027272135019302,
0.00027690231218002737,
-0.06335192173719406,
0.021049054339528084,
-0.004737573210150003,
0.024304697290062904,
0.... |
722,020 | apprise.logger | __enter__ |
Allows logger manipulation within a 'with' block
| def __enter__(self):
"""
Allows logger manipulation within a 'with' block
"""
if self.__level is not None:
# Temporary adjust our log level if required
self.__restore_level = self.__logger.getEffectiveLevel()
if self.__restore_level > self.__level:
# Bump our log leve... | (self) | [
0.027016060426831245,
-0.03263525664806366,
-0.026247311383485794,
0.07032229006290436,
0.03567364811897278,
-0.003155076876282692,
-0.0429401621222496,
0.046637482941150665,
0.009380576200783253,
-0.055386584252119064,
0.023520080372691154,
-0.0761428251862526,
0.01396561972796917,
0.0210... |
722,021 | apprise.logger | __exit__ |
removes the handler gracefully when the with block has completed
| def __exit__(self, exc_type, exc_value, tb):
"""
removes the handler gracefully when the with block has completed
"""
# Flush our content
self.__handler.flush()
self.__buffer_ptr.flush()
# Drop our handler
self.__logger.removeHandler(self.__handler)
if self.__restore_level is not Non... | (self, exc_type, exc_value, tb) | [
0.011495301499962807,
-0.014416311867535114,
-0.027340661734342575,
0.029497716575860977,
0.014703919179737568,
-0.029983052983880043,
-0.04454316943883896,
0.09771455824375153,
-0.024248884990811348,
-0.03000102937221527,
0.03285912424325943,
-0.029192132875323296,
0.01210646703839302,
-0... |
722,022 | apprise.logger | __init__ |
Instantiate a temporary log capture object
If a path is specified, then log content is sent to that file instead
of a StringIO object.
You can optionally specify a logging level such as logging.INFO if you
wish, otherwise by default the script uses whatever logging has been
... | def __init__(self, path=None, level=None, name=LOGGER_NAME, delete=True,
fmt='%(asctime)s - %(levelname)s - %(message)s'):
"""
Instantiate a temporary log capture object
If a path is specified, then log content is sent to that file instead
of a StringIO object.
You can optionally specif... | (self, path=None, level=None, name='apprise', delete=True, fmt='%(asctime)s - %(levelname)s - %(message)s') | [
0.0019557634368538857,
-0.019856400787830353,
-0.048832036554813385,
0.03235857933759689,
0.03131060302257538,
-0.019801244139671326,
-0.018716495484113693,
0.06490100920200348,
-0.02671421319246292,
-0.017015831544995308,
0.009928200393915176,
0.038425810635089874,
-0.004293027333915234,
... |
722,023 | apprise.plugins.base | NotifyBase |
This is the base class for all notification services
| class NotifyBase(URLBase):
"""
This is the base class for all notification services
"""
# An internal flag used to test the state of the plugin. If set to
# False, then the plugin is not used. Plugins can disable themselves
# due to enviroment issues (such as missing libraries, or platform
... | (**kwargs) | [
-0.004718120209872723,
-0.086675263941288,
-0.05102476850152016,
-0.0018786139553412795,
0.06350243836641312,
-0.01975260116159916,
0.006773593835532665,
0.026671025902032852,
-0.025668354704976082,
-0.025356413796544075,
0.010567029006779194,
0.0018410137854516506,
0.026871560141444206,
-... |
722,025 | apprise.plugins.base | __init__ |
Initialize some general configuration that will keep things consistent
when working with the notifiers that will inherit this class.
| def __init__(self, **kwargs):
"""
Initialize some general configuration that will keep things consistent
when working with the notifiers that will inherit this class.
"""
super().__init__(**kwargs)
# Store our interpret_emoji's setting
# If asset emoji value is set to a default of True and t... | (self, **kwargs) | [
0.004246877506375313,
-0.09720732271671295,
0.023350968956947327,
0.010066334158182144,
0.027355559170246124,
-0.02861727960407734,
0.00013607207802124321,
0.03474302217364311,
0.019053805619478226,
0.0035200167912989855,
0.04805508628487587,
0.0672917515039444,
0.004091448150575161,
0.020... |
722,026 | apprise.url | __len__ |
Should be over-ridden and allows the tracking of how many targets
are associated with each URLBase object.
Default is always 1
| def __len__(self):
"""
Should be over-ridden and allows the tracking of how many targets
are associated with each URLBase object.
Default is always 1
"""
return 1
| (self) | [
-0.051818329840898514,
-0.031164880841970444,
-0.07979284226894379,
0.03432166948914528,
-0.035429902374744415,
0.07139713317155838,
-0.014474206604063511,
-0.01676623523235321,
-0.02782338671386242,
-0.0056838965974748135,
0.01999858394265175,
0.007295873016119003,
0.028612583875656128,
0... |
722,028 | apprise.plugins.base | _apply_overflow |
Takes the message body and title as input. This function then
applies any defined overflow restrictions associated with the
notification service and may alter the message if/as required.
The function will always return a list object in the following
structure:
[
... | def _apply_overflow(self, body, title=None, overflow=None,
body_format=None):
"""
Takes the message body and title as input. This function then
applies any defined overflow restrictions associated with the
notification service and may alter the message if/as required.
The functi... | (self, body, title=None, overflow=None, body_format=None) | [
-0.025593619793653488,
-0.012401236221194267,
-0.06526966392993927,
-0.035008274018764496,
0.016000956296920776,
-0.00861856248229742,
-0.016099849715828896,
-0.035621412098407745,
-0.009810227900743484,
-0.02205323427915573,
0.043552666902542114,
0.0020841790828853846,
0.012361678294837475,... |
722,029 | apprise.plugins.base | _build_send_calls |
Get a list of dictionaries that can be used to call send() or
(in the future) async_send().
| def _build_send_calls(self, body=None, title=None,
notify_type=NotifyType.INFO, overflow=None,
attach=None, body_format=None, **kwargs):
"""
Get a list of dictionaries that can be used to call send() or
(in the future) async_send().
"""
if not self.enabled... | (self, body=None, title=None, notify_type='info', overflow=None, attach=None, body_format=None, **kwargs) | [
-0.02408856526017189,
-0.06289684772491455,
-0.04079795628786087,
0.00514803733676672,
-0.008827966637909412,
-0.02965192310512066,
-0.05192466825246811,
0.0173178818076849,
-0.02789405547082424,
0.014787326566874981,
0.04941343143582344,
0.02285226434469223,
0.003349121892824769,
-0.01430... |
722,030 | apprise.plugins.base | async_notify |
Performs notification for asynchronous callers
| def notify(self, *args, **kwargs):
"""
Performs notification
"""
try:
# Build a list of dictionaries that can be used to call send().
send_calls = list(self._build_send_calls(*args, **kwargs))
except TypeError:
# Internal error
return False
else:
# Loop th... | (self, *args, **kwargs) | [
0.031393151730298996,
-0.04581410065293312,
-0.009417945519089699,
0.0345957987010479,
-0.02496976964175701,
-0.04585028812289238,
-0.018618764355778694,
0.018709233030676842,
0.020663389936089516,
-0.012457744218409061,
0.03667661175131798,
-0.0017822625814005733,
0.01899873837828636,
-0.... |
722,031 | apprise.plugins.base | color |
Returns the html color (hex code) associated with the notify_type
| def color(self, notify_type, color_type=None):
"""
Returns the html color (hex code) associated with the notify_type
"""
if notify_type not in NOTIFY_TYPES:
return None
return self.asset.color(
notify_type=notify_type,
color_type=color_type,
)
| (self, notify_type, color_type=None) | [
-0.006562229245901108,
-0.07354632765054703,
0.03162562847137451,
0.012304730713367462,
0.06300445646047592,
-0.04142710193991661,
-0.009933690540492535,
0.013873672112822533,
0.04128607362508774,
-0.018245553597807884,
0.027994144707918167,
-0.0012912916718050838,
0.0484432689845562,
-0.0... |
722,034 | apprise.plugins.base | image_path |
Returns the path of the image if it can
| def image_path(self, notify_type, extension=None):
"""
Returns the path of the image if it can
"""
if not self.image_size:
return None
if notify_type not in NOTIFY_TYPES:
return None
return self.asset.image_path(
notify_type=notify_type,
image_size=self.image_size... | (self, notify_type, extension=None) | [
0.04764571040868759,
-0.06364720314741135,
-0.029222462326288223,
0.0413312166929245,
0.049224331974983215,
-0.06196094676852226,
0.008978418074548244,
0.034801460802555084,
0.04603120684623718,
-0.016279548406600952,
0.07563038915395737,
0.016871532425284386,
0.04847089946269989,
-0.05284... |
722,035 | apprise.plugins.base | image_raw |
Returns the raw image if it can
| def image_raw(self, notify_type, extension=None):
"""
Returns the raw image if it can
"""
if not self.image_size:
return None
if notify_type not in NOTIFY_TYPES:
return None
return self.asset.image_raw(
notify_type=notify_type,
image_size=self.image_size,
... | (self, notify_type, extension=None) | [
0.04323449730873108,
-0.09677985310554504,
-0.011368609964847565,
0.03701242431998253,
0.03496803343296051,
-0.06645170599222183,
-0.0155907291918993,
0.029332613572478294,
0.07829141616821289,
-0.037723518908023834,
0.05400756374001503,
0.0434478223323822,
0.02175946719944477,
-0.02743043... |
722,036 | apprise.plugins.base | image_url |
Returns Image URL if possible
| def image_url(self, notify_type, logo=False, extension=None,
image_size=None):
"""
Returns Image URL if possible
"""
if not self.image_size:
return None
if notify_type not in NOTIFY_TYPES:
return None
return self.asset.image_url(
notify_type=notify_type,
... | (self, notify_type, logo=False, extension=None, image_size=None) | [
0.030121881514787674,
-0.06991388648748398,
-0.0041264756582677364,
0.012171018868684769,
0.027861814945936203,
-0.06079951673746109,
-0.002331852214410901,
-0.006562531925737858,
0.04394163936376572,
-0.0075443643145263195,
0.03949560225009918,
0.021229812875390053,
0.042311426252126694,
... |
722,037 | apprise.plugins.base | notify |
Performs notification
| def notify(self, *args, **kwargs):
"""
Performs notification
"""
try:
# Build a list of dictionaries that can be used to call send().
send_calls = list(self._build_send_calls(*args, **kwargs))
except TypeError:
# Internal error
return False
else:
# Loop th... | (self, *args, **kwargs) | [
0.031340617686510086,
-0.045816656202077866,
-0.009418470785021782,
0.03467010706663132,
-0.02506163716316223,
-0.045816656202077866,
-0.018637897446751595,
0.01874646730720997,
0.02066454105079174,
-0.012476533651351929,
0.03671484813094139,
-0.0017812310252338648,
0.019017891958355904,
-... |
722,039 | apprise.plugins.base | parse_native_url |
This is a base class that can be optionally over-ridden by child
classes who can build their Apprise URL based on the one provided
by the notification service they choose to use.
The intent of this is to make Apprise a little more userfriendly
to people who aren't familiar with... | @staticmethod
def parse_native_url(url):
"""
This is a base class that can be optionally over-ridden by child
classes who can build their Apprise URL based on the one provided
by the notification service they choose to use.
The intent of this is to make Apprise a little more userfriendly
to peop... | (url) | [
-0.024558749049901962,
-0.08177939057350159,
-0.029901480302214622,
0.05966048687696457,
-0.00304980855435133,
-0.04733658954501152,
0.031575534492731094,
0.04138835147023201,
0.04968739300966263,
0.024238185957074165,
0.010854646563529968,
0.05189571902155876,
0.03492364659905434,
0.00760... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.