generated from libertin/web_app
No description
- Python 100%
| log | ||
| .gitignore | ||
| conf.py | ||
| main.py | ||
| README.md | ||
| requirements.txt | ||
Tinymemo
HTTP API based Text-only memo server.
designed to use in local server at mesh VPN network like Tailscale.
Installation
- Deploy Python venv(
python3 -m venv ./venv). Python 3.11 or above is recommended. - Load venv(
source ./venv). - Install dependencies(
pip3 install -r requirements.txt). - Launch application(
python3 main.py).
Usage
default port is 39000. it can change by editing conf.py.
(): necessary field[]: optional field
get info (/, GET)
{"server_name": "tinymemo", "version": "0.4", "memo_count": 15}
returns server name, version and total memo count.
server name can change by editing conf.py.
listing memos (/list/[page], GET)
{"total_pages": 2, "contents": [{"idx": 10, "content": "123", "created_at": "2025-12-09T14:38:15"}, {"idx": 9, "content": "456", "created_at": "2025-12-09T14:38:09"}, ...]}
lists memos by newest first, paginated. limit can be set from conf.paginate_limit.
it returns page 1 if no parameter provided.
providing page -1 returns last page.
get memo (/(idx), GET)
{"idx": 10, "content": "123", "created_at": "2025-12-09T14:38:15"}
returns a memo with ID provided by URL parameter.
posting memo (/, POST)
posts memo with content in request body in plain text. created_at will be current timestamp by server.
editing memo (/(idx), PATCH)
edit memo with ID provided by URL parameter, and content in request body in plain text.
deleting memo (/(idx), DELETE)
deletes memo with ID provided by URL parameter.
TODO
- implement search feature
- list memos by idx ascending