<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: sqlalchemy</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/sqlalchemy.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2024-10-09T15:22:04+00:00</updated><author><name>Simon Willison</name></author><entry><title>otterwiki</title><link href="https://simonwillison.net/2024/Oct/9/otterwiki/#atom-tag" rel="alternate"/><published>2024-10-09T15:22:04+00:00</published><updated>2024-10-09T15:22:04+00:00</updated><id>https://simonwillison.net/2024/Oct/9/otterwiki/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/redimp/otterwiki"&gt;otterwiki&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
It's been a while since I've seen a new-ish Wiki implementation, and this one by  Ralph Thesen is really nice. It's written in Python (Flask + SQLAlchemy + &lt;a href="https://github.com/lepture/mistune"&gt;mistune&lt;/a&gt; for Markdown + &lt;a href="https://github.com/gitpython-developers/GitPython"&gt;GitPython&lt;/a&gt;) and keeps all of the actual wiki content as Markdown files in a local Git repository.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://otterwiki.com/Installation"&gt;installation instructions&lt;/a&gt; are a little in-depth as they assume a production installation with Docker or systemd - I figured out &lt;a href="https://github.com/redimp/otterwiki/issues/146"&gt;this recipe&lt;/a&gt; for trying it locally using &lt;code&gt;uv&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git clone https://github.com/redimp/otterwiki.git
cd otterwiki

mkdir -p app-data/repository
git init app-data/repository

echo "REPOSITORY='${PWD}/app-data/repository'" &amp;gt;&amp;gt; settings.cfg
echo "SQLALCHEMY_DATABASE_URI='sqlite:///${PWD}/app-data/db.sqlite'" &amp;gt;&amp;gt; settings.cfg
echo "SECRET_KEY='$(echo $RANDOM | md5sum | head -c 16)'" &amp;gt;&amp;gt; settings.cfg

export OTTERWIKI_SETTINGS=$PWD/settings.cfg
uv run --with gunicorn gunicorn --bind 127.0.0.1:8080 otterwiki.server:app
&lt;/code&gt;&lt;/pre&gt;

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://news.ycombinator.com/item?id=41749680"&gt;Hacker News&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/flask"&gt;flask&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/git"&gt;git&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sqlalchemy"&gt;sqlalchemy&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sqlite"&gt;sqlite&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/markdown"&gt;markdown&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/wikis"&gt;wikis&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/uv"&gt;uv&lt;/a&gt;&lt;/p&gt;



</summary><category term="flask"/><category term="git"/><category term="python"/><category term="sqlalchemy"/><category term="sqlite"/><category term="markdown"/><category term="wikis"/><category term="uv"/></entry><entry><title>SQLModel</title><link href="https://simonwillison.net/2021/Aug/24/sqlmodel/#atom-tag" rel="alternate"/><published>2021-08-24T23:16:42+00:00</published><updated>2021-08-24T23:16:42+00:00</updated><id>https://simonwillison.net/2021/Aug/24/sqlmodel/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/tiangolo/sqlmodel"&gt;SQLModel&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A new project by FastAPI creator Sebastián Ramírez: SQLModel builds on top of both SQLAlchemy and Sebastián’s Pydantic validation library to provide a new ORM that’s designed around Python 3’s optional typing. The real brilliance here is that a SQLModel subclass is simultaneously a valid SQLAlchemy ORM model AND a valid Pydantic validation model, saving on duplicate code by allowing the same class to be used both for form/API validation and for interacting with the database.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/orm"&gt;orm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sql"&gt;sql&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sqlalchemy"&gt;sqlalchemy&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pydantic"&gt;pydantic&lt;/a&gt;&lt;/p&gt;



</summary><category term="orm"/><category term="python"/><category term="sql"/><category term="sqlalchemy"/><category term="pydantic"/></entry><entry><title>Does SQLAlchemy depend on MySQLdb?</title><link href="https://simonwillison.net/2010/Aug/26/does-sqlalchemy-depend-on/#atom-tag" rel="alternate"/><published>2010-08-26T10:52:00+00:00</published><updated>2010-08-26T10:52:00+00:00</updated><id>https://simonwillison.net/2010/Aug/26/does-sqlalchemy-depend-on/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/Does-SQLAlchemy-depend-on-MySQLdb/answer/Simon-Willison"&gt;Does SQLAlchemy depend on MySQLdb?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;No. SQLAlchemy can talk to all sorts of different DB-API compliant backends, including MySQL Connector/J (Jython only), MySQL Connector/Python, mysql-python (the MySQLdb module) and OurSQL - plus backends for many other databases. See the full list here:&lt;/p&gt;

&lt;span&gt;&lt;a href="http://www.sqlalchemy.org/docs/dbengine.html#supported-dbapis"&gt;http://www.sqlalchemy.org/docs/d...&lt;/a&gt;&lt;/span&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sqlalchemy"&gt;sqlalchemy&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="python"/><category term="sqlalchemy"/><category term="quora"/></entry><entry><title>tranquil</title><link href="https://simonwillison.net/2007/Oct/9/tranquil/#atom-tag" rel="alternate"/><published>2007-10-09T02:30:29+00:00</published><updated>2007-10-09T02:30:29+00:00</updated><id>https://simonwillison.net/2007/Oct/9/tranquil/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://code.google.com/p/tranquil/"&gt;tranquil&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Inspired take on the Django ORM to SQLAlchemy problem: lets you define your models with the Django ORM but use SQLAlchemy to run queries against them.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/djangoorm"&gt;djangoorm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/models"&gt;models&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/orm"&gt;orm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sqlalchemy"&gt;sqlalchemy&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tranquil"&gt;tranquil&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="djangoorm"/><category term="models"/><category term="orm"/><category term="python"/><category term="sqlalchemy"/><category term="tranquil"/></entry><entry><title>Say Hello to Elixir for SQLAlchemy</title><link href="https://simonwillison.net/2007/Feb/12/elixir/#atom-tag" rel="alternate"/><published>2007-02-12T22:28:05+00:00</published><updated>2007-02-12T22:28:05+00:00</updated><id>https://simonwillison.net/2007/Feb/12/elixir/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://cleverdevil.org/computing/51/say-hello-to-elixir-for-sqlalchemy"&gt;Say Hello to Elixir for SQLAlchemy&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
New ActiveRecord style layer over SQLAlchemy; a collaboration that includes the authors of ActiveMapper and TurboEntity.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/elixir"&gt;elixir&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sqlalchemy"&gt;sqlalchemy&lt;/a&gt;&lt;/p&gt;



</summary><category term="elixir"/><category term="python"/><category term="sqlalchemy"/></entry><entry><title>Pickles Begone</title><link href="https://simonwillison.net/2007/Jan/23/pickles/#atom-tag" rel="alternate"/><published>2007-01-23T13:43:19+00:00</published><updated>2007-01-23T13:43:19+00:00</updated><id>https://simonwillison.net/2007/Jan/23/pickles/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://wiki.list.org/display/COM/2006/12/29/Pickles Begone"&gt;Pickles Begone&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Barry Warsaw’s notes on adding SQLAlchemy persistence to Mailman.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/barry-warsaw"&gt;barry-warsaw&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mailman"&gt;mailman&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sqlalchemy"&gt;sqlalchemy&lt;/a&gt;&lt;/p&gt;



</summary><category term="barry-warsaw"/><category term="mailman"/><category term="python"/><category term="sqlalchemy"/></entry></feed>