platzky 0.2.1__py3-none-any.whl → 0.2.3__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.
platzky/__init__.py CHANGED
@@ -0,0 +1,3 @@
1
+ from .platzky import create_app_from_config as create_app_from_config
2
+ from .platzky import create_engine as create_engine
3
+ from .platzky import Engine as Engine
platzky/db/graph_ql_db.py CHANGED
@@ -26,14 +26,24 @@ def db_from_config(config: GraphQlDbConfig):
26
26
  return GraphQL(config.endpoint, config.token)
27
27
 
28
28
 
29
- def _standarize_post(post):
29
+ def _standarize_comment(
30
+ comment,
31
+ ): # TODO add tests for checking stadarization of comments
32
+ return {
33
+ "author": comment["author"],
34
+ "comment": comment["comment"],
35
+ "date": comment["createdAt"],
36
+ }
37
+
38
+
39
+ def _standarize_post(post): # TODO add tests for checking stadarization of posts
30
40
  return {
31
41
  "author": post["author"]["name"],
32
42
  "slug": post["slug"],
33
43
  "title": post["title"],
34
44
  "excerpt": post["excerpt"],
35
45
  "contentInMarkdown": post["contentInRichText"]["html"],
36
- "comments": post["comments"],
46
+ "comments": [_standarize_comment(comment) for comment in post["comments"]],
37
47
  "tags": post["tags"],
38
48
  "language": post["language"],
39
49
  "coverImage": {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: platzky
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: Not only blog engine
5
5
  License: MIT
6
6
  Requires-Python: >=3.10,<4.0
@@ -1,4 +1,4 @@
1
- platzky/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1
+ platzky/__init__.py,sha256=kzi_UifSAOPFmTY0uyPbKDdJHu0MtUKKdev9NVFjJfA,160
2
2
  platzky/blog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  platzky/blog/blog.py,sha256=R1Otio2Ix5d02CT9mtYZ_kKMbKJArsuJdJLjCfc4Qxg,3031
4
4
  platzky/blog/comment_form.py,sha256=4lkNJ_S_2DZmJBbz-NPDqahvy2Zz5AGNH2spFeGIop4,513
@@ -7,7 +7,7 @@ platzky/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  platzky/db/db.py,sha256=0smTAiP4MDKOF_t60-KVKs1h-oTGydrWvAgPavFjDDo,2660
8
8
  platzky/db/db_loader.py,sha256=CuEiXxhIa4bFMm0vi7ugzm7j3WycilGRKCU6smgIImE,905
9
9
  platzky/db/google_json_db.py,sha256=65NKwbalGA1FfQz724dAK_3PS9e-MeLUb7WZkVU6nBo,1513
10
- platzky/db/graph_ql_db.py,sha256=OiYxRJ7SwpKTEKNRLC5mvnDs5IYPh6Lsry7PGtl3oS4,6111
10
+ platzky/db/graph_ql_db.py,sha256=jAfz9WK7tYjTFFwurR0piuW_M79vK7IbV9AbQpNLnOo,6444
11
11
  platzky/db/json_db.py,sha256=lbDZiEDWZebd9sssF8td1HKod4o7CdIvHu2fcPFgs7U,3184
12
12
  platzky/db/json_file_db.py,sha256=UQ8TadELmqOzj_tgNfmzhtCkDkMAgcB9vaUy0GQXUY4,1010
13
13
  platzky/models.py,sha256=8ATKVrGRtQ1JV_z7IdYbx1cxBU7ISoXjTmNxTlxok-k,1450
@@ -29,6 +29,6 @@ platzky/templates/post.html,sha256=GSgjIZsOQKtNx3cEbquSjZ5L4whPnG6MzRyoq9k4B8Q,1
29
29
  platzky/templates/robots.txt,sha256=2_j2tiYtYJnzZUrANiX9pvBxyw5Dp27fR_co18BPEJ0,116
30
30
  platzky/templates/sitemap.xml,sha256=iIJZ91_B5ZuNLCHsRtsGKZlBAXojOTP8kffqKLacgvs,578
31
31
  platzky/www_handler.py,sha256=pF6Rmvem1sdVqHD7z3RLrDuG-CwAqfGCti50_NPsB2w,725
32
- platzky-0.2.1.dist-info/METADATA,sha256=v-9-GEm_sYhckJIS0V6XfCpAbttu_urTW7xm1X9SZtg,1591
33
- platzky-0.2.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
34
- platzky-0.2.1.dist-info/RECORD,,
32
+ platzky-0.2.3.dist-info/METADATA,sha256=rwGGJyQN5mC_HiCEf7WSNQmDJUwJi2VrcjEB11edO9E,1591
33
+ platzky-0.2.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
34
+ platzky-0.2.3.dist-info/RECORD,,