Posts tagged: python

All posts with the tag "python"

311 posts latest post 2026-07-10
Publishing rhythm
Feb 2026 | 1 posts
External Link stackoverflow.com I am trying to use htmx on a new fastapi site for my thoughts, and have been hitting this error. What is happening # I have an htmx component that gets the current users name, but if they are not logged in the backend redirects to a login form. But for some reason when the front end gets this redirect, it tries to do it through http, and flags it as insecure. The solution # To solve this issue, the post directs to set the to ‘*’
First-class session support in FastAPI · Issue #754 · fastapi/fastapi Is your feature request related to a problem All of the security schemas currently supported by FastAPI rely on some sort of "client-server synergy", where, for instance, the client is expected to... GitHub · github.com Here is a snippet provided by @tiangolo to store the users jwt inside of a session cookie in fatapi. This was written in feb 12, 2020 and admits that this is not a well documented part of fastapi. It’s already in place. More or less like the rest of the security tools. And it’s compatible with the rest of the parts, integrated with OpenAPI (as possible), but probably most importantly, with dependencies. It’s just not properly documented yet. 😞 But still, it works 🚀 e.g.
Redirecting… duckdb.org duckdb can just query any pandas dataframe that is in memory. I tried running it against a list of objects and got this error. Great error message that gives me supported types right in the message.
![[None]] When setting up a new machine, vm, docker image you might be installing command line tools from places like pip. They will often put executables in your directory, but by default your shell is not looking in that directory for commands. To solve this you need to add that directory to your $PATH. To make this change permanant add this line to your shell’s init script, which is likely something like or.
https://t.co/km5m7k6Pb0 #doyensec #appsec #websockets #burpsuite" loading=“lazy”> Doyensec (@Doyensec) on X Announcing wsrepl, the WebSocket testing tool from Doyensec! This intuitive tool is super easy to use and makes automation around WebSockets simple! Check out our blog for the details and download… X (formerly Twitter) · twitter.com wsrepl is an epic websocket repl built in python on the textual framework.
Filter Data - WHERE - SQLModel SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness. sqlmodel.tiangolo.com When fetching pydantic models from the database with sqlmodel, and you cannot select your item by id, you probably need to use a where clause. This is the sqlmodel way of doing it. Here is a snippet of how I am using sqlmodel select and where to find a post by link in my thoughts database.
URL Decoding query strings or form parameters in Python | URLDecoder URL Decode online. URLDecoder is a simple and easy to use online tool for decoding URL components. Get started by typing or pasting a URL encoded string in the input text area, the tool will automa... urldecoder.io In order to turn url encoded links back into links that I would find in the database of my thoughts project I need to urldecode them when they hit the api. When anything hits the api it must urlencode the links in order for them to be sent correctly as data and not get parsed as part of the url. Here is a snippet of how I am using urlib.parse.unquote to un-encode encoded urls so that I can fetch posts from the database.
sqlite-utils command-line tool - sqlite-utils sqlite-utils.datasette.io I want to like jq, but I think Simon is selling me on sqlite, maybe its just me but this looks readable, hackable, editable, memorizable. Everytime I try jq, and its 5 minutes fussing with it just to get the most basic thing to work. I know enough sql out of the gate to make this work off the top of my head