appier 1.33.5__py2.py3-none-any.whl → 1.34.1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
appier/base.py CHANGED
@@ -94,7 +94,7 @@ NAME = "appier"
94
94
  """ The name to be used to describe the framework while working
95
95
  on its own environment, this is just a descriptive value """
96
96
 
97
- VERSION = "1.33.5"
97
+ VERSION = "1.34.1"
98
98
  """ The version of the framework that is currently installed
99
99
  this value may be used for debugging/diagnostic purposes """
100
100
 
appier/part.pyi CHANGED
@@ -1 +1,3 @@
1
- class Part: ...
1
+ class Part:
2
+ def load(self): ...
3
+ def unload(self): ...
appier/scheduler.py CHANGED
@@ -30,7 +30,6 @@ __license__ = "Apache License, Version 2.0"
30
30
 
31
31
  import time
32
32
  import heapq
33
- import calendar
34
33
  import datetime
35
34
  import logging
36
35
  import threading
@@ -187,6 +186,12 @@ class SchedulerTask(object):
187
186
  self.date = SchedulerDate.from_cron(cron)
188
187
  self._enabled = True
189
188
 
189
+ def __repr__(self):
190
+ return "<SchedulerTask: %s, %s>" % (self.job, self.date)
191
+
192
+ def __str__(self):
193
+ return "<SchedulerTask: %s, %s>" % (self.job, self.date)
194
+
190
195
  def __eq__(self, other):
191
196
  if isinstance(other, self.__class__):
192
197
  return True
@@ -223,6 +228,12 @@ class SchedulerDate(object):
223
228
  self.months = self._parse_field(months, 1, 12)
224
229
  self.days_of_week = self._parse_field(days_of_week, 0, 6)
225
230
 
231
+ def __repr__(self):
232
+ return "<SchedulerDate: %s>" % self.next_run()
233
+
234
+ def __str__(self):
235
+ return "<SchedulerDate: %s>" % self.next_run()
236
+
226
237
  @classmethod
227
238
  def from_cron(cls, cron):
228
239
  if isinstance(cron, cls):
appier/typesf.py CHANGED
@@ -28,9 +28,11 @@ __copyright__ = "Copyright (c) 2008-2024 Hive Solutions Lda."
28
28
  __license__ = "Apache License, Version 2.0"
29
29
  """ The license for the module """
30
30
 
31
+ import os
31
32
  import uuid
32
33
  import base64
33
34
  import hashlib
35
+ import mimetypes
34
36
 
35
37
  from . import util
36
38
  from . import crypt
@@ -85,6 +87,17 @@ class File(AbstractType):
85
87
  def __len__(self):
86
88
  return self.size
87
89
 
90
+ @classmethod
91
+ def open(cls, path):
92
+ name = os.path.basename(path)
93
+ content_type, _encoding = mimetypes.guess_type(name)
94
+ file = open(path, "rb")
95
+ try:
96
+ data = file.read()
97
+ finally:
98
+ file.close()
99
+ return cls((name, content_type, data))
100
+
88
101
  def build_d(self, file_d, name="default"):
89
102
  self.build_t((name, None, file_d))
90
103
 
@@ -192,6 +205,15 @@ class File(AbstractType):
192
205
  engine = self._engine()
193
206
  return engine.cleanup(self)
194
207
 
208
+ def save(self, path=None):
209
+ path = path or self.file_name
210
+ data = self.read()
211
+ file = open(path, "wb")
212
+ try:
213
+ file.write(data)
214
+ finally:
215
+ file.close()
216
+
195
217
  def json_v(self, *args, **kwargs):
196
218
  if not self.is_valid():
197
219
  return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: appier
3
- Version: 1.33.5
3
+ Version: 1.34.1
4
4
  Summary: Appier Framework
5
5
  Home-page: http://appier.hive.pt
6
6
  Author: Hive Solutions Lda.
@@ -6,7 +6,7 @@ appier/async_neo.py,sha256=gQpyT1-nZE6Uynh5FEmFl5kfXkxChdUsgiKgwlaNw5E,5446
6
6
  appier/async_old.py,sha256=m3BFqHVPCRuIZ9L2sGYhCQPEwuCNKBO2y7SKM0dbtj8,9194
7
7
  appier/asynchronous.py,sha256=a1LQa3wbGMaXELhF7W71dRr1klPOj6x-ST9EInvPhtU,1757
8
8
  appier/asynchronous.pyi,sha256=5CpLkpKcUq09woMOVYwpl24Pli0A8Xu6nXoT20xDQ-o,104
9
- appier/base.py,sha256=FHxWkZJuWrM4-oyq0vjuL-lFq_nEDfWSrbHbkWwIkzU,270121
9
+ appier/base.py,sha256=zVLPCB134n1QkVGriSLnkn-VXvGobhtT9aATVxxoh6A,270121
10
10
  appier/base.pyi,sha256=Vx8idYnMvP3nLwGdd2LJKGc0RFpT6iav77YMcBpcr4o,2515
11
11
  appier/bus.py,sha256=AMC2UXlaf6rzhzlIyTHkzbfb6tdfPBiOii4lpl9AAwg,7670
12
12
  appier/bus.pyi,sha256=W6_MIBpvDq468wfT5XM2WpPuR3O49QiZMOSCdMsJWos,182
@@ -42,13 +42,13 @@ appier/model_a.py,sha256=c6XpG4oIelXNDK0uicsZ69-f6isUgmh5-29F61PZt9c,16176
42
42
  appier/mongo.py,sha256=t-257ReqFWnEw0bQkDvS4McsPsc6AuKoQXIFHxlrOMw,10891
43
43
  appier/observer.py,sha256=T0QpkxdkcNuEOZJdmJT5nFSJ2e-0VPbGveX5YKtt7mA,4519
44
44
  appier/part.py,sha256=LW3ejynHMyxH-iP3dUqmPPPkFYVRPHjwNF4kR1W-_jY,4380
45
- appier/part.pyi,sha256=BHClxTBbnefBTqp0npxgDYNKevFSJlKxhHDg14OLSSs,16
45
+ appier/part.pyi,sha256=1HHFwLw4DGT_neDyJjQ0yojNgx42G06A65uXLgWkUJk,62
46
46
  appier/preferences.py,sha256=3JrH2f8Drzw0zNTDA4MtOYMzhUaBm3Rr4d6E95mL49o,8287
47
47
  appier/preferences.pyi,sha256=uYVgvDq2f4KWlLRY-C8bi6xry_utFKDeToGHH5aptxc,197
48
48
  appier/queuing.py,sha256=6AJlRVdd5JunzChu8Q1U-9Biq4vQUHTuJFC8qs2wzCs,8097
49
49
  appier/redisdb.py,sha256=5inJMQqHVkfsGoqoRGYzewlgooDZD2uwOtlPXHX17V0,3504
50
50
  appier/request.py,sha256=vNiRdBZXgboMx_d3xkGHlJf3f7ifejgKyhYZ4Pr9GlE,31450
51
- appier/scheduler.py,sha256=GMy2izW5I9WdX7N_-WWyl7YLfJnuznxe0GZiTJROnA0,9408
51
+ appier/scheduler.py,sha256=8PcdJQqgbUOrkRfy-2-3N987lGpIUPO9fNYm9QtSjE0,9741
52
52
  appier/scheduler.pyi,sha256=JHqH-DSKFZL1uXJTpWFTVHykRT8QRGrVdYCi0nyhjrQ,2132
53
53
  appier/serialize.py,sha256=LiR1ZbAiC_I3lhlQToPK_u2DC2r04Gl9OEQTayW4Rlg,6669
54
54
  appier/session.py,sha256=6rcwFdsu--7gFLr6mJJh3EFSZ_A3Oe8u7olAvTw2sUk,20380
@@ -57,7 +57,7 @@ appier/settings.py,sha256=28tTRJIZ47iwXqUs6YtUoW7ntEVsp_0-QfONVDGA1sg,1136
57
57
  appier/smtp.py,sha256=5tW0dOEm03kejLoQyhRQFjgjYRd-jhb-VlhEKDb4Zn0,3434
58
58
  appier/storage.py,sha256=Qp_CMCDg85q35n9lggNVBZRWwlGrQ-nLYNj0W7Mnbec,7470
59
59
  appier/structures.py,sha256=lwAEiz4k1O4bywGcfHvOvZJusN-lUwcviihR9aZLMtY,8883
60
- appier/typesf.py,sha256=iby3f-3XayIOu9FgjHS6I9L3UoaJntHtG73eKXgIgFE,36882
60
+ appier/typesf.py,sha256=XIYRQ2M7ErjvjB0SAu4Rkv3aYUOmWhqfZy3sUYyHtpM,37451
61
61
  appier/util.py,sha256=e2682yvqkx8ck6p1RsgoBcCwPHw-QgVfzzTZRYXEBU8,86801
62
62
  appier/validation.py,sha256=vxb289skd7RfGEQVmpkQxYb71JdAfLu17QaKOuAAEEQ,22388
63
63
  appier/res/static/css/base.css,sha256=J9zLozd57KoslAsrsj2a42glGTObxbkrrckR-W-_f2A,6127
@@ -92,8 +92,8 @@ appier/test/structures.py,sha256=MRjUFRlnJi-i7YGWW5y792JbJwicNvOIzVAS220tgeQ,836
92
92
  appier/test/typesf.py,sha256=KHumQFzx7wPZSCb8_mpIwobhIy2Fh_0XYviwPjXMbKI,9680
93
93
  appier/test/util.py,sha256=SSHuBAZQ0TcXLDYI0xUvmwId5nndDZb88s_5Y-Hqibw,46884
94
94
  appier/test/validation.py,sha256=riOCsGKob1P5jnbcB5qGZ45ApimNAVS0byg9v_uUdrk,4952
95
- appier-1.33.5.dist-info/LICENSE,sha256=Pd-b5cKP4n2tFDpdx27qJSIq0d1ok0oEcGTlbtL6QMU,11560
96
- appier-1.33.5.dist-info/METADATA,sha256=MXQBzsrHoKyK4i3zHARYd3Zli3mRY16E-FlIzlD8mZU,1920
97
- appier-1.33.5.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
98
- appier-1.33.5.dist-info/top_level.txt,sha256=Z2e_Y1ya06a554WwQZkfNRiaaQxqsdaPtBzrck384Lo,7
99
- appier-1.33.5.dist-info/RECORD,,
95
+ appier-1.34.1.dist-info/LICENSE,sha256=Pd-b5cKP4n2tFDpdx27qJSIq0d1ok0oEcGTlbtL6QMU,11560
96
+ appier-1.34.1.dist-info/METADATA,sha256=dRqRvcjfXhCFhtijkY6V7HqZ_JcrIr5CKUjhYm2ZdxQ,1920
97
+ appier-1.34.1.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
98
+ appier-1.34.1.dist-info/top_level.txt,sha256=Z2e_Y1ya06a554WwQZkfNRiaaQxqsdaPtBzrck384Lo,7
99
+ appier-1.34.1.dist-info/RECORD,,