Skip to content
Sign UpLog In
Profile icon

Oren

@s40
E
GitHub
  • login

    Cover page
    Made with Node.js
    Recent comments (1)
    wolfieboy09
    wolfieboy09
    8 months ago

    ok

Repls
Community
s40
s40
shared a Post
1 year ago
How to get all keys with their values with replitdb
I'm working on something that uses python code and Replitdb to make an api. I have to return all the keys with their values in json for each request,
list
Python
louisau2010
louisau2010
Do you mean this? db.list().then(keys => { let keysFiltered = keys.filter(k => k.match(//i)); // i for case insensitive, remove the i for case sensitive }); (take from https://replit.com/talk/ask/How-to-get-every-replit-database-key-with-a-certain-value/142995)5 months ago
user232
user232
You could do this: keys = db.keys() for i in keys: print(i,":",db[i]) `8 months ago
Bookie0
Bookie0
Loop through all the keys and print their value, then add them to a dict. Like: for i in db: print(i) This would print every key in the database. You can list all the keys with this (check the db tab in the sidebar): Screen Shot 2021-10-12 at 4.22.26 PM 1 year ago
s40
s40
published a Repl
1 year ago
8
Scratch Comment Authentication web
Scratch Comment Authentication webWeb app for scratch comment authentication
asonfrancis
asonfrancis
also foollow me on spotify 8 months ago
asonfrancis
asonfrancis
kon tucky fried chicken in. a pizz a hut 8 months ago
s40
s40
published a Repl
1 year ago
5
Scratch Comment Authentication app
Scratch Comment Authentication appAuthenticates users on https://scratch.mit.edu
s40
s40
published a Repl
1 year ago
0
Scratch Comment Poster
Scratch Comment PosterThis posts a comment on scratch.mit.edu
omoriworksatmcdonalds
omoriworksatmcdonalds
doesn't work.20 days ago
s40
s40
published a Repl
1 year ago
0
Flask test
Flask testA test of flask