mindly.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mindly.Social is an English speaking, friendly Mastodon instance created for people who want to use their brains and their hearts to make social networking more social. 🧠💖

Administered by:

Server stats:

1.1K
active users

C.

@rye

Hokay... I'm going to have a better look at that data when it's not midnight. 😉

The project name scared me; I thought at first it was going to be something to do with the language, of which I have been very careful to avoid learning anything about 😜

@rye

Sorry, took a while to get back to this. Really simplistic implementation here:
pastebin.com/kVnRMyzq

Notes:
-it doesn't do proper SQL escaping of values, just a cheesy simulacrum
-you can print the SQL instead of creating the SQLite DB by changing the `if False:` at line 127 to True
-I didn't know what to do with the `relationship_types` list, as it's only one record and doesn't seem to convey much
-Everything Is A String (TM)

1/x

PastebinCheesy json-to-DB example - Pastebin.comPastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

@rye

I *think* this is roughly what you were looking for... I'm happy to talk through this or make changes if it's not what you intended (within reason). It's not documented, but I hope the code is clear enough to get the idea across.

I made the entity definitions dataclasses Because Reasons. They might be useful in other contexts or be easier to manipulate this way.

Have a gander!

#Python#DB#JSON

@rye

And oh ya, there's just about 0 error handling. If it breaks, you get to keep both pieces!