With the initial support for Python + Workers (https://blog.cloudflare.com/python-workers), we've pu
With the initial support for Python + Workers (https://blog.cloudflare.com/python-workers), we've put together a brief example on how to query D1 from Python: https://developers.cloudflare.com/d1/examples/query-d1-from-python-workers/
Cloudflare Docs
Query D1 from Python Workers · Cloudflare D1 docs
The Cloudflare Workers platform supports multiple languages, including TypeScript, JavaScript, Rust and Python.

12 Replies
Not yet, but looking into supporting: https://vxtwitter.com/elithrar/status/1774819539261255950?s=20
Twitter
vxTwitter / fixvx
Matt Silverlock 🐀 (@elithrar)
@ipsumhh @Cloudflare D1 already supports full-text search: you can use the SQLite FTS5 extension out-of-the-box: https://www.sqlite.org/fts5.html - which also has a trigram tokenizer.
We don't yet support R*Tree (https://www.sqlite.org/rtree.html) but are looking into it!
💖 0
I mean they've got RPC which works fine for transactions.
I'll admit at being disappointed seeing that requirement if you need to go above 50k instances, depending on the use case 50k instances is quite easy to reach (eg something with a freemium model), I wouldn't mind paying for the involved read/writes/storage, but enterprise contracts are pricey and would put me off switching to D1 even when dynamic bindings are available due to that, it's just too much unknown price wise to commit to that kind of vendor lock in.
But congrats on reaching GA! I know it's been a lot of work getting here and I'm excited to see how D1 continues to grow over the next year :MeowHeartCloudflare:
Honestly how can you reach 50k db? I'm just curious
if 1 user getting their own db , 50k users
Hi, I am looking to migrate from Neon to D1 so that I can bind Pages functions to them directly. My database stores a lot of texts (which is auto compressed by Postgres). Does D1 supports auto compression?
FYI: Prisma ORM support for D1 in preview: https://vxtwitter.com/prisma/status/1775170363791425667?s=46
Twitter
vxTwitter / fixvx
Prisma (@prisma)
🎉 Prisma ORM v5.12.0 just dropped!
Here's what's new:
🌐 Cloudflare D1 Support (Preview)
🦋
createMany()
for SQLite
https://github.com/prisma/prisma/releases/tag/5.12.0
💖 57 🔁 6I will not sharding like that tho..., i will shard it by date of birth, date of registration or anything like that (i used to do that in dynamo db to reduce costs), but in another way i usually split the app into many small business logic and create a database for each of them.
Btw while designing the system i will try to store data as much as possible in s3 (sacrifice a bit of convenient) to make the db light and fast
Only metadata are stored and query in db
Might not be the brightest idea but it saves me a lot of money on aws
Yeah pretty much what rob said, eg my service has a free tier, so those users are low revenue, but also low read/write/storage, so a traditional monolithic db is generally fine, just need to upgrade the size when necessary. D1 would be significantly better though for auto-scaling and data separation concerns (once dynamic binding and tooling is in place to manage the schema of that many instances).
Workers for platforms ups the limits , maybe reach out to someone and see what the requirments are to get that enabled
There's workarounds I could do to use D1 today, like sharing dbs between users as you said, but I'm using postgres right now and rely on RLS to keep data separate, I'd rather have a guarantee of data separation rather than refactor everything to make sure data is separate (alongside the risk of developer error in the future potentially leaking data), but that's my personal preference.
It's the kind of thing where once I'd be fine signing up for an ent contract I'll consider it, but by that point it becomes even more work to migrate over to D1 that I'll likely have higher priorities unless I was facing technical issues with my current setup.
Or skip freemium, i only have 5usd users, Meaning 250k mrr.. im sure i can affiord enterprise once the limit is reached.😂.. waiting on dynamic binding
Not d1 related much but how do you guys deal with dates those that use drizzle? Simple createdAt column with CURRENT_TIMESTAMP as default doesn’t work for me
It gives “Invalid date” upon data retrieval