Fellow tooters: What's the best way these days to deploy a simple Python app with a simple writeable database (bonus if it works with sqlite, which I know you can't use with eg Vercel or Heroku)?

The use case is a classroom environment. Ideally not a Docker setup, because I don't think at this stage you'd want to explain containerization to people.

The answer to this used to be Heroku's free tier, but without it they're a bit pricey I think.

Any ideas?

It seems like you could use something like Vercel for a simple read-only sqlite app, but I'm not sure what you'd do if you want one you can POST to.

@ken I recently ported a free heroku app to Fly.io. I'm happy to share my experience, but I'm not sure I can recommend it for your use case. I could only get it to work with Docker.

I specifically had trouble using the buildpacks and SQLite, but I had a lot of trouble finding any docs on the open buildpack ecosystem to track down the issue.

@JoeGermuska Interesting, I'll look into it! I can't help but feel that every day we stray further from god's light (code running on servers in an understandable way).
@ken @JoeGermuska I am not religious, but I genuinely miss 'code running on servers in an understandable way.'
@ken @JoeGermuska Could you make a GitHub template repo that's prepped to deploy to Fly and then have students spin off repos?
@palewire @JoeGermuska Hm, interesting. I don't know enough about Fly to know if that would work (and would you be able to write to a sqlite db?)
@ken @palewire my sqlite is write local, deploy read-only; i doubt there's a simple way to preserve data across redeployments without a more complicated setup.

@JoeGermuska @ken @palewire Fly.io does have support for persistent volumes so you could store a writable SQLite DB there. I got it to work before I realized my DB was read-only and could be packaged with the app instead.

I think the main challenge with setting up a template repo is that the mechanism for creating a volume is manual and not part of the config definition. https://fly.io/docs/reference/volumes/#creating-volumes

But once it exists it could work!

Volumes

Documentation and guides from the team at Fly.io.

Fly
@ryan @ken @palewire i wonder if you could use Glitch?
@ken following for updates
@taber can you boost it plz
@ken ohhhh good call enthusiastically yes!!
@ken in 2020 someone showed me PythonAnywhere which is pretty good for this "persistent server with a file browser and CLI". Not free though.
@mapmeld This might be the ticket! It looks like it ticks all the boxes. Thank you!
@ken Google AppEngine ? I've been away from it for a while but it might fit "simple deploy, writable DB, Python". Typically non writable filesystem so no SQLite.

@ken how about DuckDB - OSS, it runs in memory so you don’t have to worry about “connecting” to it. https://duckdb.org/docs/guides/python/sql_on_pandas or

Supabase - easy to spin up, has a very generous free tier https://supabase.com

SQL on Pandas

DuckDB is an in-process database management system focused on analytical query processing. It is designed to be easy to install and easy to use. DuckDB has no external dependencies. DuckDB has bindings for C/C++, Python and R.

DuckDB
@ken I've been using DigitalOcean Functions for small little things. Technically it doesn't have a persistent disk across deploys without attaching a storage ($5/mo), but it does maintain its state for each deploy. So if keeping the DB around long term isn't important, it could work. Functions is pretty easy to get going/understand, it's cheap and has a free tier.
@ken SQLite is included in python itself. You can just use it https://docs.python.org/3/library/sqlite3.html
sqlite3 — DB-API 2.0 interface for SQLite databases

Source code: Lib/sqlite3/ SQLite is a C library that provides a lightweight disk-based database that doesn’t require a separate server process and allows accessing the database using a nonstandard ...

Python documentation