D1: Use REST API instead of Python module #14

Closed
opened 2025-10-16 22:27:00 -07:00 by swee · 2 comments
Owner

There is a lot of version mismatching with the cloudflare module and currently the D1 module is broken

Traceback (most recent call last):
  File "/home/swee/Git/IRCat/modules/pawserv.py", line 46, in command
    query = self.sql.chanserv_details(channel)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/swee/Git/IRCat/modules/cfd1.py", line 61, in chanserv_details
    e = self.cfexec("SELECT * FROM chanserv WHERE name=?;", [channel])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/swee/Git/IRCat/modules/cfd1.py", line 27, in cfexec
    return query[0].results
           ~~~~~^^^
TypeError: 'SyncSinglePage[QueryResult]' object is not subscriptable
There is a lot of version mismatching with the `cloudflare` module and currently the D1 module is broken ``` Traceback (most recent call last): File "/home/swee/Git/IRCat/modules/pawserv.py", line 46, in command query = self.sql.chanserv_details(channel) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/swee/Git/IRCat/modules/cfd1.py", line 61, in chanserv_details e = self.cfexec("SELECT * FROM chanserv WHERE name=?;", [channel]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/swee/Git/IRCat/modules/cfd1.py", line 27, in cfexec return query[0].results ~~~~~^^^ TypeError: 'SyncSinglePage[QueryResult]' object is not subscriptable ```
swee self-assigned this 2025-10-16 22:27:01 -07:00
Author
Owner

I recently created the aiocfd1 Python module, so the move might be a bit simpler (Only when I rewrite IRCat with an Async structure) :3

I recently created the [`aiocfd1`](https://git.swee.codes/swee/aiocfd1) Python module, so the move might be a bit simpler (Only when I rewrite IRCat with an Async structure) :3
Author
Owner

This project will be rewritten in Go, which can lock module versions.

This project will be rewritten in Go, which can lock module versions.
swee closed this issue 2026-02-26 16:11:14 -08:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
swee/IRCat#14
No description provided.