Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pgjones
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
pgjones
1y ago
The `sql_context` feature is meant to protect against SQL injection. I think for your usecase you would need to supply all columns, but you could used nested t-strings included based on whatever logic you need.
2.
▲
by
pgjones
1y ago
It does parse the SQL. At the moment an expression is defined as all the text between the appropriate separators given the clause.
3.
▲
by
pgjones
1y ago
Sorry that is a typo, I meant, with sql_context(columns={"x"}):
4.
▲
by
pgjones
1y ago
Thank you! My Google foo did not find this.
5.
▲
by
pgjones
1y ago
The presence of Absent removes the entire expression, and if that removal results in an empty clause (or group) it will remove that as well. For example if `a = Absent` `WHERE a = {a}` will remove everything, whereas `WHERE a = {a} AND b =
6.
▲
by
pgjones
1y ago
Thanks, do you have a reference for SQL grammar - I've had no success finding an official source.
7.
▲
Show HN: SQL-tString a t-string SQL builder in Python
(github.com)
85 points
by
pgjones
1y ago
|
35 comments
8.
▲
by
pgjones
1y ago
If you want to see a usage for this I've built, and use, [SQL-tString]( https://github.com/pgjones/sql-tstring ) as an SQL builder.
9.
▲
by
pgjones
2y ago
Quart, the ASGI version of Flask, also has background tasks, https://quart.palletsprojects.com/en/latest/how_to_guides/ba... , and there is an extension Quart-Tasks, https://github.com/pgjones&
10.
▲
by
pgjones
2y ago
It is a shame GCRA is not more well known and used for rate limiting. It is, in my view, a better algorithm. https://medium.com/smarkets/implementing-gcra-in-python-5df1... https://en.m.wikipedia.org/wi
11.
▲
by
pgjones
3y ago
Yes, I've written about this comparison in detail https://pgjones.dev/blog/fastapi-flask-quart-2022/ .
12.
▲
by
pgjones
3y ago
There are new logos for all the Pallets projects and Pallets itself, based on a common theme.
13.
▲
Tell HN: Flask and Quart have now partially merged
20 points
by
pgjones
3y ago
|
7 comments
14.
▲
by
pgjones
3y ago
https://pgjones.dev I blog mostly about Python web developed, especially Flask, Quart and Hypercorn related aspects.
15.
▲
Tips and techniques for modern Flask apps
(pgjones.dev)
2 points
by
pgjones
4y ago
|
0 comments
16.
▲
by
pgjones
4y ago
I've three things :), 1. Quart, https://quart.palletsprojects.com , an ASGI (async/await) re-implementation of the Python web MicroFramework Flask. It is now maintained alongside, by the same people, as Flask. 2. Hyperc
17.
▲
by
pgjones
4y ago
It is also easier to manage for Flask - it is very mature and we fixed most of the issues present in FastAPI many years ago.
18.
▲
by
pgjones
4y ago
Flask supports async, see https://flask.palletsprojects.com/en/2.1.x/async-await/ . Also see Quart https://github.com/pgjones/quart (which is Flask re-implemented with async-await) and Qu
19.
▲
Faster Routing for Flask and Quart
(pgjones.dev)
4 points
by
pgjones
4y ago
|
0 comments
20.
▲
by
pgjones
5y ago
Or Hypercorn https://gitlab.com/pgjones/hypercorn if you want HTTP/1, HTTP/2, and HTTP/3.
21.
▲
by
pgjones
5y ago
You can already do this using Hypothesis with the Pydantic plugin, https://pydantic-docs.helpmanual.io/hypothesis_plugin/ . Here is an example for Quart-Schema (similar setup to FastAPI) https://pgjones.dev&#
22.
▲
by
pgjones
5y ago
Hypercorn a Python ASGI server supports HTTP/3 built on aioquic which is a Python library supports QUIC. (I'm the author of Hypercorn).
23.
▲
by
pgjones
6y ago
Hi Hacker News, I’ve reached an age now where I need to start thinking about my retirement, in addition to buying a house, saving for a wedding, starting a family, affording to pay for childcare, amongst other things. Frustratingly, it is r
24.
▲
Show HN: Moneyed – be your own financial adviser – built with Quart and React
(moneyed.co.uk)
6 points
by
pgjones
6y ago
|
1 comments
25.
▲
Things you should be doing with cookies (but probably aren't)
(moneyed.co.uk)
4 points
by
pgjones
6y ago
|
0 comments
26.
▲
by
pgjones
6y ago
Potentially soon for Flask, https://github.com/pallets/flask/pull/3412 . Also see Quart, https://gitlab.com/pgjones/quart
27.
▲
by
pgjones
6y ago
It is possible to compare HTTP/3 to HTTP/2 & HTTP/1 using Python, as Hypercorn (via aioquic for HTTP/3) supports all three. When I compared late last year I found HTTP/3 to be noticeably slower, https:/&#x
28.
▲
by
pgjones
7y ago
I took an early look at the performance (using Python) in November which may also be of interest. https://pgjones.dev/blog/early-look-at-http3-2019/ (That site is also served over HTTP/3 if you want to try it
29.
▲
An early look at HTTP/3
(pgjones.dev)
2 points
by
pgjones
7y ago
|
0 comments
30.
▲
How to serve HTTP 1, 2, & 3 in Python
(pgjones.dev)
2 points
by
pgjones
7y ago
|
0 comments
More ›