Metadata-Version: 2.4
Name: grabmymemos
Version: 26.9.0
Summary: A minimal Python wrapper for the Memos API, providing simple read-only access to your notes.
License: Free for personal use, license required for commercial use
License-File: LICENSE
Author: Francesco Maida
Author-email: francesco.maida@gmail.com
Requires-Python: >=3.12,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Requires-Dist: requests (>=2.33.1,<3.0.0)
Description-Content-Type: text/markdown

# GrabMyMemos

A minimal Python wrapper for the Memos API, providing simple read-only access to your notes.

Requires Memos **0.31** or newer (Spaces support).

## Usage

```python
from pathlib import Path
import grabmymemos as gmm

gmm.config(base_url="https://memos.example.com",
           token=Path.home() / ".config" / "grabmymemos" / "memos.token",
           space="Blog")

memos = gmm.fetch_all()            # every PUBLIC memo of the "Blog" space
latest = gmm.fetch(limit=6)        # paginated: call again for the next page
tagged = gmm.fetch_all(tags=["travel", "photo"])
```

### Spaces

`space` is required. It can be:

- a Space title (case-insensitive), a Space uid, or a resource name such as `spaces/abc123`;
- a list of those, for example `space=["Blog", "Photos"]`, which merges the memos of all the listed Spaces;
- `"*"`, which fetches memos from every Space (no Space filter).

The token owner must be an active member of each Space named in `space`, otherwise Memos rejects the request.

### Visibility

By default only `PUBLIC` memos are fetched. You can include other visibilities:

```python
gmm.config(..., space="Blog", visibility=["PUBLIC", "SPACE"])
```

Allowed values are `PUBLIC`, `PROTECTED`, `PRIVATE` and `SPACE`.

### Returned fields

Each memo is a `dict` with `name`, `display_time`, `create_time`, `update_time`, `title`, `content`,
`attachments`, `image`, `tags`, `space` and `url`.
Memos 0.31 removed `displayTime`, so `display_time` equals `create_time` on those servers.

