wwwpy
Advanced tools
+1
-1
| Metadata-Version: 2.4 | ||
| Name: wwwpy | ||
| Version: 0.1.77 | ||
| Version: 0.1.78 | ||
| Summary: Build Powerful Web Applications: Simple, Scalable, and Fully Customizable | ||
@@ -5,0 +5,0 @@ Author-email: Simone Giacomelli <simone.giacomelli@gmail.com> |
+1
-1
| # https://packaging.python.org/en/latest/tutorials/packaging-projects/ | ||
| [project] | ||
| name = "wwwpy" | ||
| version = "0.1.77" | ||
| version = "0.1.78" | ||
@@ -6,0 +6,0 @@ # todo |
| Metadata-Version: 2.4 | ||
| Name: wwwpy | ||
| Version: 0.1.77 | ||
| Version: 0.1.78 | ||
| Summary: Build Powerful Web Applications: Simple, Scalable, and Fully Customizable | ||
@@ -5,0 +5,0 @@ Author-email: Simone Giacomelli <simone.giacomelli@gmail.com> |
@@ -1,3 +0,3 @@ | ||
| __version__ = "0.1.77" | ||
| git_hash_short = "3ab2d14" | ||
| git_hash = "3ab2d143c55c4886e951d7f457b3c822e4ae430b" | ||
| __version__ = "0.1.78" | ||
| git_hash_short = "f053281" | ||
| git_hash = "f0532813b13938b4cfebe5676a2b209a895de419" |
@@ -25,2 +25,9 @@ import base64 | ||
| async def upload_abort(name: str): | ||
| logger.info(f'upload_abort name={name}') | ||
| file = _resolve_file(name) | ||
| file.unlink(missing_ok=True) | ||
| return None | ||
| def _resolve_file(name: str) -> Path: | ||
@@ -27,0 +34,0 @@ folder = Path(__file__).parent.parent / 'uploads' |
@@ -283,4 +283,10 @@ from __future__ import annotations | ||
| def __init__(self): | ||
| def __init__(self, cached=True): | ||
| """ If cached is True, the element will be cached after the first access. | ||
| The practical use of this is when removing the element from the parent, the element is still available. | ||
| Without cache, if it is detached from the parent, the element will be unreachable. | ||
| """ | ||
| self.name = None | ||
| self.cached = cached | ||
| self.cache = None | ||
@@ -293,2 +299,5 @@ def __set_name__(self, owner, name): | ||
| def __get__(self, obj: Component, objtype=None): | ||
| return obj._find_python_attribute(self.name) | ||
| value = obj._find_python_attribute(self.name) if self.cache is None else self.cache | ||
| if self.cached and self.cache is None: | ||
| self.cache = value | ||
| return value |
@@ -1,14 +0,13 @@ | ||
| from js import fetch | ||
| from js import fetch, console | ||
| import logging | ||
| # logger = logging.getLogger(__name__) | ||
| logger = console # if log redirect is active, it will create an infinite loop because | ||
| logger = logging.getLogger(__name__) | ||
| async def async_fetch_str(url: str, method: str = 'GET', data: str = '') -> str: | ||
| logger.debug(f'url={url}') | ||
| logger.debug(f'method={method}') | ||
| logger.debug(f'data=`{data}`') | ||
| logger.debug(f'len(data)={len(data)}') | ||
| logger.debug(f'data=`{data[:100]}`') | ||
| response = await fetch(url, method=method, body=data) | ||
| text = await response.text() | ||
| return text |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
748860
0.11%11128
0.13%