Loved this explanation about all the recent lock down with RHEL from Jeff Geerling.
...
GitHub stars posts
Loved this explanation about all the recent lock down with RHEL from Jeff Geerling.
...
As the title states sqlite-utils now supports plugins. I dug in just a bit and Simon implemented this completely with entrypoints, no framework or library at all.
Great short explaination of session vs token authentication.
Getting form data inside of fastapi was not intuitive to me at first. Everything I had used in fastapi leaned on pydantic models. Form data comes in differently and needs collected differently.
I am creating this post from a desktop app that I created in 3 lines.
sqlalchemy server_defaults end up as defaults in the database when new values are inserted.
A feature of jinja that I just discovered is including sub templates. Here is an example from the docs.
{% include 'header.html' %} Body goes here. {% include 'footer.html' %}
And inside of my thoughts project I used it to render posts.
<ul id='posts'> {% for post in posts.__root__ %} {% include 'post_item.html' %} {% endfor %} </ul>
note that post_item.html automatically inherits the post variable.
A guide to add Jinja2Templates to fastapi.
A complete reference of all of the htmx swapping methods.
I am trying to use htmx on a new fastapi site for my thoughts, and have been hitting this error.
Mixed Content: The page at 'https://front.mydomain.com/#/clients/1' was loaded over HTTPS, but requested an insecure resource 'http://back.mydomain/jobs/?_end=25&_order=DESC&_sort=id&_start=0&client_id=1'. This request has been blocked; the content must be served over HTTPS.
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.
<div hx-get='/users/me' hx-trigger='load'> get me </div>
But for some reason when the front end gets this redirect, it tries to do it through http,...
...
On void linux. Under `/etc/containers/` there is a file called `registries.conf`. It is complemented by `man 5 containers-registries.conf`. Change (for me lines 11-12) which say [registries.search] registries = [] to
[registries.search] registries = ['docker.io']
Without the above you wonβt be able to use basic Various documentation (redhat blog entries, ... (drawn from https://www.projectatomic.io/blog/2018/05/podman-tls/)
podman functions. You might get errors like:man podman pages) say that dockerhub is a default, but without this step itβs clearly not.Good luck. Feel free to use the comment box below if you have a github account.
Using templates with htmx requires the client-side-templates extension, and the template engine to be loaded in a <script> tag.
example htmx using templates.
Mounting static files in fastapi.
Love the poling example with hx-trigger=βevery 1sβ.
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.
Harlequin is a pretty sweet example of what textual can be used to create. Its a terminal based sql ide for DuckDB.
To persist data in duckdb you need to first make a connection to a duck db database.
con = duckdb.connect('file.db')
Then work off of the connection con rather than duckdb.
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.
pytest-subtests is a package to register multiple subtests within a similar test function.
A nice codepen reference for dark forms. I am using it for my thoughts chrome extension.