falk 0.1.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 (115) hide show
  1. falk-0.1.2/.coveragerc +4 -0
  2. falk-0.1.2/.dockerignore +3 -0
  3. falk-0.1.2/.gitignore +180 -0
  4. falk-0.1.2/.prettierrc +1 -0
  5. falk-0.1.2/LICENSE.txt +21 -0
  6. falk-0.1.2/Makefile +86 -0
  7. falk-0.1.2/PKG-INFO +30 -0
  8. falk-0.1.2/README.md +1 -0
  9. falk-0.1.2/client/falk.ts +596 -0
  10. falk-0.1.2/docker-compose.yml +29 -0
  11. falk-0.1.2/docs/.gitignore +1 -0
  12. falk-0.1.2/docs/docs/index.md +4 -0
  13. falk-0.1.2/docs/mkdocs.yml +64 -0
  14. falk-0.1.2/falk/__init__.py +0 -0
  15. falk-0.1.2/falk/apps.py +204 -0
  16. falk-0.1.2/falk/asgi.py +376 -0
  17. falk-0.1.2/falk/component_registry.py +66 -0
  18. falk-0.1.2/falk/component_templates.py +515 -0
  19. falk-0.1.2/falk/components.py +68 -0
  20. falk-0.1.2/falk/dependency_injection.py +140 -0
  21. falk-0.1.2/falk/errors.py +109 -0
  22. falk-0.1.2/falk/extra_template_context.py +14 -0
  23. falk-0.1.2/falk/hashing.py +9 -0
  24. falk-0.1.2/falk/http.py +37 -0
  25. falk-0.1.2/falk/immutable_proxy.py +194 -0
  26. falk-0.1.2/falk/imports.py +12 -0
  27. falk-0.1.2/falk/keys.py +8 -0
  28. falk-0.1.2/falk/middlewares/__init__.py +0 -0
  29. falk-0.1.2/falk/middlewares/static_files.py +46 -0
  30. falk-0.1.2/falk/node_ids.py +22 -0
  31. falk-0.1.2/falk/providers/__init__.py +0 -0
  32. falk-0.1.2/falk/providers/callbacks.py +18 -0
  33. falk-0.1.2/falk/providers/flags.py +12 -0
  34. falk-0.1.2/falk/providers/middlewares.py +12 -0
  35. falk-0.1.2/falk/providers/requests.py +34 -0
  36. falk-0.1.2/falk/providers/responses.py +99 -0
  37. falk-0.1.2/falk/providers/routing.py +27 -0
  38. falk-0.1.2/falk/providers/static_files.py +17 -0
  39. falk-0.1.2/falk/pytest_plugin.py +101 -0
  40. falk-0.1.2/falk/rendering.py +355 -0
  41. falk-0.1.2/falk/request_handling.py +331 -0
  42. falk-0.1.2/falk/routing.py +120 -0
  43. falk-0.1.2/falk/static/falk/falk.js +1 -0
  44. falk-0.1.2/falk/static/falk/falk.js.LICENSE.txt +7 -0
  45. falk-0.1.2/falk/static/falk/stl-viewer.js +2 -0
  46. falk-0.1.2/falk/static/falk/stl-viewer.js.LICENSE.txt +19 -0
  47. falk-0.1.2/falk/static_files.py +8 -0
  48. falk-0.1.2/falk/tokens.py +64 -0
  49. falk-0.1.2/falk/utils/__init__.py +0 -0
  50. falk-0.1.2/falk/utils/environment.py +29 -0
  51. falk-0.1.2/falk/utils/iterables.py +10 -0
  52. falk-0.1.2/falk/utils/path.py +36 -0
  53. falk-0.1.2/falk/version.py +34 -0
  54. falk-0.1.2/falk/wsgi.py +126 -0
  55. falk-0.1.2/falk.egg-info/PKG-INFO +30 -0
  56. falk-0.1.2/falk.egg-info/SOURCES.txt +113 -0
  57. falk-0.1.2/falk.egg-info/dependency_links.txt +1 -0
  58. falk-0.1.2/falk.egg-info/entry_points.txt +2 -0
  59. falk-0.1.2/falk.egg-info/requires.txt +24 -0
  60. falk-0.1.2/falk.egg-info/top_level.txt +1 -0
  61. falk-0.1.2/node.Dockerfile +3 -0
  62. falk-0.1.2/package-lock.json +1722 -0
  63. falk-0.1.2/package.json +15 -0
  64. falk-0.1.2/pyproject.toml +74 -0
  65. falk-0.1.2/pytest.ini +6 -0
  66. falk-0.1.2/python.Dockerfile +49 -0
  67. falk-0.1.2/setup.cfg +4 -0
  68. falk-0.1.2/test_apps/test_app/__init__.py +0 -0
  69. falk-0.1.2/test_apps/test_app/app.py +108 -0
  70. falk-0.1.2/test_apps/test_app/components/__init__.py +0 -0
  71. falk-0.1.2/test_apps/test_app/components/base.py +50 -0
  72. falk-0.1.2/test_apps/test_app/components/client/__init__.py +0 -0
  73. falk-0.1.2/test_apps/test_app/components/client/callback_passing.py +72 -0
  74. falk-0.1.2/test_apps/test_app/components/client/event_delegation.py +134 -0
  75. falk-0.1.2/test_apps/test_app/components/client/render_events.py +77 -0
  76. falk-0.1.2/test_apps/test_app/components/client/run_callback_in_javascript.py +87 -0
  77. falk-0.1.2/test_apps/test_app/components/client/run_callback_in_python.py +63 -0
  78. falk-0.1.2/test_apps/test_app/components/events/__init__.py +0 -0
  79. falk-0.1.2/test_apps/test_app/components/events/change.py +64 -0
  80. falk-0.1.2/test_apps/test_app/components/events/click.py +61 -0
  81. falk-0.1.2/test_apps/test_app/components/events/input.py +64 -0
  82. falk-0.1.2/test_apps/test_app/components/events/render.py +30 -0
  83. falk-0.1.2/test_apps/test_app/components/events/submit.py +48 -0
  84. falk-0.1.2/test_apps/test_app/components/index.py +13 -0
  85. falk-0.1.2/test_apps/test_app/components/rendering/__init__.py +0 -0
  86. falk-0.1.2/test_apps/test_app/components/rendering/flags.py +99 -0
  87. falk-0.1.2/test_apps/test_app/components/rendering/iframes.py +60 -0
  88. falk-0.1.2/test_apps/test_app/components/rendering/static/package-component.css +3 -0
  89. falk-0.1.2/test_apps/test_app/components/rendering/static/package-component.js +5 -0
  90. falk-0.1.2/test_apps/test_app/components/rendering/styles_and_scripts.py +102 -0
  91. falk-0.1.2/test_apps/test_app/static/app-component.css +3 -0
  92. falk-0.1.2/test_apps/test_app/static/app-component.js +5 -0
  93. falk-0.1.2/test_apps/test_app/static/base.css +55 -0
  94. falk-0.1.2/tests/conftest.py +97 -0
  95. falk-0.1.2/tests/test_0000_test_suite.py +22 -0
  96. falk-0.1.2/tests/test_0010_component_registry.py +98 -0
  97. falk-0.1.2/tests/test_0010_dependency_injection.py +283 -0
  98. falk-0.1.2/tests/test_0010_immutable_proxies.py +47 -0
  99. falk-0.1.2/tests/test_0010_node_ids.py +27 -0
  100. falk-0.1.2/tests/test_0010_routing.py +195 -0
  101. falk-0.1.2/tests/test_0010_tokens.py +158 -0
  102. falk-0.1.2/tests/test_0020_request_parsing.py +122 -0
  103. falk-0.1.2/tests/test_0021_views.py +59 -0
  104. falk-0.1.2/tests/test_0022_middlewares.py +110 -0
  105. falk-0.1.2/tests/test_0030_components.py +73 -0
  106. falk-0.1.2/tests/test_0040_callback_passing.py +50 -0
  107. falk-0.1.2/tests/test_0040_event_delegation.py +52 -0
  108. falk-0.1.2/tests/test_0040_render_events.py +54 -0
  109. falk-0.1.2/tests/test_0040_rendering_flags.py +123 -0
  110. falk-0.1.2/tests/test_0040_run_callback_in_javascript.py +38 -0
  111. falk-0.1.2/tests/test_0040_run_callback_in_python.py +40 -0
  112. falk-0.1.2/tests/test_0040_styles_and_scripts.py +108 -0
  113. falk-0.1.2/tox.ini +117 -0
  114. falk-0.1.2/tsconfig.json +17 -0
  115. falk-0.1.2/webpack.config.js +41 -0
falk-0.1.2/.coveragerc ADDED
@@ -0,0 +1,4 @@
1
+ [run]
2
+ branch = True
3
+ source = falk
4
+ omit = falk/version.py
@@ -0,0 +1,3 @@
1
+ /playwright
2
+ /.tox
3
+ /node_modules
falk-0.1.2/.gitignore ADDED
@@ -0,0 +1,180 @@
1
+ # Created by https://www.toptal.com/developers/gitignore/api/python
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=python
3
+
4
+ ### Python ###
5
+ # Byte-compiled / optimized / DLL files
6
+ __pycache__/
7
+ *.py[cod]
8
+ *$py.class
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ share/python-wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py,cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+ cover/
57
+
58
+ # Translations
59
+ *.mo
60
+ *.pot
61
+
62
+ # Django stuff:
63
+ *.log
64
+ local_settings.py
65
+ db.sqlite3
66
+ db.sqlite3-journal
67
+
68
+ # Flask stuff:
69
+ instance/
70
+ .webassets-cache
71
+
72
+ # Scrapy stuff:
73
+ .scrapy
74
+
75
+ # Sphinx documentation
76
+ docs/_build/
77
+
78
+ # PyBuilder
79
+ .pybuilder/
80
+ target/
81
+
82
+ # Jupyter Notebook
83
+ .ipynb_checkpoints
84
+
85
+ # IPython
86
+ profile_default/
87
+ ipython_config.py
88
+
89
+ # pyenv
90
+ # For a library or package, you might want to ignore these files since the code is
91
+ # intended to run in multiple environments; otherwise, check them in:
92
+ # .python-version
93
+
94
+ # pipenv
95
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
97
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
98
+ # install all needed dependencies.
99
+ #Pipfile.lock
100
+
101
+ # poetry
102
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
103
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
104
+ # commonly ignored for libraries.
105
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106
+ #poetry.lock
107
+
108
+ # pdm
109
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
110
+ #pdm.lock
111
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
112
+ # in version control.
113
+ # https://pdm.fming.dev/#use-with-ide
114
+ .pdm.toml
115
+
116
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117
+ __pypackages__/
118
+
119
+ # Celery stuff
120
+ celerybeat-schedule
121
+ celerybeat.pid
122
+
123
+ # SageMath parsed files
124
+ *.sage.py
125
+
126
+ # Environments
127
+ .env
128
+ .venv
129
+ env/
130
+ venv/
131
+ ENV/
132
+ env.bak/
133
+ venv.bak/
134
+
135
+ # Spyder project settings
136
+ .spyderproject
137
+ .spyproject
138
+
139
+ # Rope project settings
140
+ .ropeproject
141
+
142
+ # mkdocs documentation
143
+ /site
144
+
145
+ # mypy
146
+ .mypy_cache/
147
+ .dmypy.json
148
+ dmypy.json
149
+
150
+ # Pyre type checker
151
+ .pyre/
152
+
153
+ # pytype static type analyzer
154
+ .pytype/
155
+
156
+ # Cython debug symbols
157
+ cython_debug/
158
+
159
+ # PyCharm
160
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
161
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
162
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
163
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
164
+ #.idea/
165
+
166
+ ### Python Patch ###
167
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
168
+ poetry.toml
169
+
170
+ # ruff
171
+ .ruff_cache/
172
+
173
+ # LSP config files
174
+ pyrightconfig.json
175
+
176
+ # End of https://www.toptal.com/developers/gitignore/api/python
177
+ falk/version.py
178
+ falk/static/
179
+ /node_modules/
180
+ /playwright/
falk-0.1.2/.prettierrc ADDED
@@ -0,0 +1 @@
1
+ {}
falk-0.1.2/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Florian Scherf
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
falk-0.1.2/Makefile ADDED
@@ -0,0 +1,86 @@
1
+ PYTHON=python3.13
2
+ PYPIRC=~/.pypirc.fscherf
3
+
4
+ .PHONY: \
5
+ all \
6
+ python-shell python-test python-build \
7
+ node-shell node-build node-watch node-lint \
8
+ clean build test ci-test lint \
9
+ docs docs-server grip
10
+
11
+ define DOCKER_COMPOSE_RUN
12
+ docker compose run \
13
+ -it \
14
+ --user=$$(id -u):$$(id -g) \
15
+ --remove-orphans \
16
+ --service-ports \
17
+ $1 $2
18
+ endef
19
+
20
+ all: asgi-test-app
21
+
22
+ # python
23
+ python-shell:
24
+ $(call DOCKER_COMPOSE_RUN,python,bash)
25
+
26
+ python-test:
27
+ $(call DOCKER_COMPOSE_RUN,python,tox)
28
+
29
+ python-build:
30
+ rm -rf build dist *.egg-info && \
31
+ $(call DOCKER_COMPOSE_RUN,python,${PYTHON} -m build)
32
+
33
+ # node
34
+ node-shell:
35
+ $(call DOCKER_COMPOSE_RUN,node,bash)
36
+
37
+ node-build:
38
+ $(call DOCKER_COMPOSE_RUN,node,npm run build)
39
+
40
+ node-watch:
41
+ $(call DOCKER_COMPOSE_RUN,node,npm run watch)
42
+
43
+ node-lint:
44
+ $(call DOCKER_COMPOSE_RUN,node,npm run lint)
45
+
46
+ # meta
47
+ clean:
48
+ rm -rf build dist *.egg-info && \
49
+ rm -rf .tox && \
50
+ rm -rf node_modules && \
51
+ rm -rf falk/client
52
+
53
+ build: node-build python-build
54
+
55
+ test:
56
+ $(call DOCKER_COMPOSE_RUN,python,tox -e ${PYTHON} ${args})
57
+
58
+ ci-test:
59
+ $(call DOCKER_COMPOSE_RUN,python,tox ${args})
60
+
61
+ lint: node-lint
62
+
63
+ # docs
64
+ docs:
65
+ $(call DOCKER_COMPOSE_RUN,python,tox -e docs ${args})
66
+
67
+ docs-server:
68
+ $(call DOCKER_COMPOSE_RUN,python,tox -e docs-server ${args})
69
+
70
+ grip:
71
+ $(call DOCKER_COMPOSE_RUN,python,tox -e grip ${args})
72
+
73
+ # test apps
74
+ wsgi-test-app: node-build
75
+ $(call DOCKER_COMPOSE_RUN,python,tox -e wsgi-test-app ${args})
76
+
77
+ asgi-test-app: node-build
78
+ $(call DOCKER_COMPOSE_RUN,python,tox -e asgi-test-app ${args})
79
+
80
+ # releases
81
+ _pypi-upload:
82
+ $(call DOCKER_COMPOSE_RUN,-v ${PYPIRC}:/.pypirc,python twine upload --config-file /.pypirc dist/*)
83
+
84
+ _doc-upload:
85
+ rsync -avh --recursive --delete \
86
+ docs/site/* pages.fscherf.de:/var/www/virtual/fscherf/pages.fscherf.de/falk
falk-0.1.2/PKG-INFO ADDED
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: falk
3
+ Version: 0.1.2
4
+ Author-email: Florian Scherf <mail@florianscherf.de>
5
+ Requires-Python: >=3.9
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE.txt
8
+ Requires-Dist: jinja2
9
+ Requires-Dist: simple-logging-setup
10
+ Requires-Dist: aiofiles
11
+ Provides-Extra: dev
12
+ Requires-Dist: uvicorn[standard]; extra == "dev"
13
+ Requires-Dist: watchfiles; extra == "dev"
14
+ Requires-Dist: rlpython; extra == "dev"
15
+ Provides-Extra: pytest
16
+ Requires-Dist: uvicorn[standard]; extra == "pytest"
17
+ Provides-Extra: test
18
+ Requires-Dist: coverage==7.10.4; extra == "test"
19
+ Requires-Dist: pytest==8.4.1; extra == "test"
20
+ Requires-Dist: pytest-playwright==0.7.1; extra == "test"
21
+ Requires-Dist: requests; extra == "test"
22
+ Requires-Dist: rlpython; extra == "test"
23
+ Provides-Extra: docs
24
+ Requires-Dist: mkdocs==1.6.1; extra == "docs"
25
+ Requires-Dist: mkdocstrings[python]==0.28.2; extra == "docs"
26
+ Requires-Dist: mkdocs-material==9.6.6; extra == "docs"
27
+ Requires-Dist: grip==4.6.2; extra == "docs"
28
+ Dynamic: license-file
29
+
30
+ # falk
falk-0.1.2/README.md ADDED
@@ -0,0 +1 @@
1
+ # falk