panther 5.0.0b1__tar.gz → 5.0.0b2__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 (102) hide show
  1. {panther-5.0.0b1 → panther-5.0.0b2}/PKG-INFO +1 -1
  2. {panther-5.0.0b1 → panther-5.0.0b2}/panther/__init__.py +1 -1
  3. {panther-5.0.0b1 → panther-5.0.0b2}/panther/db/queries/mongodb_queries.py +6 -4
  4. {panther-5.0.0b1 → panther-5.0.0b2}/panther/main.py +10 -0
  5. {panther-5.0.0b1 → panther-5.0.0b2}/panther.egg-info/PKG-INFO +1 -1
  6. {panther-5.0.0b1 → panther-5.0.0b2}/LICENSE +0 -0
  7. {panther-5.0.0b1 → panther-5.0.0b2}/README.md +0 -0
  8. {panther-5.0.0b1 → panther-5.0.0b2}/panther/_load_configs.py +0 -0
  9. {panther-5.0.0b1 → panther-5.0.0b2}/panther/_utils.py +0 -0
  10. {panther-5.0.0b1 → panther-5.0.0b2}/panther/app.py +0 -0
  11. {panther-5.0.0b1 → panther-5.0.0b2}/panther/authentications.py +0 -0
  12. {panther-5.0.0b1 → panther-5.0.0b2}/panther/background_tasks.py +0 -0
  13. {panther-5.0.0b1 → panther-5.0.0b2}/panther/base_request.py +0 -0
  14. {panther-5.0.0b1 → panther-5.0.0b2}/panther/base_websocket.py +0 -0
  15. {panther-5.0.0b1 → panther-5.0.0b2}/panther/caching.py +0 -0
  16. {panther-5.0.0b1 → panther-5.0.0b2}/panther/cli/__init__.py +0 -0
  17. {panther-5.0.0b1 → panther-5.0.0b2}/panther/cli/create_command.py +0 -0
  18. {panther-5.0.0b1 → panther-5.0.0b2}/panther/cli/main.py +0 -0
  19. {panther-5.0.0b1 → panther-5.0.0b2}/panther/cli/monitor_command.py +0 -0
  20. {panther-5.0.0b1 → panther-5.0.0b2}/panther/cli/run_command.py +0 -0
  21. {panther-5.0.0b1 → panther-5.0.0b2}/panther/cli/template.py +0 -0
  22. {panther-5.0.0b1 → panther-5.0.0b2}/panther/cli/utils.py +0 -0
  23. {panther-5.0.0b1 → panther-5.0.0b2}/panther/configs.py +0 -0
  24. {panther-5.0.0b1 → panther-5.0.0b2}/panther/db/__init__.py +0 -0
  25. {panther-5.0.0b1 → panther-5.0.0b2}/panther/db/connections.py +0 -0
  26. {panther-5.0.0b1 → panther-5.0.0b2}/panther/db/cursor.py +0 -0
  27. {panther-5.0.0b1 → panther-5.0.0b2}/panther/db/models.py +0 -0
  28. {panther-5.0.0b1 → panther-5.0.0b2}/panther/db/queries/__init__.py +0 -0
  29. {panther-5.0.0b1 → panther-5.0.0b2}/panther/db/queries/base_queries.py +0 -0
  30. {panther-5.0.0b1 → panther-5.0.0b2}/panther/db/queries/pantherdb_queries.py +0 -0
  31. {panther-5.0.0b1 → panther-5.0.0b2}/panther/db/queries/queries.py +0 -0
  32. {panther-5.0.0b1 → panther-5.0.0b2}/panther/db/utils.py +0 -0
  33. {panther-5.0.0b1 → panther-5.0.0b2}/panther/events.py +0 -0
  34. {panther-5.0.0b1 → panther-5.0.0b2}/panther/exceptions.py +0 -0
  35. {panther-5.0.0b1 → panther-5.0.0b2}/panther/file_handler.py +0 -0
  36. {panther-5.0.0b1 → panther-5.0.0b2}/panther/generics.py +0 -0
  37. {panther-5.0.0b1 → panther-5.0.0b2}/panther/logging.py +0 -0
  38. {panther-5.0.0b1 → panther-5.0.0b2}/panther/middlewares/__init__.py +0 -0
  39. {panther-5.0.0b1 → panther-5.0.0b2}/panther/middlewares/base.py +0 -0
  40. {panther-5.0.0b1 → panther-5.0.0b2}/panther/middlewares/monitoring.py +0 -0
  41. {panther-5.0.0b1 → panther-5.0.0b2}/panther/monitoring.py +0 -0
  42. {panther-5.0.0b1 → panther-5.0.0b2}/panther/openapi/__init__.py +0 -0
  43. {panther-5.0.0b1 → panther-5.0.0b2}/panther/openapi/templates/openapi.html +0 -0
  44. {panther-5.0.0b1 → panther-5.0.0b2}/panther/openapi/urls.py +0 -0
  45. {panther-5.0.0b1 → panther-5.0.0b2}/panther/openapi/utils.py +0 -0
  46. {panther-5.0.0b1 → panther-5.0.0b2}/panther/openapi/views.py +0 -0
  47. {panther-5.0.0b1 → panther-5.0.0b2}/panther/pagination.py +0 -0
  48. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/__init__.py +0 -0
  49. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/apis.py +0 -0
  50. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/middlewares.py +0 -0
  51. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/templates/base.html +0 -0
  52. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/templates/create.html +0 -0
  53. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/templates/create.js +0 -0
  54. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/templates/detail.html +0 -0
  55. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/templates/home.html +0 -0
  56. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/templates/home.js +0 -0
  57. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/templates/login.html +0 -0
  58. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/templates/sidebar.html +0 -0
  59. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/templates/table.html +0 -0
  60. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/templates/table.js +0 -0
  61. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/urls.py +0 -0
  62. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/utils.py +0 -0
  63. {panther-5.0.0b1 → panther-5.0.0b2}/panther/panel/views.py +0 -0
  64. {panther-5.0.0b1 → panther-5.0.0b2}/panther/permissions.py +0 -0
  65. {panther-5.0.0b1 → panther-5.0.0b2}/panther/request.py +0 -0
  66. {panther-5.0.0b1 → panther-5.0.0b2}/panther/response.py +0 -0
  67. {panther-5.0.0b1 → panther-5.0.0b2}/panther/routings.py +0 -0
  68. {panther-5.0.0b1 → panther-5.0.0b2}/panther/serializer.py +0 -0
  69. {panther-5.0.0b1 → panther-5.0.0b2}/panther/status.py +0 -0
  70. {panther-5.0.0b1 → panther-5.0.0b2}/panther/test.py +0 -0
  71. {panther-5.0.0b1 → panther-5.0.0b2}/panther/throttling.py +0 -0
  72. {panther-5.0.0b1 → panther-5.0.0b2}/panther/utils.py +0 -0
  73. {panther-5.0.0b1 → panther-5.0.0b2}/panther/websocket.py +0 -0
  74. {panther-5.0.0b1 → panther-5.0.0b2}/panther.egg-info/SOURCES.txt +0 -0
  75. {panther-5.0.0b1 → panther-5.0.0b2}/panther.egg-info/dependency_links.txt +0 -0
  76. {panther-5.0.0b1 → panther-5.0.0b2}/panther.egg-info/entry_points.txt +0 -0
  77. {panther-5.0.0b1 → panther-5.0.0b2}/panther.egg-info/requires.txt +0 -0
  78. {panther-5.0.0b1 → panther-5.0.0b2}/panther.egg-info/top_level.txt +0 -0
  79. {panther-5.0.0b1 → panther-5.0.0b2}/pyproject.toml +0 -0
  80. {panther-5.0.0b1 → panther-5.0.0b2}/setup.cfg +0 -0
  81. {panther-5.0.0b1 → panther-5.0.0b2}/setup.py +0 -0
  82. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_authentication.py +0 -0
  83. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_background_tasks.py +0 -0
  84. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_caching.py +0 -0
  85. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_cli.py +0 -0
  86. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_database.py +0 -0
  87. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_database_advance.py +0 -0
  88. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_events.py +0 -0
  89. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_generics.py +0 -0
  90. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_middlewares.py +0 -0
  91. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_multipart.py +0 -0
  92. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_openapi.py +0 -0
  93. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_panel_apis.py +0 -0
  94. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_request.py +0 -0
  95. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_response.py +0 -0
  96. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_routing.py +0 -0
  97. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_run.py +0 -0
  98. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_serializer.py +0 -0
  99. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_status.py +0 -0
  100. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_throttling.py +0 -0
  101. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_utils.py +0 -0
  102. {panther-5.0.0b1 → panther-5.0.0b2}/tests/test_websockets.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: panther
3
- Version: 5.0.0b1
3
+ Version: 5.0.0b2
4
4
  Summary: Fast & Friendly, Web Framework For Building Async APIs
5
5
  Home-page: https://github.com/alirn76/panther
6
6
  Author: Ali RajabNezhad
@@ -1,6 +1,6 @@
1
1
  from panther.main import Panther # noqa: F401
2
2
 
3
- __version__ = '5.0.0beta1'
3
+ __version__ = '5.0.0beta2'
4
4
 
5
5
 
6
6
  def version():
@@ -6,7 +6,6 @@ from sys import version_info
6
6
  from typing import get_args, get_origin, Iterable, Sequence, Any, Union
7
7
 
8
8
  from pydantic import BaseModel, ValidationError
9
- from pymongo.results import InsertOneResult, InsertManyResult
10
9
 
11
10
  from panther.db.connections import db
12
11
  from panther.db.cursor import Cursor
@@ -17,11 +16,14 @@ from panther.exceptions import DatabaseError
17
16
 
18
17
  try:
19
18
  from bson.codec_options import CodecOptions
19
+ from pymongo.results import InsertOneResult, InsertManyResult
20
20
  except ImportError:
21
- # This 'CodecOptions' is not going to be used,
22
- # If user really wants to use it,
23
- # we are going to force him to install it in `panther.db.connections.MongoDBConnection.init`
21
+ # MongoDB-related libraries are not required by default.
22
+ # If the user intends to use MongoDB, they must install the required dependencies explicitly.
23
+ # This will be enforced in `panther.db.connections.MongoDBConnection.init`.
24
24
  CodecOptions = type('CodecOptions', (), {})
25
+ InsertOneResult = type('InsertOneResult', (), {})
26
+ InsertManyResult = type('InsertManyResult', (), {})
25
27
 
26
28
  if version_info >= (3, 11):
27
29
  from typing import Self
@@ -26,6 +26,16 @@ logger = logging.getLogger('panther')
26
26
 
27
27
  class Panther:
28
28
  def __init__(self, name: str, configs: str | None = None, urls: dict | None = None):
29
+ """
30
+ Initialize a Panther application instance.
31
+
32
+ Args:
33
+ name: Typically set to `__name__`; used to determine the current directory of the application.
34
+ configs: The name of the module containing your configuration.
35
+ If the configuration is defined in the current file, you can also set this to `__name__`.
36
+ urls: A dictionary containing your URL routing.
37
+ If not provided, Panther will attempt to load `URLs` from the configs module.
38
+ """
29
39
  self._configs_module_name = configs
30
40
  self._urls = urls
31
41
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: panther
3
- Version: 5.0.0b1
3
+ Version: 5.0.0b2
4
4
  Summary: Fast & Friendly, Web Framework For Building Async APIs
5
5
  Home-page: https://github.com/alirn76/panther
6
6
  Author: Ali RajabNezhad
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
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
File without changes