paste
This app allows users to upload and share text through posts called “pastes”
(similar to pastebin). Try it out at paste.cs61a.org!
Code Documentation
-
paste.main.
load
(name, skip_auth=False)[source]
Loads the paste text for given name
- Parameters
-
- Returns
a string representing the paste text for this user
-
paste.main.
paste_worker
(data: str, name: Optional[str] = None, is_private: bool = False)[source]
Creates and saves a new entry in the pastes table representing the given
paste data. If name is not provided, generates a random string as name.
- Parameters
data (str) – the paste text
name (str) – name of the given user; None
by default
is_private (bool) – a flag determining whether or not this data is private;
False
by default
- Returns
string representing the name