platzky 0.2.0__tar.gz → 0.2.1__tar.gz

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.
Files changed (34) hide show
  1. {platzky-0.2.0 → platzky-0.2.1}/PKG-INFO +2 -1
  2. {platzky-0.2.0 → platzky-0.2.1}/platzky/db/db.py +0 -8
  3. {platzky-0.2.0 → platzky-0.2.1}/platzky/db/graph_ql_db.py +0 -34
  4. {platzky-0.2.0 → platzky-0.2.1}/platzky/db/json_db.py +0 -6
  5. {platzky-0.2.0 → platzky-0.2.1}/pyproject.toml +2 -2
  6. {platzky-0.2.0 → platzky-0.2.1}/README.md +0 -0
  7. {platzky-0.2.0 → platzky-0.2.1}/platzky/__init__.py +0 -0
  8. {platzky-0.2.0 → platzky-0.2.1}/platzky/blog/__init__.py +0 -0
  9. {platzky-0.2.0 → platzky-0.2.1}/platzky/blog/blog.py +0 -0
  10. {platzky-0.2.0 → platzky-0.2.1}/platzky/blog/comment_form.py +0 -0
  11. {platzky-0.2.0 → platzky-0.2.1}/platzky/config.py +0 -0
  12. {platzky-0.2.0 → platzky-0.2.1}/platzky/db/__init__.py +0 -0
  13. {platzky-0.2.0 → platzky-0.2.1}/platzky/db/db_loader.py +0 -0
  14. {platzky-0.2.0 → platzky-0.2.1}/platzky/db/google_json_db.py +0 -0
  15. {platzky-0.2.0 → platzky-0.2.1}/platzky/db/json_file_db.py +0 -0
  16. {platzky-0.2.0 → platzky-0.2.1}/platzky/models.py +0 -0
  17. {platzky-0.2.0 → platzky-0.2.1}/platzky/platzky.py +0 -0
  18. {platzky-0.2.0 → platzky-0.2.1}/platzky/plugin_loader.py +0 -0
  19. {platzky-0.2.0 → platzky-0.2.1}/platzky/plugins/redirections/entrypoint.py +0 -0
  20. {platzky-0.2.0 → platzky-0.2.1}/platzky/plugins/sendmail/entrypoint.py +0 -0
  21. {platzky-0.2.0 → platzky-0.2.1}/platzky/seo/seo.py +0 -0
  22. {platzky-0.2.0 → platzky-0.2.1}/platzky/static/blog.css +0 -0
  23. {platzky-0.2.0 → platzky-0.2.1}/platzky/templates/404.html +0 -0
  24. {platzky-0.2.0 → platzky-0.2.1}/platzky/templates/base.html +0 -0
  25. {platzky-0.2.0 → platzky-0.2.1}/platzky/templates/blog.html +0 -0
  26. {platzky-0.2.0 → platzky-0.2.1}/platzky/templates/body_meta.html +0 -0
  27. {platzky-0.2.0 → platzky-0.2.1}/platzky/templates/feed.xml +0 -0
  28. {platzky-0.2.0 → platzky-0.2.1}/platzky/templates/head_meta.html +0 -0
  29. {platzky-0.2.0 → platzky-0.2.1}/platzky/templates/home.html +0 -0
  30. {platzky-0.2.0 → platzky-0.2.1}/platzky/templates/page.html +0 -0
  31. {platzky-0.2.0 → platzky-0.2.1}/platzky/templates/post.html +0 -0
  32. {platzky-0.2.0 → platzky-0.2.1}/platzky/templates/robots.txt +0 -0
  33. {platzky-0.2.0 → platzky-0.2.1}/platzky/templates/sitemap.xml +0 -0
  34. {platzky-0.2.0 → platzky-0.2.1}/platzky/www_handler.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: platzky
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Not only blog engine
5
5
  License: MIT
6
6
  Requires-Python: >=3.10,<4.0
@@ -18,6 +18,7 @@ Requires-Dist: aiohttp (>=3.9.5,<4.0.0)
18
18
  Requires-Dist: google-cloud-storage (>=2.5.0,<3.0.0)
19
19
  Requires-Dist: gql (>=3.4.0,<4.0.0)
20
20
  Requires-Dist: humanize (>=4.9.0,<5.0.0)
21
+ Requires-Dist: pydantic (>=2.7.1,<3.0.0)
21
22
  Description-Content-Type: text/markdown
22
23
 
23
24
  ![Github Actions](https://github.com/platzky/platzky/actions/workflows/tests.yml/badge.svg?event=push&branch=main)
@@ -90,14 +90,6 @@ class DB(ABC):
90
90
  def get_font(self) -> str:
91
91
  pass
92
92
 
93
- @abstractmethod
94
- def get_all_providers(self): # TODO providers are not part of the DB
95
- pass
96
-
97
- @abstractmethod
98
- def get_all_questions(self): # TODO questions are not part of the DB
99
- pass
100
-
101
93
  @abstractmethod
102
94
  def get_site_content(self) -> str:
103
95
  pass
@@ -1,6 +1,5 @@
1
1
  # TODO rename file, extract it to another library, remove qgl and aiohttp from dependencies
2
2
 
3
- import json
4
3
 
5
4
  from gql import Client, gql
6
5
  from gql.transport.aiohttp import AIOHTTPTransport
@@ -186,39 +185,6 @@ class GraphQL(DB):
186
185
  "posts"
187
186
  ]
188
187
 
189
- def get_all_providers(self):
190
- all_providers = gql(
191
- """
192
- query MyQuery {
193
- providers(stage: PUBLISHED) {
194
- link
195
- name
196
- offer
197
- currency
198
- }
199
- }
200
- """
201
- )
202
- providers = self.client.execute(all_providers)["providers"]
203
- for provider in providers:
204
- provider["offer"] = json.loads(provider["offer"])
205
- return providers
206
-
207
- def get_all_questions(self):
208
- all_questions = gql(
209
- """
210
- query MyQuery {
211
- questions(stage: PUBLISHED) {
212
- question
213
- field
214
- inputType
215
- }
216
- }
217
- """
218
- )
219
- query = self.client.execute(all_questions)
220
- return query["questions"]
221
-
222
188
  def add_comment(self, author_name, comment, post_slug):
223
189
  add_comment = gql(
224
190
  """
@@ -68,12 +68,6 @@ class Json(DB):
68
68
  post for post in self.get_site_content()["posts"] if tag in post["tags"]
69
69
  )
70
70
 
71
- def get_all_providers(self):
72
- return self.data["providers"]
73
-
74
- def get_all_questions(self):
75
- return self.data["questions"]
76
-
77
71
  def get_site_content(self):
78
72
  content = self.data.get("site_content")
79
73
  if content is None:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "platzky"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "Not only blog engine"
5
5
  authors = []
6
6
  license = "MIT"
@@ -17,13 +17,13 @@ aiohttp = "^3.9.5"
17
17
  Flask-Minify = "^0.42"
18
18
  google-cloud-storage = "^2.5.0"
19
19
  humanize = "^4.9.0"
20
+ pydantic = "^2.7.1"
20
21
 
21
22
  [tool.poetry.group.dev.dependencies]
22
23
  pytest = "^8.2.1"
23
24
  coverage = "^7.5.1"
24
25
  pytest-cov = "^5.0.0"
25
26
  freezegun = "^1.2.2"
26
- pydantic = "^2.7.1"
27
27
  black = "^24.4.2"
28
28
  ruff = "^0.4.4"
29
29
  pyright = "^1.1.364"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes