pythorhead 0.9.2__tar.gz → 0.9.3__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 (33) hide show
  1. {pythorhead-0.9.2 → pythorhead-0.9.3}/CHANGELOG.md +17 -0
  2. {pythorhead-0.9.2 → pythorhead-0.9.3}/PKG-INFO +1 -1
  3. {pythorhead-0.9.2 → pythorhead-0.9.3}/examples/pic.py +1 -1
  4. {pythorhead-0.9.2 → pythorhead-0.9.3}/pyproject.toml +1 -1
  5. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/community.py +3 -3
  6. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/lemmy.py +0 -2
  7. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead.egg-info/PKG-INFO +1 -1
  8. {pythorhead-0.9.2 → pythorhead-0.9.3}/.github/workflows/pypi.yml +0 -0
  9. {pythorhead-0.9.2 → pythorhead-0.9.3}/.gitignore +0 -0
  10. {pythorhead-0.9.2 → pythorhead-0.9.3}/LICENSE +0 -0
  11. {pythorhead-0.9.2 → pythorhead-0.9.3}/README.md +0 -0
  12. {pythorhead-0.9.2 → pythorhead-0.9.3}/examples/pm.py +0 -0
  13. {pythorhead-0.9.2 → pythorhead-0.9.3}/examples/site.py +0 -0
  14. {pythorhead-0.9.2 → pythorhead-0.9.3}/examples/user.py +0 -0
  15. {pythorhead-0.9.2 → pythorhead-0.9.3}/logo.png +0 -0
  16. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/__init__.py +0 -0
  17. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/auth.py +0 -0
  18. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/comment.py +0 -0
  19. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/image.py +0 -0
  20. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/post.py +0 -0
  21. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/private_message.py +0 -0
  22. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/requestor.py +0 -0
  23. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/site.py +0 -0
  24. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/types/__init__.py +0 -0
  25. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/types/feature.py +0 -0
  26. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/types/listing.py +0 -0
  27. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/types/sort.py +0 -0
  28. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead/user.py +0 -0
  29. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead.egg-info/SOURCES.txt +0 -0
  30. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead.egg-info/dependency_links.txt +0 -0
  31. {pythorhead-0.9.2 → pythorhead-0.9.3}/pythorhead.egg-info/top_level.txt +0 -0
  32. {pythorhead-0.9.2 → pythorhead-0.9.3}/requirements.txt +0 -0
  33. {pythorhead-0.9.2 → pythorhead-0.9.3}/setup.cfg +0 -0
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased](https://github.com/db0/pythorhead/tree/HEAD)
4
+
5
+ [Full Changelog](https://github.com/db0/pythorhead/compare/v0.9.3...HEAD)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Create community broken [\#35](https://github.com/db0/pythorhead/issues/35)
10
+
11
+ ## [v0.9.3](https://github.com/db0/pythorhead/tree/v0.9.3) (2023-06-29)
12
+
13
+ [Full Changelog](https://github.com/db0/pythorhead/compare/v0.9.2...v0.9.3)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - fix create community [\#36](https://github.com/db0/pythorhead/pull/36) ([NicKoehler](https://github.com/NicKoehler))
18
+ - Remove logging.basicConfig statement [\#32](https://github.com/db0/pythorhead/pull/32) ([hjalp](https://github.com/hjalp))
19
+
3
20
  ## [v0.9.2](https://github.com/db0/pythorhead/tree/v0.9.2) (2023-06-26)
4
21
 
5
22
  [Full Changelog](https://github.com/db0/pythorhead/compare/v0.9.1...v0.9.2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pythorhead
3
- Version: 0.9.2
3
+ Version: 0.9.3
4
4
  Summary: A python library for interacting with Lemmy API
5
5
  Author-email: db0 <mail@dbzer0.com>
6
6
  License: GNU AFFERO GENERAL PUBLIC LICENSE
@@ -74,7 +74,7 @@ if not lemmy_password:
74
74
  if not lemmy_password:
75
75
  raise Exception("You need to provide a lemmy password via env var or arg")
76
76
 
77
- lemmy = Lemmy(f"https://{lemmy_domain}")
77
+ lemmy = Lemmy(f"http://{lemmy_domain}")
78
78
  if not lemmy.log_in(lemmy_username, lemmy_password):
79
79
  print("Failed to log in")
80
80
  exit(1)
@@ -8,7 +8,7 @@ description = "A python library for interacting with Lemmy API"
8
8
  authors = [
9
9
  {name = "db0", email = "mail@dbzer0.com"},
10
10
  ]
11
- version = "v0.9.2"
11
+ version = "v0.9.3"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.8,<3.12"
14
14
  license = { file="LICENSE" }
@@ -1,4 +1,4 @@
1
- from typing import List, Optional
1
+ from typing import Any, List, Optional
2
2
 
3
3
  from pythorhead.requestor import Request, Requestor
4
4
  from pythorhead.types import ListingType, SortType
@@ -31,7 +31,7 @@ class Community:
31
31
  Returns:
32
32
  Optional[dict]: post data if successful
33
33
  """
34
- new_community: dict = {
34
+ new_community: dict[Any, Any] = {
35
35
  "name": name,
36
36
  "title": title,
37
37
  }
@@ -44,7 +44,7 @@ class Community:
44
44
  if [posting_restricted_to_mods] is not None:
45
45
  new_community["[posting_restricted_to_mods]"] = [posting_restricted_to_mods]
46
46
 
47
- return self._requestor.api(Request.POST, "/post", json=new_community)
47
+ return self._requestor.api(Request.POST, "/community", json=new_community)
48
48
 
49
49
  def get(self, id: Optional[int] = None, name: Optional[str] = None) -> Optional[dict]:
50
50
  """
@@ -10,8 +10,6 @@ from pythorhead.requestor import Requestor
10
10
  from pythorhead.site import Site
11
11
  from pythorhead.user import User
12
12
 
13
- logging.basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
14
-
15
13
 
16
14
  class Lemmy:
17
15
  _known_communities = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pythorhead
3
- Version: 0.9.2
3
+ Version: 0.9.3
4
4
  Summary: A python library for interacting with Lemmy API
5
5
  Author-email: db0 <mail@dbzer0.com>
6
6
  License: GNU AFFERO GENERAL PUBLIC LICENSE
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