glasskit
Advanced tools
| Metadata-Version: 1.0 | ||
| Name: glasskit | ||
| Version: 3.11.4 | ||
| Version: 3.11.5 | ||
| Summary: a micro webframework based on flask and pymongo | ||
@@ -5,0 +5,0 @@ Home-page: https://gitlab.com/viert/glasskit |
+28
-6
@@ -7,2 +7,3 @@ import functools | ||
| from flask import request, make_response | ||
| from datetime import datetime | ||
@@ -117,11 +118,32 @@ from . import ctx, json | ||
| def filter_expr(flt): | ||
| def get_int_request_param(param_name): | ||
| value = request.values.get(param_name) | ||
| if value is None: | ||
| return None | ||
| try: | ||
| value = int(value) | ||
| except ValueError: | ||
| return None | ||
| return value | ||
| def get_utcts_request_param(param_name): | ||
| ts = get_int_request_param(param_name) | ||
| if not ts: | ||
| return None | ||
| return datetime.utcfromtimestamp(ts) | ||
| def filter_expr(flt, regexp=True): | ||
| if flt.find(" ") >= 0: | ||
| tokens = flt.split() | ||
| return {"$in": tokens} | ||
| try: | ||
| return re.compile(flt, re.IGNORECASE) | ||
| # re.compile's can throw multiple different exceptions. We do not care what went wrong | ||
| except Exception: # pylint: disable=broad-except | ||
| return "" | ||
| if regexp: | ||
| try: | ||
| return re.compile(flt, re.IGNORECASE) | ||
| # re.compile's can throw multiple different exceptions. We do not care what went wrong | ||
| except Exception: # pylint: disable=broad-except | ||
| return "" | ||
| else: | ||
| return flt | ||
@@ -128,0 +150,0 @@ |
+1
-1
| Metadata-Version: 1.0 | ||
| Name: glasskit | ||
| Version: 3.11.4 | ||
| Version: 3.11.5 | ||
| Summary: a micro webframework based on flask and pymongo | ||
@@ -5,0 +5,0 @@ Home-page: https://gitlab.com/viert/glasskit |
+1
-1
@@ -6,3 +6,3 @@ from setuptools import setup, find_packages | ||
| name="glasskit", | ||
| version="3.11.4", | ||
| version="3.11.5", | ||
| description="a micro webframework based on flask and pymongo", | ||
@@ -9,0 +9,0 @@ url="https://gitlab.com/viert/glasskit", |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
163871
0.3%3985
0.45%