CoCalc Public FilesPublic / Specialized.mdOpen with one click!
Authors: ℏal Snyder, William A. Stein
Description: Using the query API call
Compute Environment: Ubuntu 18.04 (Deprecated)

Specific API Calls

In addition to query, there are special-purpose API calls. The complete list appears in the API message reference.

Open Jupyter notebook PYTHON/05-specialized.ipynb to view two examples.

Create a project. Example A creates a project with given title and description if no such project already exists.

Write a text file. Example B creates a directory TEXT in the home directory of the new project and puts a markdown file, sample.md, in that file. If the project is not running when you make the API call, it will be started, but you may get an error of ECONNREFUSED if it does not start fast enough. If that happens, you can re-run the cell or start the project manually.

After you have run Examples A and B successfully, open the test project in your browser and verify that the file is there.

Back Database Queries