fastlifeweb 0.15.0__py3-none-any.whl → 0.15.1__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.
fastlife/__init__.py CHANGED
@@ -12,14 +12,13 @@ from .config import (
12
12
  from .request import Request
13
13
 
14
14
  # from .request.form_data import model
15
- from .templates import Template, template
15
+ from .services.templates import TemplateParams
16
16
 
17
17
  __all__ = [
18
18
  # Config
19
19
  "configure",
20
20
  "Configurator",
21
- "template",
22
- "Template",
21
+ "TemplateParams",
23
22
  "Registry",
24
23
  "Settings",
25
24
  "view_config",
@@ -0,0 +1 @@
1
+ """HTML Form generation using widgets."""
@@ -1,3 +1,4 @@
1
+ """Widget base class."""
1
2
  import abc
2
3
  import secrets
3
4
  from typing import Any, Generic, Mapping, Type, TypeVar
@@ -8,6 +8,6 @@
8
8
  #}
9
9
  <tbody
10
10
  {%- if id %} id="{{id}}" {%- endif %}
11
- {%- if class %} class="{{attrs.class}}" {%- endif %}>
11
+ {%- if attrs.class %} class="{{attrs.class}}" {%- endif %}>
12
12
  {{- content -}}
13
13
  </tbody>
@@ -8,6 +8,6 @@
8
8
  #}
9
9
  <tfoot
10
10
  {%- if id %} id="{{id}}" {%- endif %}
11
- {%- if class %} class="{{attrs.class}}" {%- endif %}>
11
+ {%- if attrs.class %} class="{{attrs.class}}" {%- endif %}>
12
12
  {{- content -}}
13
13
  </tfoot>
@@ -8,6 +8,6 @@
8
8
  #}
9
9
  <thead
10
10
  {%- if id %} id="{{id}}" {%- endif %}
11
- {%- if class %} class="{{attrs.class}}" {%- endif %}>
11
+ {%- if attrs.class %} class="{{attrs.class}}" {%- endif %}>
12
12
  {{- content -}}
13
13
  </thead>
@@ -8,6 +8,6 @@
8
8
  #}
9
9
  <tr
10
10
  {%- if id %} id="{{id}}" {%- endif %}
11
- {%- if class %} class="{{attrs.class}}" {%- endif %}>
11
+ {%- if attrs.class %} class="{{attrs.class}}" {%- endif %}>
12
12
  {{- content -}}
13
13
  </tr>
@@ -367,7 +367,7 @@ class Configurator:
367
367
  :param endpoint: the function that will reveive the request.
368
368
  :param permission: a permission to validate by the security policy.
369
369
  :param methods: restrict route to a list of http methods.
370
- :param description:OpenAPI description for the route.
370
+ :param description:{term}`OpenAPI` description for the route.
371
371
  :param summary: OpenAPI summary for the route.
372
372
  :param response_description: OpenAPI description for the response.
373
373
  :param operation_id: OpenAPI optional unique string used to identify an
@@ -385,7 +385,7 @@ class Configurator:
385
385
  :param response_model_exclude_none: exclude fields instead of serialize to
386
386
  null value.
387
387
  :param include_in_schema: expose or not the route in the doc.
388
- :param openapi_extra: open api documentation extra fields.
388
+ :param openapi_extra: OpenAPI documentation extra fields.
389
389
 
390
390
  :return: the configurator.
391
391
  """
@@ -549,7 +549,7 @@ class Configurator:
549
549
  self.registry.renderers[f".{file_ext.lstrip('.')}"] = renderer # type: ignore
550
550
  return self
551
551
 
552
- def add_template_search_path(self, path: str) -> Self:
552
+ def add_template_search_path(self, path: str | Path) -> Self:
553
553
  """
554
554
  Add a template search path directly from the code.
555
555
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastlifeweb
3
- Version: 0.15.0
3
+ Version: 0.15.1
4
4
  Summary: High-level web framework
5
5
  Home-page: https://github.com/mardiros/fastlife
6
6
  License: BSD-derived
@@ -17,8 +17,9 @@ Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Topic :: Internet :: WWW/HTTP
19
19
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Provides-Extra: testing
20
21
  Requires-Dist: babel (>=2.16.0,<3.0.0)
21
- Requires-Dist: beautifulsoup4[testing] (>=4.12.2,<5.0.0)
22
+ Requires-Dist: beautifulsoup4 (>=4.12.2,<5.0.0) ; extra == "testing"
22
23
  Requires-Dist: fastapi[standard] (>=0.115.0,<0.116.0)
23
24
  Requires-Dist: itsdangerous (>=2.1.2,<3.0.0)
24
25
  Requires-Dist: jinjax (>=0.44,<0.45)
@@ -42,12 +43,12 @@ Description-Content-Type: text/markdown
42
43
  > Please note that this project is still in active development. Features and APIs may change frequently.
43
44
  > Even the name is not definitive.
44
45
 
45
- An opinionated framework Python web framework (based on FastAPI).
46
+ An opinionated Python web framework (based on FastAPI).
46
47
 
47
48
  ## Purpose
48
49
 
49
- Fastlife helps at building Web Application with html form generated from pydantic schema
50
- using customizable widget.
50
+ Fastlife helps at building Web Application with session, security, html test client,
51
+ and html form generated from pydantic schema using customizable widget.
51
52
 
52
53
  Templates are made using [JinjaX](https://jinjax.scaletti.dev/) and an extensible [set of
53
54
  component](https://mardiros.github.io/fastlife/components/index.html) is available
@@ -1,9 +1,9 @@
1
- fastlife/__init__.py,sha256=qjWjYd07qVhyG-WVMZqnBTJy_AV2jC7CHHFzAuTdv98,543
1
+ fastlife/__init__.py,sha256=sOuA910DThakr7Pn4VY7rGVMbbjU0JP8QQ3VqEpVzkM,538
2
2
  fastlife/adapters/__init__.py,sha256=WYjEN8gp4r7LCHqmIO5VzzvsT8QGRE3w4G47UwYDtAo,94
3
3
  fastlife/adapters/jinjax/__init__.py,sha256=jy88zyqk7nFlaY-0lmgAoe0HyO5r_NKckQb3faQiUv4,137
4
4
  fastlife/adapters/jinjax/renderer.py,sha256=tKX_C0fGnooMcMXBz4_8Ym2VLCKEkRk9_AXq6HrN11I,13040
5
- fastlife/adapters/jinjax/widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- fastlife/adapters/jinjax/widgets/base.py,sha256=idw9rVYfY-J9ASkxUFyH2EHtDraYORLd586Noo0-5I4,3990
5
+ fastlife/adapters/jinjax/widgets/__init__.py,sha256=HERnX9xiXUbTDz3XtlnHWABTBjhIq_kkBgWs5E6ZIMY,42
6
+ fastlife/adapters/jinjax/widgets/base.py,sha256=JoB1bLI97ZW2ycfBcHgrPxiOszE9t_SFFK5L1bR-cSo,4015
7
7
  fastlife/adapters/jinjax/widgets/boolean.py,sha256=w4hZMo_8xDoThStlIUR4eVfLm8JwUp0-TaGCjGSyCbA,1145
8
8
  fastlife/adapters/jinjax/widgets/checklist.py,sha256=VIIfJ8JB7ZAISwFFiGZ7jfGuNJ9sjkhRSVFqDTr-RR4,1655
9
9
  fastlife/adapters/jinjax/widgets/dropdown.py,sha256=x2Y9BOfHfSuzWD_HNrvCkiJtKDxl8Vs05Uk8QKvRxyY,1622
@@ -34,13 +34,13 @@ fastlife/components/Radio.jinja,sha256=ohucEGNofDsC4-Hp6Ovexi5XW812-kfAzsFCcOyVF
34
34
  fastlife/components/Select.jinja,sha256=aPqdPrCh6ooxj3XkeptefwvzFqC5XC4FLtW8XLj3CpM,556
35
35
  fastlife/components/Summary.jinja,sha256=EFVG2d7JJu7j5RRLNqKHxXcWAEJmv3Wif1aI5HXq1Zc,853
36
36
  fastlife/components/Table.jinja,sha256=X87pJkqp-fl4Uno52Ijj1Lw4MFYsqr4Jc6Oi4KGQVhM,390
37
- fastlife/components/Tbody.jinja,sha256=LG6B41wnKc3My3LoCQJPYiLnd7pz3JmRAJ2o7a_m1hs,325
37
+ fastlife/components/Tbody.jinja,sha256=FqldzLFhV6dfG0UsB55kDtALixpnECdIISXGWXiXxEM,331
38
38
  fastlife/components/Td.jinja,sha256=NTV86bdtm8t_2_2Pj1X8vsCqm4NSE4H5NPUoSt1i8cA,374
39
39
  fastlife/components/Textarea.jinja,sha256=0WsTi-yxVwYXndmJJN93WblQVqM0h0NCSMUDwoC3kdc,636
40
- fastlife/components/Tfoot.jinja,sha256=hxdYkc-3P27Qm9ZobSxhpjugOFJifVia20uHzTXHvIk,325
40
+ fastlife/components/Tfoot.jinja,sha256=Hw_eFhmbHcOx0dCHrNkyi4q1lrKye5RpihHBwjaT3zY,331
41
41
  fastlife/components/Th.jinja,sha256=tuIlLlwtvZiBHhQD_J7p8V-An-EeA4mzm_nRxUoGDzQ,375
42
- fastlife/components/Thead.jinja,sha256=FB0ZaYwQR1KEJun5XpuO4sXsUuyPabXxf8M5qkeD-xI,324
43
- fastlife/components/Tr.jinja,sha256=tWMonYy0XPCaGCeheo6aqqSXo7wxqxz6hPUBGAWrHNI,316
42
+ fastlife/components/Thead.jinja,sha256=TpnnbtbgYe97e0QDjeJulbh0_-Cbu3z_Qh9dsraQNb4,330
43
+ fastlife/components/Tr.jinja,sha256=kWy-jx4ShT2dv9vuHqJtMnc3O2pZ3y8KCWEAifMpjrU,322
44
44
  fastlife/components/icons/AcademicCap.jinja,sha256=0yJiwNF09SXGmssEHFkEE_2GPb2LFN1BIR4DChDRBls,528
45
45
  fastlife/components/icons/AdjustmentsHorizontal.jinja,sha256=eaAOfrTqfmkJmNaFeCiBSzSCohu6_kqNSuFIB1Vz1RE,568
46
46
  fastlife/components/icons/AdjustmentsVertical.jinja,sha256=n7jBi400_q6KnhMABtUwKBBM_7n1IXFtdtaNwamrfxs,560
@@ -1666,7 +1666,7 @@ fastlife/components/pydantic_form/Textarea.jinja,sha256=NzfCi5agRUSVcb5RXw0QamM8
1666
1666
  fastlife/components/pydantic_form/Union.jinja,sha256=czTska54z9KCZKu-FaycLmOvtH6y6CGUFQ8DHnkjrJk,1461
1667
1667
  fastlife/components/pydantic_form/Widget.jinja,sha256=EXskDqt22D5grpGVwlZA3ndve2Wr_6yQH4qVE9c31Og,397
1668
1668
  fastlife/config/__init__.py,sha256=O_Mw2XOxo55SArHdGKRhlTrroRN8ymwfzYKlHG0eV_s,418
1669
- fastlife/config/configurator.py,sha256=e0PeDn6S0swsXAJ79-E6zpnonrYwoFHsfEIEzVaCzls,21222
1669
+ fastlife/config/configurator.py,sha256=jOZvlUVZH7jE1ay9iwVVTudApN1uYNXGQcWT3xaJ5lg,21236
1670
1670
  fastlife/config/exceptions.py,sha256=2MS2MFgb3mDbtdHEwnC-QYubob3Rl0v8O8y615LY0ds,1180
1671
1671
  fastlife/config/openapiextra.py,sha256=_9rBYeTqB7nVuzvUHMwZU387bTfYFHYLlP05NP0vEDs,513
1672
1672
  fastlife/config/registry.py,sha256=Zm3i9ZfQZOP3vNKNKQ8nar7XevI91bqy2tUXX492Fuk,1749
@@ -1706,7 +1706,7 @@ fastlife/testing/__init__.py,sha256=vuqwoNUd3BuIp3fm7nkvmYkIGjIimf5zUGhDkeWrg2s,
1706
1706
  fastlife/testing/testclient.py,sha256=BC7lLQ_jc59UmknAKzgRtW9a3cpX_V_QLp9Mg2ScLA8,20546
1707
1707
  fastlife/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1708
1708
  fastlife/views/pydantic_form.py,sha256=fvjk_5-JAugpBPxwD5GkxxsQiz9eAxzWeCSU9kiyc6s,1438
1709
- fastlifeweb-0.15.0.dist-info/LICENSE,sha256=F75xSseSKMwqzFj8rswYU6NWS3VoWOc_gY3fJYf9_LI,1504
1710
- fastlifeweb-0.15.0.dist-info/METADATA,sha256=_1D_y-_GWIJCaw4ZbZs9LT7O4nfhwdQ4p9Kzlo0BAY4,3278
1711
- fastlifeweb-0.15.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1712
- fastlifeweb-0.15.0.dist-info/RECORD,,
1709
+ fastlifeweb-0.15.1.dist-info/LICENSE,sha256=F75xSseSKMwqzFj8rswYU6NWS3VoWOc_gY3fJYf9_LI,1504
1710
+ fastlifeweb-0.15.1.dist-info/METADATA,sha256=3OB6Kxf1HPxQD0Qi1GFRt2_LvH8VTEWzZn1WDjbyI4o,3345
1711
+ fastlifeweb-0.15.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1712
+ fastlifeweb-0.15.1.dist-info/RECORD,,