plain 0.9.0__py3-none-any.whl → 0.10.0__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.
plain/runtime/__init__.py CHANGED
@@ -1,10 +1,8 @@
1
1
  import importlib.metadata
2
2
  import sys
3
- from os import environ
3
+ from importlib.metadata import entry_points
4
4
  from pathlib import Path
5
5
 
6
- from dotenv import load_dotenv
7
-
8
6
  from .user_settings import Settings
9
7
 
10
8
  try:
@@ -29,6 +27,11 @@ def setup():
29
27
  Configure the settings (this happens as a side effect of accessing the
30
28
  first setting), configure logging and populate the app registry.
31
29
  """
30
+
31
+ # Packages can hook into the setup process through an entrypoint.
32
+ for entry_point in entry_points().select(group="plain.setup"):
33
+ entry_point.load()()
34
+
32
35
  from plain.logs import configure_logging
33
36
  from plain.packages import packages
34
37
 
@@ -43,12 +46,6 @@ def setup():
43
46
  if APP_PATH.parent not in sys.path:
44
47
  sys.path.insert(0, APP_PATH.parent.as_posix())
45
48
 
46
- # Load .env files automatically before settings
47
- if app_env := environ.get("PLAIN_ENV", ""):
48
- load_dotenv(f".env.{app_env}")
49
- else:
50
- load_dotenv(".env")
51
-
52
49
  configure_logging(settings.LOGGING)
53
50
 
54
51
  packages.populate(settings.INSTALLED_PACKAGES)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plain
3
- Version: 0.9.0
3
+ Version: 0.10.0
4
4
  Summary: A web framework for building products with Python.
5
5
  Author: Dave Gaeddert
6
6
  Author-email: dave.gaeddert@dropseed.dev
@@ -11,7 +11,6 @@ Classifier: Programming Language :: Python :: 3.12
11
11
  Classifier: Programming Language :: Python :: 3.13
12
12
  Requires-Dist: click (>=8.0.0)
13
13
  Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
14
- Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
15
14
  Description-Content-Type: text/markdown
16
15
 
17
16
  <!-- This file is compiled from plain/plain/README.md. Do not edit this file directly. -->
@@ -70,7 +70,7 @@ plain/preflight/security/base.py,sha256=nsv-g-bFr_188mkOQwC1ZDnyS0rE6eZED8xZT-FE
70
70
  plain/preflight/security/csrf.py,sha256=8dKzs5kQwTTKeyfHbkrzdPk3OEoUN8mc-0xhSBo1KmM,1175
71
71
  plain/preflight/urls.py,sha256=O4PQ_v205VA2872fQlhPfxaihDDRCsVp0ZVKQ92aX4k,3019
72
72
  plain/runtime/README.md,sha256=Q8VVO7JRGuYrDxzuYL6ptoilhclbecxKzpRXKgbWGkU,2061
73
- plain/runtime/__init__.py,sha256=WJvN0SVPvsp62doUWhVsdWLW8myx7JDPRjQNxrYHtnQ,1520
73
+ plain/runtime/__init__.py,sha256=DH8TwKTGJhjviOy4yh_d051v8YGaAWMlFBPhK8ZuC9g,1499
74
74
  plain/runtime/global_settings.py,sha256=SeW8vVk4rOQyABhRa_5USe8ru_ZDhyiNYz0yhGx0blg,5438
75
75
  plain/runtime/user_settings.py,sha256=-1xXUggueuOF3YlgnLfeyG55CUvR3azOGWr2UkTOmfs,11259
76
76
  plain/signals/README.md,sha256=cd3tKEgH-xc88CUWyDxl4-qv-HBXx8VT32BXVwA5azA,230
@@ -141,8 +141,8 @@ plain/views/objects.py,sha256=9QBYyb8PgkRirXCQ8-Pms4_yMzP37dfeL30hWRYmtZg,7909
141
141
  plain/views/redirect.py,sha256=KLnlktzK6ZNMTlaEiZpMKQMEP5zeTgGLJ9BIkIJfwBo,1733
142
142
  plain/views/templates.py,sha256=nF9CcdhhjAyp3LB0RrSYnBaHpHzMfPSw719RCdcXk7o,2007
143
143
  plain/wsgi.py,sha256=R6k5FiAElvGDApEbMPTT0MPqSD7n2e2Az5chQqJZU0I,236
144
- plain-0.9.0.dist-info/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
145
- plain-0.9.0.dist-info/METADATA,sha256=XgTFVJqheffOIQOTQXS3lyRZpobjro-yfXTWsFCRe7g,2767
146
- plain-0.9.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
147
- plain-0.9.0.dist-info/entry_points.txt,sha256=7O1RZTmMasKYB73bfqQcTwIhsXo7RjEIKv2WbtTtOIM,39
148
- plain-0.9.0.dist-info/RECORD,,
144
+ plain-0.10.0.dist-info/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
145
+ plain-0.10.0.dist-info/METADATA,sha256=SwlNbU7qUpXXojHWCorLfkK8RYYI03YyVPgfv3Y19yY,2722
146
+ plain-0.10.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
147
+ plain-0.10.0.dist-info/entry_points.txt,sha256=7O1RZTmMasKYB73bfqQcTwIhsXo7RjEIKv2WbtTtOIM,39
148
+ plain-0.10.0.dist-info/RECORD,,
File without changes