The item key is the unique identifier that
first character is alphanumeric
all characters are alphanumerics, dashes and underscores
max 100 characters
min 1 character
Example of allowed keys
DB1 serializes item values and stores them as binary blobs. The serializer can encode most common data types and nested data structures. For a complete list, see tables below.
| Description | Python Type | JavaScript Type | CLI Format |
|---|---|---|---|
| A signed integer type. | int |
number |
✅ |
| A floating point number type. | float |
number |
✅ |
| A string type. | str |
string |
✅ |
| A boolean type. | bool |
boolean |
NA |
| A bytes (binary data) type. | bytes |
Uint8Array |
NA |
| A multi-dimensional array, typically used for numerical computations. | np.ndarray |
ndarray |
NA |
| A table-like data structure, typically used for data analysis and manipulation. | pd.DataFrame |
Table |
NA |
| Description | Python Type | JavaScript Type | CLI Format |
|---|---|---|---|
| A list type, which is an ordered collection of objects. The elements can be any of the supported types. | list |
Array |
JSON |
| A map type, which is an unordered collection of key-value pairs, where keys are strings and values are any of the supported types. | Dict |
Object |
JSON |
db1.set_item(key, 'Hello, World!')
db1.set_item(key, {
'pandas_df' : pd.read_csv('./report.csv'),
'numpy_array' : np.ones(10),
'a boolean' : True,
'a list' : [1, 2, 3, 'four', np.array(5), {'num': 6}],
'img' : cv2.imread('./image.jpg') # Can be viewed in browser/Notion!
})