DB1 is like a global python dict in the cloud, accessible from everywhere.
Install the client
pip install db1
Upload and retrieve data
from db1 import DB1
# upload anything
DB1['my_key'] = {
"message" : "Hey, I'm using DB1! 🤙",
"temperature" : 21.2421,
"numbers" : [1, 2, 3, "four"]
}
# retrieve anywhere
my_value = DB1['my_key']
View data in browser
Go to db1.io and enter your key, or go directly to https://db1.io/?key=my_key
.
Embed view in Notion
To embed the table above in your Notion page, simply paste the view URL https://db1.io/?key=my_key
anywhere and click “embed”.
DB1 is like a global localStorage in the cloud, accessible from everywhere.
Install the client
npm install db1
Upload and retrieve data
import { db1 } from "db1";
// example data
let myValue = {
message: "Hey, I'm using DB1! 🤙"
temperature: 21.2421,
numbers: [1, 2, 3, "four"]
}
// upload anything
await db1.setItem("my_key", myValue);
// retrieve anywhere
myValue = await db1.getItem("my_key");
View data in browser
Go to db1.io and enter your key, or go directly to https://db1.io/?key=my_key
.
Embed view in Notion
To embed the table above in your Notion page, simply paste the view URL https://db1.io/?key=my_key
anywhere and click “embed”.
Install the client
The CLI is installed alongside the python client.
pip install db1
If you can’t access db1 from the command line after installing the pip package, you may need to add the installed python scripts folder to your PATH.
cho 'export PATH="$PATH:~/.local/bin"' >> ~/.bashrc
source ~/.bashrc
Upload and retrieve data
# upload anything
db1 set my_key '{"in_temp": 21.37, "out_temp": 12.65, "entrance_open": true}'
# retrieve anywhere
db1 get my_key
View data in browser
Go to db1.io and enter your key, or go directly to https://db1.io/?key=my_key
.