Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
654fcb4
Add HTMX integration recipe and utilities for Pydom
elazarcoh Feb 20, 2025
7a86f31
Add tests for HTMX integration and extensions in Pydom
elazarcoh Feb 20, 2025
84b793d
Update HTMX integration recipe with usage notes and improved document…
elazarcoh Feb 20, 2025
1793411
Add overloads for to_iter function
neriyaco Feb 27, 2025
5ee6025
Update README to correct PyPI project link and add supported Python v…
neriyaco Feb 27, 2025
5940f78
Refactor Injector class to improve parameter injection logic
neriyaco Feb 27, 2025
b4983cf
Add __init__.py to styling module for CSS properties import
neriyaco Feb 27, 2025
1970047
Fix #24
neriyaco Feb 28, 2025
f3722fc
Update FalsyTransformer to match only False or None values
neriyaco Mar 2, 2025
374d510
Remove feature from context
neriyaco Mar 2, 2025
30d90dd
Refactor Injector class by renaming inject_params to _inject_params a…
neriyaco Mar 2, 2025
42c1c12
Merge pull request #19 from elazarcoh/htmx-guide
neriyaco Mar 2, 2025
0df0d49
Merge branch 'dev/0.3.1' of https://github.com/xpodev/pydom into dev/…
neriyaco Mar 2, 2025
dd6ffb7
Remove unused imports in script.py
neriyaco Mar 2, 2025
2f346e9
Rename recipes to examples
neriyaco Mar 3, 2025
31d5652
Add context manager for temporary dependency scope in Injector class
neriyaco Mar 3, 2025
156ee8d
Refactor context management to use scoped RenderState during rendering
neriyaco Mar 3, 2025
6df26ae
Remove HTML attributes from simple_transformer
neriyaco Mar 3, 2025
804cb0c
Add documentation
neriyaco Mar 3, 2025
bd0a02e
Add sphinx-autoapi to documentation requirements
neriyaco Mar 3, 2025
f8137a4
Fix sphinx-autoapi version specification in requirements
neriyaco Mar 3, 2025
15926e1
Bump version to 0.3.1
neriyaco Mar 3, 2025
c1b14c2
Update import path for htmx_runtime in test_htmx.py
neriyaco Mar 3, 2025
82002c5
Remove CLI documentation and update version to 0.3.1
neriyaco Mar 3, 2025
9cefd59
Fix tests for Python 3.8
neriyaco Mar 3, 2025
0d25c5f
Refactor event key handling to use remove_prefix utility function
neriyaco Mar 3, 2025
f7ce8e3
Merge branch 'main' into dev/0.3.1
neriyaco Mar 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.12"

sphinx:
configuration: docs/conf.py

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
</p>

<p align="center">
<a href="https://pypi.org/project/python-dom/">
<img src="https://img.shields.io/pypi/v/pydom.svg" alt="PyPI version">
<a href="https://pypi.org/project/pydom/">
<img src="https://img.shields.io/pypi/v/pydom.svg?color=32bc31" alt="PyPI Version">
</a>
<img src="https://img.shields.io/pypi/pyversions/pydom.svg?color=32bc31" alt="Supported Python Versions">
</p>

PyDOM is a Python library that allows you to create web pages using a declarative syntax.
Expand Down
30 changes: 30 additions & 0 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
html[data-theme="light"] {
--pst-color-primary: #564fa1;
--pst-color-secondary: #7f88c3;
--pst-color-secondary-hover: #e6e6e6;
--pst-color-secondary-highlight: #7f3f98 ;
}

html[data-theme="dark"] {
--pst-color-primary: #7f88c3;
--pst-color-secondary: #f7f7f7;
--pst-color-secondary-hover: #e6e6e6;
--pst-color-secondary-highlight: #7f3f98;
}

.navbar-brand {
gap: 1rem;
}

.navbar-brand img {
height: 85%;
}

.navbar-item nav {
border-left: 2px solid #5d5d5f;
padding-left: 8px;
}

.index-logo {
max-width: 250px;
}
Binary file added docs/_static/favicon.ico
Binary file not shown.
27 changes: 27 additions & 0 deletions docs/_static/images/logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions docs/_static/images/logo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docs/_templates/.gitkeep
Empty file.
11 changes: 11 additions & 0 deletions docs/api-reference/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
API Reference
=============

This page contains auto-generated API reference documentation [#f1]_.

.. toctree::
:titlesonly:

/api-reference/pydom/index

.. [#f1] Created with `sphinx-autoapi <https://github.com/readthedocs/sphinx-autoapi>`_
43 changes: 43 additions & 0 deletions docs/api-reference/pydom/component/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
pydom.component
===============

.. py:module:: pydom.component


Classes
-------

.. autoapisummary::

pydom.component.Component


Module Contents
---------------

.. py:class:: Component(*children: pydom.types.rendering.ChildType)

Bases: :py:obj:`abc.ABC`


Helper class that provides a standard way to create an ABC using
inheritance.


.. py:attribute:: children
:type: Tuple[pydom.types.rendering.ChildType, Ellipsis]


.. py:method:: render(*_, **kwargs) -> pydom.types.rendering.RenderResult
:abstractmethod:



.. py:method:: __init_subclass__(**kwargs) -> None
:classmethod:



.. py:method:: __call__(*children: pydom.types.rendering.ChildType)


70 changes: 70 additions & 0 deletions docs/api-reference/pydom/context/context/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
pydom.context.context
=====================

.. py:module:: pydom.context.context


Attributes
----------

.. autoapisummary::

pydom.context.context.T
pydom.context.context.P


Classes
-------

.. autoapisummary::

pydom.context.context.Context


Functions
---------

.. autoapisummary::

pydom.context.context.get_context
pydom.context.context.set_default_context


Module Contents
---------------

.. py:data:: T

.. py:data:: P

.. py:class:: Context

.. py:attribute:: injector
:type: pydom.utils.injector.Injector


.. py:method:: add_prop_transformer(transformer: pydom.context.transformers.PropertyTransformer, /, *, before: Optional[List[Type[pydom.context.transformers.PropertyTransformer]]] = None, after: Optional[List[Type[pydom.context.transformers.PropertyTransformer]]] = None) -> None
add_prop_transformer(matcher: pydom.context.transformers.PropertyMatcherFunction, transformer: pydom.context.transformers.PropertyTransformerFunction, /, *, before: Optional[List[Type[pydom.context.transformers.PropertyTransformer]]] = None, after: Optional[List[Type[pydom.context.transformers.PropertyTransformer]]] = None) -> None


.. py:method:: add_post_render_transformer(transformer: Union[pydom.context.transformers.PostRenderTransformerFunction, pydom.context.transformers.PostRenderTransformer], /, *, before: Optional[List[Type[pydom.context.transformers.PostRenderTransformer]]] = None, after: Optional[List[Type[pydom.context.transformers.PostRenderTransformer]]] = None)


.. py:property:: prop_transformers


.. py:property:: post_render_transformers


.. py:method:: inject(callback: Callable) -> Callable


.. py:method:: standard() -> typing_extensions.Self
:classmethod:



.. py:function:: get_context(context: Optional[Context] = None) -> Context

.. py:function:: set_default_context(context: Context) -> None

27 changes: 27 additions & 0 deletions docs/api-reference/pydom/context/feature/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
pydom.context.feature
=====================

.. py:module:: pydom.context.feature


Classes
-------

.. autoapisummary::

pydom.context.feature.Feature


Module Contents
---------------

.. py:class:: Feature(context: pydom.context.context.Context)

.. py:attribute:: context


.. py:property:: feature_name
:type: str



66 changes: 66 additions & 0 deletions docs/api-reference/pydom/context/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
pydom.context
=============

.. py:module:: pydom.context


Submodules
----------

.. toctree::
:maxdepth: 1

/api-reference/pydom/context/context/index
/api-reference/pydom/context/feature/index
/api-reference/pydom/context/standard/index
/api-reference/pydom/context/transformers/index


Classes
-------

.. autoapisummary::

pydom.context.Context


Functions
---------

.. autoapisummary::

pydom.context.get_context


Package Contents
----------------

.. py:class:: Context

.. py:attribute:: injector
:type: pydom.utils.injector.Injector


.. py:method:: add_prop_transformer(transformer: pydom.context.transformers.PropertyTransformer, /, *, before: Optional[List[Type[pydom.context.transformers.PropertyTransformer]]] = None, after: Optional[List[Type[pydom.context.transformers.PropertyTransformer]]] = None) -> None
add_prop_transformer(matcher: pydom.context.transformers.PropertyMatcherFunction, transformer: pydom.context.transformers.PropertyTransformerFunction, /, *, before: Optional[List[Type[pydom.context.transformers.PropertyTransformer]]] = None, after: Optional[List[Type[pydom.context.transformers.PropertyTransformer]]] = None) -> None


.. py:method:: add_post_render_transformer(transformer: Union[pydom.context.transformers.PostRenderTransformerFunction, pydom.context.transformers.PostRenderTransformer], /, *, before: Optional[List[Type[pydom.context.transformers.PostRenderTransformer]]] = None, after: Optional[List[Type[pydom.context.transformers.PostRenderTransformer]]] = None)


.. py:property:: prop_transformers


.. py:property:: post_render_transformers


.. py:method:: inject(callback: Callable) -> Callable


.. py:method:: standard() -> typing_extensions.Self
:classmethod:



.. py:function:: get_context(context: Optional[Context] = None) -> Context

28 changes: 28 additions & 0 deletions docs/api-reference/pydom/context/standard/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
pydom.context.standard
======================

.. py:module:: pydom.context.standard


Submodules
----------

.. toctree::
:maxdepth: 1

/api-reference/pydom/context/standard/transformers/index


Functions
---------

.. autoapisummary::

pydom.context.standard.add_standard_features


Package Contents
----------------

.. py:function:: add_standard_features(ctx: pydom.context.context.Context)

Loading