The files in these examples are read only. To execute the files you will need to copy + paste the code, or download the files and upload them into your workspace.
Example of how to use AppDB in a Jupyter Notebook
- exampleAppDB.ipynb - A Jupyter notebook with a simple example of using appDB in a notebook
- When creating or updating a workspace choose the optional step "AppDB Collections"
- Select the button "Add Collection"
- Choose a collection
Optionally, give the collection a different alias
- Click "Save Workspace" to apply your collection(s)
- Start your workspace
- Create a new notebook (or update an existing notebook)
- On the left navigation there is an appDB icon
- Use this to view the appDB collections you have configured for the workspace
- Optionally double-click on the collection alias to pre-populate starting code to use the collection. Skip step 4
- Import the domojupyter asset
import domojupyter.app_db as app_db
- Get list of documents
app_db.get_documents('collection_name', offset:number, limit:number)
- Get document by id
app_db.get_document('collection_name', document_id)
- Update a document
app_db.update_document('collection_name', document)
- Update a list of documents
app_db.update_documents('collection_name', documents)
- Delete document by id
app_db.delete_document('collection_name', document_id)
- Delete a list of documents
app_db.delete_documents('collection_name', documentIdsToDelete)
- Create a document
app_db.create_document('collection_name', newDocument)
- Create a list of documents
app_db.create_documents('collection_name', newDocuments)