panther 3.8.0__tar.gz → 3.8.2__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 (76) hide show
  1. {panther-3.8.0 → panther-3.8.2}/PKG-INFO +1 -1
  2. {panther-3.8.0 → panther-3.8.2}/panther/__init__.py +1 -1
  3. {panther-3.8.0 → panther-3.8.2}/panther/cli/template.py +2 -3
  4. {panther-3.8.0 → panther-3.8.2}/panther/db/connection.py +4 -1
  5. {panther-3.8.0 → panther-3.8.2}/panther/main.py +1 -0
  6. {panther-3.8.0 → panther-3.8.2}/panther.egg-info/PKG-INFO +1 -1
  7. {panther-3.8.0 → panther-3.8.2}/LICENSE +0 -0
  8. {panther-3.8.0 → panther-3.8.2}/README.md +0 -0
  9. {panther-3.8.0 → panther-3.8.2}/panther/_load_configs.py +0 -0
  10. {panther-3.8.0 → panther-3.8.2}/panther/_utils.py +0 -0
  11. {panther-3.8.0 → panther-3.8.2}/panther/app.py +0 -0
  12. {panther-3.8.0 → panther-3.8.2}/panther/authentications.py +0 -0
  13. {panther-3.8.0 → panther-3.8.2}/panther/background_tasks.py +0 -0
  14. {panther-3.8.0 → panther-3.8.2}/panther/base_request.py +0 -0
  15. {panther-3.8.0 → panther-3.8.2}/panther/base_websocket.py +0 -0
  16. {panther-3.8.0 → panther-3.8.2}/panther/caching.py +0 -0
  17. {panther-3.8.0 → panther-3.8.2}/panther/cli/__init__.py +0 -0
  18. {panther-3.8.0 → panther-3.8.2}/panther/cli/create_command.py +0 -0
  19. {panther-3.8.0 → panther-3.8.2}/panther/cli/main.py +0 -0
  20. {panther-3.8.0 → panther-3.8.2}/panther/cli/monitor_command.py +0 -0
  21. {panther-3.8.0 → panther-3.8.2}/panther/cli/run_command.py +0 -0
  22. {panther-3.8.0 → panther-3.8.2}/panther/cli/utils.py +0 -0
  23. {panther-3.8.0 → panther-3.8.2}/panther/configs.py +0 -0
  24. {panther-3.8.0 → panther-3.8.2}/panther/db/__init__.py +0 -0
  25. {panther-3.8.0 → panther-3.8.2}/panther/db/models.py +0 -0
  26. {panther-3.8.0 → panther-3.8.2}/panther/db/queries/__init__.py +0 -0
  27. {panther-3.8.0 → panther-3.8.2}/panther/db/queries/mongodb_queries.py +0 -0
  28. {panther-3.8.0 → panther-3.8.2}/panther/db/queries/pantherdb_queries.py +0 -0
  29. {panther-3.8.0 → panther-3.8.2}/panther/db/queries/queries.py +0 -0
  30. {panther-3.8.0 → panther-3.8.2}/panther/db/utils.py +0 -0
  31. {panther-3.8.0 → panther-3.8.2}/panther/exceptions.py +0 -0
  32. {panther-3.8.0 → panther-3.8.2}/panther/file_handler.py +0 -0
  33. {panther-3.8.0 → panther-3.8.2}/panther/logging.py +0 -0
  34. {panther-3.8.0 → panther-3.8.2}/panther/middlewares/__init__.py +0 -0
  35. {panther-3.8.0 → panther-3.8.2}/panther/middlewares/base.py +0 -0
  36. {panther-3.8.0 → panther-3.8.2}/panther/middlewares/db.py +0 -0
  37. {panther-3.8.0 → panther-3.8.2}/panther/middlewares/redis.py +0 -0
  38. {panther-3.8.0 → panther-3.8.2}/panther/monitoring.py +0 -0
  39. {panther-3.8.0 → panther-3.8.2}/panther/panel/__init__.py +0 -0
  40. {panther-3.8.0 → panther-3.8.2}/panther/panel/apis.py +0 -0
  41. {panther-3.8.0 → panther-3.8.2}/panther/panel/urls.py +0 -0
  42. {panther-3.8.0 → panther-3.8.2}/panther/panel/utils.py +0 -0
  43. {panther-3.8.0 → panther-3.8.2}/panther/permissions.py +0 -0
  44. {panther-3.8.0 → panther-3.8.2}/panther/request.py +0 -0
  45. {panther-3.8.0 → panther-3.8.2}/panther/response.py +0 -0
  46. {panther-3.8.0 → panther-3.8.2}/panther/routings.py +0 -0
  47. {panther-3.8.0 → panther-3.8.2}/panther/serializer.py +0 -0
  48. {panther-3.8.0 → panther-3.8.2}/panther/status.py +0 -0
  49. {panther-3.8.0 → panther-3.8.2}/panther/test.py +0 -0
  50. {panther-3.8.0 → panther-3.8.2}/panther/throttling.py +0 -0
  51. {panther-3.8.0 → panther-3.8.2}/panther/utils.py +0 -0
  52. {panther-3.8.0 → panther-3.8.2}/panther/websocket.py +0 -0
  53. {panther-3.8.0 → panther-3.8.2}/panther.egg-info/SOURCES.txt +0 -0
  54. {panther-3.8.0 → panther-3.8.2}/panther.egg-info/dependency_links.txt +0 -0
  55. {panther-3.8.0 → panther-3.8.2}/panther.egg-info/entry_points.txt +0 -0
  56. {panther-3.8.0 → panther-3.8.2}/panther.egg-info/requires.txt +0 -0
  57. {panther-3.8.0 → panther-3.8.2}/panther.egg-info/top_level.txt +0 -0
  58. {panther-3.8.0 → panther-3.8.2}/pyproject.toml +0 -0
  59. {panther-3.8.0 → panther-3.8.2}/setup.cfg +0 -0
  60. {panther-3.8.0 → panther-3.8.2}/setup.py +0 -0
  61. {panther-3.8.0 → panther-3.8.2}/tests/test_authentication.py +0 -0
  62. {panther-3.8.0 → panther-3.8.2}/tests/test_background_tasks.py +0 -0
  63. {panther-3.8.0 → panther-3.8.2}/tests/test_caching.py +0 -0
  64. {panther-3.8.0 → panther-3.8.2}/tests/test_cli.py +0 -0
  65. {panther-3.8.0 → panther-3.8.2}/tests/test_database.py +0 -0
  66. {panther-3.8.0 → panther-3.8.2}/tests/test_model_serializer.py +0 -0
  67. {panther-3.8.0 → panther-3.8.2}/tests/test_mongodb.py +0 -0
  68. {panther-3.8.0 → panther-3.8.2}/tests/test_multipart.py +0 -0
  69. {panther-3.8.0 → panther-3.8.2}/tests/test_panel_apis.py +0 -0
  70. {panther-3.8.0 → panther-3.8.2}/tests/test_request.py +0 -0
  71. {panther-3.8.0 → panther-3.8.2}/tests/test_routing.py +0 -0
  72. {panther-3.8.0 → panther-3.8.2}/tests/test_run.py +0 -0
  73. {panther-3.8.0 → panther-3.8.2}/tests/test_simple_responses.py +0 -0
  74. {panther-3.8.0 → panther-3.8.2}/tests/test_status.py +0 -0
  75. {panther-3.8.0 → panther-3.8.2}/tests/test_utils.py +0 -0
  76. {panther-3.8.0 → panther-3.8.2}/tests/test_websockets.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: panther
3
- Version: 3.8.0
3
+ Version: 3.8.2
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__ = '3.8.0'
3
+ __version__ = '3.8.2'
4
4
 
5
5
 
6
6
  def version():
@@ -33,7 +33,7 @@ async def info_api(request: Request):
33
33
  models_py = """from panther.db import Model
34
34
  """
35
35
 
36
- serializers_py = """from pydantic import BaseModel
36
+ serializers_py = """from panther.serializer import ModelSerializer
37
37
  """
38
38
 
39
39
  throttling_py = """from datetime import timedelta
@@ -70,8 +70,7 @@ SECRET_KEY = env['SECRET_KEY']{DATABASE}{USER_MODEL}{AUTHENTICATION}{MONITORING}
70
70
  URLs = 'core.urls.url_routing'
71
71
  """ % datetime.now().date().isoformat()
72
72
 
73
- env = """
74
- SECRET_KEY = '%s'
73
+ env = """SECRET_KEY='%s'
75
74
  """ % generate_secret_key()
76
75
 
77
76
  main_py = """from panther import Panther
@@ -54,12 +54,15 @@ class DBSession(Singleton):
54
54
  self._session: Database = self._client.get_database()
55
55
 
56
56
  def _create_pantherdb_session(self, db_url: str) -> None:
57
+ params = {'db_name': db_url, 'return_dict': True}
57
58
  if config['pantherdb_encryption']:
58
59
  try:
59
60
  import cryptography
60
61
  except ModuleNotFoundError as e:
61
62
  import_error(e, package='cryptography')
62
- self._session: PantherDB = PantherDB(db_url, return_dict=True, secret_key=config['secret_key'])
63
+ else:
64
+ params['secret_key'] = config['secret_key']
65
+ self._session: PantherDB = PantherDB(**params)
63
66
 
64
67
  def close(self) -> None:
65
68
  if self._db_name == 'mongodb':
@@ -300,6 +300,7 @@ class Panther:
300
300
  async def _raise(self, send, *, status_code: int):
301
301
  await http_response(
302
302
  send,
303
+ headers={'content-type': 'application/json'},
303
304
  status_code=status_code,
304
305
  monitoring=self.monitoring,
305
306
  exception=True,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: panther
3
- Version: 3.8.0
3
+ Version: 3.8.2
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
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