# Python package

New to OnlyWorlds? [Your first hour](/docs/getting-started/first-hour) reads a world, writes to the practice world and deletes again, in one short page. This page covers the whole package.

`onlyworlds` is the Python package for OnlyWorlds. It reads and writes the world folder format, pushes a folder's changes to a world, and has a client for the REST API v2. It needs Python 3.12 or later and has no runtime dependencies.

The element types and the kind of every field are generated from [schema-dist](https://github.com/OnlyWorlds/schema-dist), never listed by hand. The package's version is its own and does not track the schema's.

## Install

```bash
pip install onlyworlds
```

Releases are on PyPI, each listed in the [changelog](https://github.com/OnlyWorlds/python-sdk/blob/main/CHANGELOG.md). Until 1.0, the interface can still change between minor versions.

## Read a world

```python
from onlyworlds import Client

client = Client("0000000001")  # the public demo key for Moppetopia; your own world's ow_r_ key works the same, no PIN
for character in client.iter_elements("character"):
    print(character["name"])
```

This runs as written. A write key also takes a PIN: `Client(key, pin)`. The PIN is a 4-digit number (1000 to 9999) set on your account in account settings, and it guards writes to every world you own. A member writes with their own account PIN, and an AI seat sends its seat secret (`ow_s_…`) as the PIN. The client sends it only where the server checks it (since 0.27.0): on writes, on `me()`, and on every call with a 10-digit legacy key; a prefixed key's reads go without it.

Elements are plain dicts. Two demo keys read public sample worlds: `0000000000` (Hyperion) and `0000000001` (Moppetopia). `client.search("Fluffington", limit=200)` finds the elements whose name or text holds every word you give ([Search](/docs/development/api/reads#search)).

`client.get_world()["counts"]` says how many elements the key may read, in all and per type: `{"total": …, "types": {"character": …, "location": …}}`. `client.get("character", element_id)` reads one element. To keep a whole world as files, `export_world("moppetopia", api_key="0000000001")` writes it as a folder (one that does not exist yet), and `read_folder("moppetopia")` reads it back; both are imported from `onlyworlds`.

## Write

The example reads the write key and PIN from the environment. These two are the [practice world](/docs/getting-started/keys#the-practice-world)'s, which anyone may write to and which goes back to the same copy every night; for your own world, put in its `ow_w_` key and your PIN.

```bash
export OW_API_KEY=ow_w_QRRMlAFPF9vPZSqmiV6QJm2HDJH_sP28x2RccPmYP1A
export OW_API_PIN=1234
```

```python
import os
from onlyworlds import Client

# the write key and its PIN from the environment (OW_API_KEY, OW_API_PIN), never in the code
writer = Client(os.environ["OW_API_KEY"], os.environ["OW_API_PIN"])

ranger = writer.create("character", {"name": "Ilse the Ranger"})
peak = writer.create("location", {"name": "Dragon Peak"})
writer.patch("location", peak["id"], {"supertype": "Mountain"})

# add or remove links on a multi-link field without replacing the list
writer.edit_links("location", peak["id"], "founders", add=[ranger["id"]])

# read one back, then delete it
print(writer.get("character", ranger["id"])["name"])
writer.delete("character", ranger["id"])
```

`delete` removes the element and takes its id out of every link to it. A read of it afterwards raises `ApiError` with `status` 410 and `code` `"gone"`, not a 404.

A body the client will not send raises before anything is sent, and is never retried: `TypeError` for a value JSON cannot hold (since 0.158.1), and `ValueError` for a number that is not finite, named with its place (since 0.158.2), or a body nested more than 256 levels deep, which the server does not read (since 0.158.3).

`create` gives an element without an `id` one, and always sends an `Idempotency-Key`. So retrying a create after a lost answer is safe: it replays the stored result instead of making a second element. `patch` replaces every field it sends, and a list replaces the whole list. Use `edit_links` to add or remove links. `bulk` takes up to about 1,000 `{"type", "element"}` items: it succeeds partly by default (check each slot's `status`), or all or nothing with `atomic=True`.

Since 0.43.0 `create`, `upsert` and `bulk` send `hidden` as the element carries it, so an element hidden in a folder is [created hidden](/docs/development/api/hidden#creating-an-element-hidden) from its first moment. Before, they stripped it and such an element was created visible: a behaviour change. Only the owner's keys and a co-builder's may send `true`; any other key gets a 403 `hidden_not_allowed` (`ApiError.is_hidden_not_allowed`; in `bulk`, that slot's 403) and nothing is created. An update never sends it: `patch`, `propose` and `push` strip it as before.

If your script is an AI agent, say so: `Client("ow_w_...", "1234", agent=True)` (since 0.3.0) sends `X-OW-Agent` on its element writes, and OnlyWorlds records your writes as an AI's. A tool people use leaves it off. Each element read carries `changed_by` and `changed_via`, the last write's member and door (`seat`, `mcp` and `declared` are the doors marked as an AI's). See [Agents](/docs/development/agents).

Name your tool: `Client("ow_w_...", "1234", client="atlas")` (since 0.21.0) sends `X-OW-Client` on every element write (and on a proposal, its accept and a review), never on a read or another write, and OnlyWorlds keeps the name on the element as `changed_client` ([a write can name its client](/docs/development/api/writes#agent-writes)). The default is `python`; a name outside lower case letters, digits and hyphens, 1 to 32 characters, is a `ValueError` at construction. `changed_client` and a tombstone's `deleted_client` are read-only and never pushed.

## A world as a folder

`export_world` saves the world a key reads as a [world folder](/docs/schema/folders), one JSON file per element. `push` sends back what you changed: it compares the folder with a baseline, an untouched copy of the same export, and patches only the fields that differ. With the practice world's key and PIN in the environment, as above:

```python
import json
import os
import shutil
from pathlib import Path

from onlyworlds import Client, export_world, push

key, pin = os.environ["OW_API_KEY"], os.environ["OW_API_PIN"]

# save the world as a folder, and keep an untouched copy beside it: the baseline
export_world("world", api_key=key, pin=pin)
shutil.copytree("world", "baseline")

# change one field in one element's file
path = sorted(Path("world/elements/character").glob("*.json"))[0]
element = json.loads(path.read_text(encoding="utf-8"))
element["description"] = "Edited on disk."
path.write_text(json.dumps(element, indent=2, ensure_ascii=False) + "\n", encoding="utf-8", newline="\n")

# send what differs from the baseline: one PATCH carrying one field
result = push("baseline", "world", api_key=key, pin=pin, log_path="push.log")
print(result.planned, "planned,", result.ok, "sent")

print(Client(key, pin).get("character", element["id"])["description"])
```

It prints `1 planned, 1 sent` and then `Edited on disk.` `export_world` writes only to a folder that does not exist yet, and a read-only key such as the demo key `0000000001` exports without a PIN. `log_path` is required: the log is what lets a rerun skip what already landed. A push creates and deletes nothing; what it does with a new file, an empty field or a hidden element is under [Push](#what-it-covers) below.

## Follow changes

```python
walk = client.walk_changes(saved_cursor)  # None for everything
for op in walk:
    ...  # op["op"] is "upsert" or "delete"
saved_cursor = walk.cursor  # opaque: persist it, never parse it
```

To poll cheaply, `client.head()` (since 0.22.0) reads `GET /changes?head=true` and answers `{head, cursor, epoch, unchanged}` without reading any element. The poll is conditional: the client keeps the `ETag` of its last `200` and sends it back as `If-None-Match`, so an unmoved head is a `304` keel does not count against your budget, answered as the head it holds with `unchanged=True`; a `409` clears the tag. Walk only when `head` or `epoch` differs from what you last applied, so a walk that failed is walked again on the next tick.

A delete's `op["reason"]` is `deleted`, or `hidden` for an element [hidden](/docs/development/api/hidden#the-feed) from the key: remove it from your copy either way. If the feed refuses a cursor (`is_resync_required` on the error), walk again from the start and keep what your copy holds that the new walk does not name. The error's `resync_reason` says which: `"role"` (your own role or membership moved), keep it; `"view"` (something left your view), drop it. A tool never empties a copy on its own ([What a reset keeps](/docs/development/api/changes#what-a-reset-keeps)). See [Sync with changes](/docs/development/api/changes).

## Export to OKF

Since 0.6.0 a world folder can be exported as a valid [Open Knowledge Format](https://github.com/open-knowledge-format/open-knowledge-format) (OKF) bundle, 0.3 since 0.158.0 (0.2 before), as that spec stands at one pinned commit (`onlyworlds.okf.OKF_COMMIT`). The bundle's root index carries the world's name as its `title` and a one-sentence `description`. It needs the `okf` extra, which adds PyYAML; the rest of the package stays dependency-free.

```bash
pip install "onlyworlds[okf]"
python -m onlyworlds.okf my-world my-world-okf
```

Each element becomes one markdown file: its fields and links in the frontmatter, its text under headings, its links again as markdown links (in-prose `ow://` references included, in every [address](/docs/schema/profiles/addresses) form that names one of the world's elements since 0.74.1: with a moment, a lens, or the world's own id, and since 0.124.0 only a type word that is one of the 22 in lowercase; one to another world stays as written). The World becomes `world.md` (without its `api` block), and there is an index per type and one for the bundle. A [known-of](/docs/schema/folders#known-of-elements) stub keeps `known_of: true` in its frontmatter (since 0.10.2), so it never reads as a whole element. Since 0.43.0 a [hidden](/docs/development/api/hidden) element (any value of `hidden` but absent, `null` and `false`, the test `folder.is_hidden`) is left out unless `--hidden` (`hidden=True` on `build_bundle` or `export_okf`), since a bundle is handed on: no file, no index line, every link to it left out (never a `urn:uuid:`), an in-prose reference reduced to its own label, and the count in `OkfReport.hidden_left_out` and in world.md's `onlyworlds_export` block. Kept, its frontmatter carries `hidden: true` and every link and index line to it says `(hidden)`. A world with no hidden element exports byte for byte as before. The same folder always gives the same bytes, and anything left out is listed in the report (on stderr from the command line). A bundle is a copy to read elsewhere, never a folder to sync: it carries no `change_seq`, no record of who wrote what, and not the world's key.

## Proposed changes

Since 0.26.0 a member can [propose a change](/docs/development/api/proposals) for a keeper to accept instead of writing it, and a world's owner can make every AI seat work that way.

```python
row = client.propose("character", cid, {"reputation": "Feared"}, evidence="Chapter 12", expires=None)
page = client.world_proposals(state="open")              # newest first; keepers see every row, others their own
for p in client.walk_world_proposals(state="open"): ...  # every page
accepted = client.accept_proposal("character", cid, row["id"])   # {"proposal", "element"}: the keeper's own write, one feed row
client.decline_proposal("character", cid, row["id"], reason="not yet")
client.withdraw_proposal("character", cid, row["id"])   # the proposer's
client.review_new_element("character", eid, "accept")   # a seat's new element: accept clears the mark, "decline" deletes it
```

Since 0.35.0 the queue holds two kinds of row, told apart by `kind`: proposals (`"proposal"`, `fields` only what differs, `omitted` what a `PUT` left empty) and a seat's marked new elements (`"new_element"`), settled with `review_new_element`; an unmarked element raises an `ApiError` with `is_not_proposed`. The walker sends `next_cursor` back as it came.

`propose` cleans its fields as `patch` does and always sends an `Idempotency-Key`; `accept_proposal` sends none, as the document declares none. With **AI seats propose, a person accepts** on for the world (`agent_writes_proposed` on `get_world()`, read-only; `patch_world` drops it), an AI seat's `patch`, `upsert` or link edit answers `202` and the client raises `ProposedError` (`err.is_proposed`, `err.proposal`) rather than returning a body that is not the element; a `bulk` slot with `status` 202 stays in the result, listed on `BulkResult.proposed`; `push` counts a 202 as `proposed`, never as pushed, and never files the same proposal twice. An accept that finds a proposed field moved raises `StaleProposal` (409, `.conflicts`, `.current`); the other codes are `is_own_proposal`, `is_proposed_only`, `is_too_many_open` and `is_field_not_visible`. The [doctor](#check-a-world)'s flag 12 reports the queue's open and lapsed rows through the API.

## The Markdown pack

Since 0.25.0 a world can be packed as a few merged Markdown files for an AI notebook that caps its sources: NotebookLM (50 sources a notebook, 500,000 words a source) and Claude Projects (30 MB a file). No extra is needed.

```bash
python -m onlyworlds.pack my-world my-world-pack                     # a world folder
OW_API_KEY=... python -m onlyworlds.pack --api my-world-pack         # an account world; a read key needs no PIN
python -m onlyworlds.pack my-world OUT --rooms --extensions          # keep room elements and x_ fields
python -m onlyworlds.pack my-world OUT --proposed                    # keep unreviewed AI elements, labelled
python -m onlyworlds.pack my-world OUT --hidden                      # keep hidden elements, labelled (0.43.0)
```

`00-world.md` opens with a line saying which kind of key made the pack (since 0.26.1: the owner's, a member's with its role, a Character's view, or the public view; from `/me` or the folder's `exported_as`, no line when neither says, never the key: a pack holds only what its key was served), then holds the world's own fields and an index of every element by type (name, supertype and subtype, the first sentence of the description); then one file per element type present, in schema order, each element a `## Name` section with its id, its fields in schema order as `**Field:**` paragraphs, and every link written as the name and type of the element it points to, so a reader needs no other file to follow it. Prose is escaped so a line inside a field never reads as a heading. A [known-of](/docs/schema/folders#known-of-elements) stub carries one line saying that only the fields shown are known. [Room](/docs/schema/profiles#room) elements are left out unless `--rooms`, and `x_*`, `atlas_*` and `shadow_*` fields unless `--extensions`; the command's sentence counts both. A file past `--words` (400,000) or `--bytes` (25,000,000) splits at element boundaries into numbered parts; when the parts would pass `--files` (50), the smallest adjacent whole files merge into one named by their types; an element larger than a cap is written alone and named, never cut or dropped. Only a pack that cannot meet `--files` exits 1, and every file is still written. The same world gives the same bytes. Beside it: an [OKF bundle](#export-to-okf) is one file per element with frontmatter and links as paths, for a knowledge tool that follows links; the pack is merged prose for a notebook that reads it whole.

A world with its own words for the types (the [names profile](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/names.md), `x_names` in `world.json`) is packed in them, the standard's name in brackets for the AI reading it: `### Employees (Character)`, `*AI agent (Character, Agent) · id …*` (since 0.31.0). File names and links keep the standard's type, and the map itself is never printed among the world's fields.

An element marked proposed that no keeper has settled yet (it carries [`x_review_proposed`](/docs/development/api/proposals) with a value, whoever wrote the mark) is not canon, so since 0.36.0 the pack leaves it out unless you pass `--proposed` (`proposed=True` from Python). `00-world.md`'s opening lines say how many were left out, as "marked proposed and not yet reviewed by a keeper" (since 0.117.1). A kept one is labelled "proposed, not yet reviewed" under its id line, on its index line and on every link to it, and a link to one left out names it with the same label. This is the reader rule for any tool that hands a world on to an AI: an unreviewed element passed on as canon is where a planted instruction would get through.

A [hidden](/docs/development/api/hidden) element is hidden from whoever the world is handed to, never from its holder, and a pack is handed on: since 0.43.0 the pack leaves one out unless you pass `--hidden` (`hidden=True` on `build_pack`, `pack_world`, `pack_folder` and `pack_api`). `00-world.md`'s opening lines count what was left out (`*1 hidden element is left out of this pack.*`), as do `PackReport.hidden_left_out` and the command's line. Unlike a proposed element, one left out is never named: a link to it is left out (`PackReport.hidden_links_left_out`) and an in-prose reference keeps only its own label. A kept one is labelled `hidden` under its id line, on its index line and on every link to it (`Cy (character, hidden)`). A world with no hidden element packs byte for byte as before. `export_world` and `write_folder` copy a world and keep the mark.

## Check a world

The doctor (since 0.11.0) reads a world and reports what its keeper should look at, each finding with the element and the reason. It never writes: no file, no API write; its only product is the report.

```bash
python -m onlyworlds.doctor PATH/TO/WORLD-FOLDER          # a folder
OW_API_KEY=... OW_API_PIN=... python -m onlyworlds.doctor --api   # an account world; a read key needs no PIN
python -m onlyworlds.doctor PATH --json                   # the same report for a tool
python -m onlyworlds.doctor PATH --packet                 # the findings as work packets (0.12.0)
```

What it checks: a link to an element that is not there; an Event ending before it starts; an element with no links in or out; two elements whose names collide once folded (within one type); a known-of stub never filled, and an element with no text in any of its type's text fields (a Law's text is in `declaration` and `purpose`, a Narrative's in `story`, so `description` alone is never read); a charter untouched after many changes (through the API); the world's own house rules (since 0.24.0: the [checks profile](/docs/schema/profiles#checks), `x_checks_rules` on the Charter: each rule's sentence with how many elements it scoped and which fall short, and a rule the doctor cannot apply named as not checked, never passed; only the world's Charter counts: since 0.82.0 the newest marked Charter (the [charter profile](/docs/schema/profiles#charter)), through the API the one keel names in [`front_door`](/docs/development/api/members#the-front-door), and every other marked Charter is reported with its rules not applied; only a keeper sets the mark, so a seat cannot write the rules it is judged by); a world that maps a software ecosystem (since 0.45.0, on a world whose elements carry `x_spine_` keys: each element read under the [spine profile](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/spine.md), an off-list kind, a value the reader left out and a probe off the probe form named, then each row kept by exactly one Seat through the Title's field for the row's own type, every `x_spine_depends_on` id in the world, a `legacy` or `provenance` row named by an Event with supertype `Retirement` in `x_spine_retires` and linked through its typed field where the type has one (a Law by the key alone, since 0.48.0), a row still at `gone`, and no two rows of one type sharing a name once folded; on a projection, a World carrying `x_spine_projection` (its `source` a world's UUID, its `at` an ISO time), only the projection's checks run: `x_spine_owner` on every row and nothing hidden; whether a probe passes is named as not checked); and, on a folder, a stale `format_version` and a key committed in a tracked `world.json`. Each flag says how much it could compare, and a flag that cannot run on that door is listed with its reason, never counted as clean. Findings on messages and room things are listed apart and kept out of the headline count: a message by the [message profile](/docs/schema/profiles), a room element by the room profile's type and supertype pairs (`Work item`, `Report`, `Board` and the like) together with its mark `x_room_of` (since 0.118.0). A room pair without the mark is read as lore by every tool, so a finding on it counts with the rest; a house rule that asks for the mark lists each element made without it. Exit code 0 when clean, 1 with findings, 2 when nothing could be read. The judgement half, re-reading a claim against its source, is a separate recipe that takes the doctor's findings as its targets.

On a folder, the report first names what it could not read as an element (since 0.142.0; `unread` in `--json`, each entry a `file` and a `why`): a file that is not JSON, is not an object or has no `id`, a file whose extension is `.json` in another spelling (`M.JSON`, since 0.145.0), a second file of one id, a directory that is no type's (the type word in lower case, since 0.145.0). Every check ran on the rest, so an element in such a file counts as not there and a link to it is listed as a link to a missing element. Any unread file makes the exit code 1. Three kinds of file are read the same way, on every platform: one holding a value nested more than 200 deep, one holding an integer of more than 4,300 digits, and (since 0.143.0) one holding a number that is not finite, `1e400` or `NaN`.

The lint (since 0.51.0) checks a world folder's shape rather than what it says: a file outside the 22 type folders, a missing or duplicate `id`, a key that is not a field of its type, a value of the wrong shape, a link that does not resolve inside the folder or points at the wrong type.

```bash
python -m onlyworlds.lint PATH/TO/WORLD-FOLDER
```

It is schema-dist's own [folder checker](/docs/schema/folders#rules-for-tools), carried inside the package at its schema pin, so it gives the same report as the dist's command and needs no YAML library or copy of the repository. One line per problem, then the count it checked; exit 0 when clean, 1 with problems, 2 when the folder is not a world folder, 3 when nothing it read has a problem but a file was not read. A file whose JSON Python cannot hold (nested too deep, or a number too long) gets one line saying it was not read, and the check goes on (since 0.152.0). From code, `onlyworlds.lint.lint(folder)` returns the report.

`--packet` (since 0.12.0) prints the same findings as work packets, the `packet` extension profile ([schema-dist `profiles/packet.md`](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/packet.md)): a JSON array of Relations with supertype `Work item` and no `id`, each with one entry per element under `x_packet_elements` (`{type, id, reason}`, in flag order), the same ids on the Relation's typed link fields, `x_packet_source` (`{server, world}`, the server `null` for a folder) and `x_packet_producer` (`onlyworlds doctor` and its version). Empty when clean; split past the extension cap into `(i of n)` packets. Findings on messages and room things, and a finding on the world itself, stay in the report. A tool that lands a packet in a world or a parlor mints its id; the doctor still writes nothing.

## What it covers

- **World folders**: `read_folder` and `write_folder` implement the folder format (v0.3.26 since 0.160.0, `FORMAT_VERSION`; a folder's existing stamp is kept, older stamps read as before). A world's `origin` is carried as given, from `GET /world` or a read `world.json`, and never derived. An export writes the [`producer` line](/docs/schema/folders#worldjson) as the folder's maker (`{"tool": "onlyworlds", "version", "input": "server"}`); a tool that runs the export in its own name passes `producer=` with its own line. A folder written from another folder keeps the line it carries. Since 0.158.5 `write_folder` refuses, before anything is written, an element id that cannot be a file name (empty, holding `/`, `\`, `:` or a control character, or `.` or `..`, and since 0.159.1 one whose `<id>.json` a world file's name check refuses: holding `<`, `>`, `"`, `|`, `?` or `*`, or a Windows device name such as `con`, so a folder it writes always packs); before, such an id with a name that gives no slug could write a file outside the folder. Since 0.158.6 it also refuses two elements of one type whose file names are one name once folded (NFC, then simple case folding: ids such as `Ab1` and `ab1`), which a case-insensitive disk would have kept as one file. Since 0.37.0 `push` sends nothing for an element whose folder copy carries `hidden: true` while the server's does not, and names it in `PushResult.hidden`: the server takes the hidden mark only through its own route, so a patch would edit an element every reader still sees. `patch_world` never sends the folder-only keys (`format_version`, `source`, `exported_as`, `producer`, `writable`, `api`, `snapshot_*`) and pass its shared conformance fixture. Since 0.9.0 a [known-of](/docs/schema/folders#known-of-elements) stub is written without its unset fields (since 0.10.0 with every field it was served with a value, such as a Character's public fields; `PUBLIC_FIELDS` lists them per type), flagged on read (`folder.known_of`, `is_known_of`), never pushed (`PushPlan.known_of` lists it), and refused by the client's writes before anything is sent. The reader never changes a folder. It skips a file that is not JSON, not an object or has no `id`, and since 0.5.1 a dot-prefixed file in a type folder (a tool's litter, not an element); `folder.skipped` lists each with the reason. An element found in both the current `elements/` layout and Atlas's older `spatial/` one is served from `elements/`, and `folder.in_both_layouts` lists it (since 0.5.0).
- **Archives** (since 0.17.0): `read_world_file(path_or_bytes)` opens a `.owworld` file as the [folder format](/docs/schema/folders#folders-and-onlyworldscom)'s archive rules say (the directory checked before anything is inflated; a refusal is `WorldFileError` with `reason` one of the thirteen causes, under the same names as the TypeScript SDK's, and since 0.156.0 a `not_a_world` whose `world.json` is there but cannot be read carries `world_fault`, `too_deep`, `not_json` or `number_out_of_range`; since 0.45.1 two names that are one after NFC and simple case folding are compared at Unicode 15.1, built from Unicode's own files rather than the interpreter's, and the NFC is exported as `onlyworlds.worldfile.nfc`) and `.to_folder(dest)` writes it out as a folder; `write_world_file(folder, path, top_dir=None, private_dir=None)` and `world_file_bytes(folder)` write one: the `mimetype` marker first and stored, every entry stamped 1980-01-01 in UTF-8 byte order, only `world.json`, `elements/`, `spatial/`, `media/`, `records/` and the one dot-folder named in `private_dir`, the same folder giving the same bytes (within one zlib build). From 0.32.0 the records a producer marks `"private": true` in `records/RECORDS.json` stay home: left out whole, `RECORDS.json` kept as it is, unless `include_private_records=True`; a manifest it cannot read raises `ValueError` unless you pass that ([private records](/docs/schema/folders#folders-and-onlyworldscom)). From 0.43.0 both take `include_hidden=True`: a world file is a copy, and a [hidden](/docs/development/api/hidden) element's file travels byte for byte. For a file made to hand to someone else, `include_hidden=False` leaves every element file (one directly in a type folder of `elements/` or `spatial/`, since 0.90.1 only those) whose JSON object carries the mark out whole, nothing else rewritten (a link to it keeps the id, which dangles); a list passed as `hidden_left_out=` receives the left-out files' paths, sorted, so its length is the count. From 0.90.0 a world file leaves out who wrote each element: `created_by`, `changed_by`, `changed_via`, `changed_client` and `doors` leave every element file that holds them, which is written in the folder's own form (two-space indent, a trailing newline, its other keys in their order); `include_author_fields=True` writes every file byte for byte, for an archive of your own world. From 0.145.0 a share carries a file under `elements/` or `spatial/` only when the package's folder reader (`read_folder`) serves it as an element and it holds no mark. Every other file there is left out as well, since its mark cannot be told, and a second list passed as `unread_left_out=` receives those paths: a file that is not UTF-8 JSON (a write cut short, or text after the one JSON value), is nested more than 200 deep, holds a number that is not finite, is not an object or has no `id`; a file with another extension (`notes.txt`, `M.JSON`), deeper than a type folder (a hidden element's file moved into `old/` by hand), directly under `elements/` or in a folder that is no type; and both files of an id that two files hold, since which of the two marks is the element's cannot be said. A copy carries every such file, byte for byte except for the author fields: from 0.150.1 a file there that is one JSON object by the reader's own JSON rules loses them like any element file (0.145.0 to 0.150.0 kept them; upgrade if you hand world files on), and one that is no such object travels with whatever its text holds. From 0.150.2 a file holding an integer no double holds (`9007199254740993`), or one too large for a double, travels byte for byte too, its author fields with it, as the npm SDK does. `read_folder` reads names as written from the same version: `.json` and the type folder's name in lower case. From 0.151.0 it reads `world.json`, `elements/` and `spatial/` exactly so too (a disk that ignores case had opened `Elements/` as `elements/`), and a folder holding one of them only in another case raises `FolderNameCaseError` (a `ValueError` with `found` and `wanted`) instead of reading as a world with none; a world file holding them so is refused with the reason `name_case`. (0.144.0 left out only a file in a type folder that it could not parse; earlier versions carried a file that was no JSON into a share, 0.142.0 also one nested past 200, and 0.143.0 refused the write. Upgrade if you share world files from folders you did not write.) The package's own test runs the conformance set from its schema pin; the directory it writes matches the TypeScript writer's entry for entry.
- **Import from other apps**: importers for Campfire, Kanka, LegendKeeper, Notion and World Anvil read each app's export into a world folder (LegendKeeper's also through its API), as `python -m onlyworlds.<app>` or from Python as `import_campfire`, `import_kanka`, `import_legendkeeper`, `import_notion` and `import_worldanvil`. Each has its own section on [Import from other apps](/docs/development/python-import).
- **The calendar profile** (since 0.68.0): `onlyworlds.calendar` reads a world's own calendars as the [calendar profile](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/calendar.md) defines them. `read_calendar_value(raw)` reads an `atlas_calendar` value (an object, or the same object as a JSON string) and gives `None` for anything the profile refuses; `world_calendars(elements)` finds every calendar in a world by the field. `speaking_calendar(world, elements)` (since 0.153.0) gives the calendar the World names in `x_calendar`, or the world's only calendar when it names none; a name that is not a calendar among the elements gives `None`. `resolve_calendar` takes a person's own pick instead (named `resolve_calendar_lens` before 0.69.0; the old name still answers, with a deprecation warning). `breakdown_step(cfg, step)` and `format_step(cfg, step)` turn an integer step into the calendar's date (months, days outside the months, weekdays, eras, and version 2's leap exceptions and offset); for a page of dates in one calendar, `format_steps(cfg, steps)` (since 0.149.0) gives the same words as `format_step` for each step with the calendar's own work done once, about six times faster on 200 dates in a calendar of 64 eras. `parse_date(cfg, text)` reads written words back to a step; since 0.158.4 a weekday written beside a whole date too, and a weekday that is not that date's own is refused, naming both (`that date falls on 4th, not 3rd`). Since 0.156.0 (schema-dist serial 149) the reader holds the profile's size bounds, as the TypeScript SDK's does: a calendar past one, or with a year longer than 2^53 - 1, is `None`, and a date past the exact range is shown as its plain number, `breakdown_step` keeping the step with every other part `None`. It is the [TypeScript SDK](/docs/development/typescript)'s calendar reader under snake_case names, gives the same answers (both replay the profile's fixture, and the two were compared on 175,705 inputs before the release), and reads the calendars the LegendKeeper door writes.
- **The lens profile** (since 0.74.0): `resolve_lens(world, lens, reader, as_of=, clock=)` reads a world through a lens for one reader (the kept elements in order, the cut by reason, the mail part), with `is_lens`, `is_template` and `lenses_in_use`, as [Lenses](/docs/lenses) describes. Since 0.77.0, `world_graph(world, reader, *, lens=None, as_of=None, clock=None, rooms=False, hidden=False, proposed=False, map_space=False, reading_aids=False)` (`reading_aids` since 0.103.0: the charter, its guide and its domains back in a graph without a lens, each marked `reading_aid`) reads the same snapshot as nodes and edges, with `edges_cut` counting by reason the links it leaves out; a refused flag raises `ValueError` naming it. Since 0.78.0, `degree_of(graph)` gives each node's count of edges, in or out: rank by it for "most linked". Since 0.79.0, `DATE_FIELD` is the profile's date table and `date_of(el)` an element's date as that table reads it (the whole number in its type's date field, else `None`), so a timeline dates elements exactly as the lens's fence does. Since 0.82.0 a lens's rows for a reader below the owner are the bodies the API serves that reader, the owner's the bodies as stored; since 0.82.1 a contributor's or a guest's row keeps a link to a proposed element it sees, and a lens's note keyed to one, the public rung loses both, and no row carries a stored `x_served_trimmed`. Since 0.136.0 a reader's rung may also be `co-builder` (the whole world as the owner reads it, without the owner's cut counts), and a contributor's view holds the hidden elements it made, listed in `whole`, as [the TypeScript SDK's rungs](/docs/development/typescript-readers#what-every-reader-takes) say.
- **The address profile** (since 0.73.0): `parse_ow_link(text)` reads an element's link in any of the three spellings, with its moment and lens, and `element_address(address)` writes one; a refused string raises `AddressError` with the profile's `reason`, as [Addresses](/docs/schema/profiles/addresses) describes. Since 0.122.0 `read_ow_link_at(text, index=0)` finds an [address in prose](/docs/schema/profiles/addresses#an-address-in-prose): the address that starts at `index`, as an `AddressAt` (`reading`, and `end`, the index just past it), or `None` when none starts there (since 0.125.0 also when it would begin inside a word); what follows it is prose, a full stop included. Since 0.125.0 `find_ow_links(text)` finds every address in a text, in order, each an `AddressFound` (`start`, `end`, `reading`). Since 0.86.0 `openers_for(tools, kind, address, surface)` gives an Open with menu's rows (onlyworlds.com, then each listed tool with a door for it, each with its state word), the same rows as the TypeScript SDK's `openersFor`, and `TOOLS` is the tools list baked at the release; since 0.96.0 the surface takes `online`, and with `False` every row whose link is a web address says "Needs a connection"; since 0.99.0 a surface whose `tool` is `onlyworlds` (the site itself) gets its own row as "You are here"; since 0.101.0 `element=` takes the element as served, and a tool whose element door does not open what it carries (the list's `element_skips`, read as `world_graph` reads it) has no row; since 0.106.0 a tool whose `element_types` leaves out the element's type (read from the address) has no row on that element's menu, its world door included; since 0.105.0 the `public` audience gets each tool that needs an account as a row that says "Needs an account", and since 0.107.0 a row that opens there when its `open.opens_public` is true. Since 0.87.0 `doors_of(element, tools=TOOLS)` reads an element's door history (its `doors`, served to a world's members): which tools wrote it, newest first, each `{door, at, tool, last, from}`, the same entries as the TypeScript SDK's `doorsOf`. Since 0.89.0 `door_where(door)` gives one entry's where in the same words as `doorWhere` (`in Atlas`, `on onlyworlds.com`, `with an AI`, `by OnlyWorlds`, else `in code`).
- **Names in prose** (since 0.141.0): `name_finder(elements, case="exact")` reads a world's element names once and answers `find(text)`, which lists every `NameFound` (`start`, `end`, `element`) in order, `element` being the mapping you passed in. It finds and never writes. `case` must be given, `"exact"` or `"folded"`; `names` gives the names an element is found by, by default its `name` alone. A whole name only (the character on each side is not a letter, a combining mark, a decimal digit or an underscore), three characters at least, the longest where several start at one place; a name two elements share is never answered, and `find.shared` (since 0.147.0) lists those names, each a `NameShared` (`name`, `elements`); nothing inside an address, a Markdown link, a bare web address or an autolink is read, and with `find(text, markdown=True)` (since 0.154.0), for a text known to be Markdown, nothing inside an inline code span, a fenced code block, an HTML tag or comment, or a reference definition's line either. Since 0.147.0 the work for one text grows with its length alone, whatever the names. The same rule and the same file of cases as the TypeScript SDK's [`nameFinder`](/docs/development/typescript-readers#names-in-prose), which lists its limits; `start` and `end` count code points here.
- **The message profile** (since 0.63.0): `is_message`, `recipients_of`, `is_addressed_to` (an empty `characters` is every member), `is_to_everyone` (since 0.64.0), `is_sent_by`, `sender_status(message, members)` (`verified`, `mismatch` or `unverifiable`, from `created_by` and the members list), `read_mark_of` (a reader's `Read` Relation, in their own hand only; `None` with `keyless=True` since 0.95.0), `unread_for` and `thread_of`, as [Messages between members](/docs/schema/profiles/messages) describes. Since 0.72.0 (serial 76): a list the server trimmed for its reader (`has_unseen_recipients`, the sender status `unseen`, `keyless=True` for a body read with no key), `edited_by`, and Notes (`is_note`, `note_of`), each the npm SDK's rule; `push` never sends the served-only mark.
- **The report profile** (since 0.120.0): `report_threads_of(narratives)` groups the reports among the Narratives you give it by the `parent_narrative` they name, read as written (rule 9): `parents` (what each report's parent is: `none`, `report`, `board`, `missing`, `other` or `self`), `groups` (a thread under its first report, or a closed talk's reports under their board entry, by `created_at`) and `lints` (`chain`, `self`). Give it the board entries too, or a closed talk's parent reads `missing`; only a Narrative with the pair and the room's mark is a report or a board entry. A list read with `expand=parent_narrative` serves the parent as an object, which reads as no parent: give it the reports with the id.
- **A report's lines** (since 0.128.0): `read_report_lines(text, world=world_id)` splits a report's `consequences` and reads each line as the report profile says, each a `ReportLine`: `words` (what to show), `address` (the element the line names, `ow://<type>/<id>`, or None), `reading`, `start` and `end`; `read_report_line(line, world=...)` reads one. It is the TypeScript SDK's [`readReportLines`](/docs/development/typescript-readers#report-lines) reading, held to one table in both.
- **The review profile** (since 0.66.0): `proposed_mark_of(element, today=None)` gives an element's [proposed](/docs/development/api/proposals) mark as a viewer shows it, `{"by", "expires", "lapsed"}`, or `None` for a settled element (no mark, `None`, or a value that is not an object); `by` is the mark's own word, read as stored and never trimmed since 0.117.0 (`None` when it is not a string or is whitespace alone), to be shown as [the review profile](/docs/schema/profiles#review) says, as the mark's word and never as a fact; `lapsed` is true from the `expires` day on, in UTC as onlyworlds.com reads it. `hands_on_as_proposed(element)` is what a reader that hands a world on leaves out: the mark with any value but `None`, so a malformed value is left out too. The Markdown pack reads the same function.
- **The room profile** (since 0.20.0): `ROOM_PAIRS` lists the ten `(type, supertype)` pairs a world's chat room (a parlor) and its working layer keep as elements (the ninth, Take, since 0.52.0; the tenth, Report, since 0.112.0), and `is_room_element(element)` is true when a body or a `FolderElement` matches one (trimmed, case-blind) and carries a non-empty `x_room_of`, the id of the world or workshop session the room belongs to (since 0.124.0 an empty list or an empty object is no mark). A pair without the mark is lore, so a novel's Message Narratives stay in view; a lore view leaves room elements out unless the person asks. The [room profile](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/room.md), schema-dist serial 45.
- **Talks** (since 0.135.0, serial 135): `talks_of(element)` answers the talks on an Object or a Construct that a line in the room is in, each `{type, id}` from its `objects` and `constructs` (each id as written; a Message without the mark, a board entry and a report are in none), and `report_talks_of(narrative)` the talks a report is shown with, read the same way. The [room profile](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/room.md) and the [report profile](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/report.md).
- **The reading aids** (since 0.80.0): `is_charter_element(element)` is true for the world's Charter (a Law, supertype `Charter`), its Guide or one of its Domains (Constructs, supertype `Guide` or `Domain`), matched as a room pair is and carrying the mark `x_charter_of`; the pair without the mark is lore. A tool's front door shows them first and its lore views leave them out; `resolve_lens` keeps one only when `types` names its pair or the lens anchors it, and `world_graph` without a lens leaves them out as `reading_aid`. Since 0.82.0 the mark is read by its presence (any value but `None`, a string only when something is left after trimming, and since 0.124.0 an empty list or an empty object is no mark), and `charter_of(world, reader)` returns what a front door shows first, `{charter, guide, domains}`, as that reader sees them (since 0.133.0 each carries `type`, `law` on the Charter and `construct` on the Guide and each Domain, and a Domain's hub is an element of the kind its field links to); `domains_of(world, reader)` returns the Domains alone; the doctor reads the marked Charter, and its flag 14 names a Guide or Domain entry that points at a hidden or deleted element. The [charter profile](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/charter.md), schema-dist serial 83. Since 0.82.0 a lens's rows for a reader below the owner are the bodies the API serves that reader. Since 0.83.0 `reading_aid_of(element)` answers which aid an element's type and supertype make it, `"charter"`, `"guide"`, `"domain"` or `None`, with the mark ignored: what a tool offers to mark it as. Since 0.135.0 `design_parts_of(world, reader)` answers the design parts that reader reads (serial 135), each `{type, id, state}`: an Object or a Construct served whole whose `subtype`, trimmed and in any case, is `in design` or `locked`, only where `charter_of` finds a Charter for the same reader, else `[]`.
- **The strand profile** (since 0.97.0): `strand_of(world, reader)` reads a world's [strand](/docs/schema/profiles#strand), the story its `x_strand` names in miniature, as one reader sees it: `{narrative, event, location, character, now, same}`, each filled slot `{id, type, name}` (`type`, since 0.133.0, the kind the slot holds: `narrative`, `event`, `location` or `character`, and `location` for `now`) and an empty one `None`, the hero from the story's `protagonist` and now from the hero's `location`, `same` whether then and now are one place. The world and the reader are `resolve_lens`'s, so a slot the reader cannot see stays empty; only the story is required since 0.98.0 (`event` and `location` `None` or absent read as unset), and any other shape is no mark. `STRAND_FIELD` is the mark's name. The server serves the same reading at the front door, `me()["reading_aids"]["strand"]` (since 2026-10-31).
- **The record profile** (since 0.100.0): `records_of(character_id, elements)` reads one Character's [records](/docs/schema/profiles#record), the game runs they took part in, newest first: each an Event whose `x_record` names the game (`tool`) and when it was played (`played_at`), as `{event, tool, played_at, version, seed, outcome, seat, stories}`, `stories` being the Narratives that list the run and name them as `protagonist`, `narrator` or `both`. Who took part is the Event's `characters`; a run or a story still proposed is not read (since 0.102.0 exactly what `proposed_mark_of` reads as proposed, so one with an empty mark, `{}`, `""` or `[]`, is settled and read), and an Event or a Narrative whose `id` is not a string is never read. `record_mark_of(element)` reads one Event's mark, or `None`; `RECORD_FIELD` is the mark's name. Since 0.122.0 `played_at` is read by the message profile's time grammar: a lower-case `t` and `z`, an offset and no zone read, and a time without its seconds is no record. The npm SDK's `recordsOf` gives the same answers.
- **The landing profile** (since 0.102.0): `landing_of(graph, *, heads=None, hops=None, size=None)` reads what `world_graph` answered as a world's first picture at a door ([the landing](/docs/schema/profiles#landing)). It returns `{mode, size, clusters, unclustered, gaps}`: the most-linked Characters with at least one link (at most `heads`, 5 by default), each with the nodes within `hops` steps (1 by default) that are nearest to it, a tie going to the higher-ranked head; the rest unclustered; the gaps (`orphan`, `near_orphan`, `no_place`, `nobody_here`); and `mode`, `gaps` under `size` nodes (24 by default), else `graph`. An option that is not a whole number of 1 or more raises `ValueError` naming it. It returns structure only, never coordinates. Any door may serve the answer, keyless or signed in, each read from the graph that door's reader is served; a key beside the five (keel's `baked`, its `lenses`) is the door's own and outside the profile, so a reader reads the five and passes the rest through. The npm SDK's `landingOf` answers the same.
- **The most linked** (since 0.150.0): `most_linked_of(graph, *, per_type=None)` lists the most linked elements of each type in what `world_graph` answered, as `{"per_type", "by_type"}`: for each type, at most `per_type` (3 by default) of its elements as `{"id", "name", "degree"}`, most linked first by [the landing](/docs/schema/profiles#landing)'s degree, ties by id in code point order, the types in code point order and a type with nothing to pick left out. An element with no link and a guest's known-of element are never picked; the name is the graph's, or `None`. It counts only what the graph holds, so hidden, proposed and room elements and map space stay out unless the graph brought them in. Use it as "the most linked", not as "where to start": a world's secret is often its hub, and where a world has a Guide, the Guide is where a reader starts. A draft reading, held to the package's own `tests/fixtures/most-linked.fixture.json` (the same bytes as the TypeScript SDK's, whose [`mostLinkedOf`](/docs/development/typescript-readers#the-most-linked) gives the same answer) until the landing profile takes it. A `per_type` that is not a whole number of 1 or more raises `ValueError` naming it.
- **The map-space profile** (since 0.104.0): `map_space(elements)` reads a world's Maps, Zones, Markers and Pins as the [map-space profile](/docs/schema/profiles#map-space) defines, from the elements as the reader is served them. It returns `{maps, zones, pins, out}`: each Map's frame (`width`, `height`, `depth`, `z_max`, `scale` in metres per pixel from `x_metres_per_pixel`, `location`, `parent_map`; a missing `width` or `height` is measured from the Map's own placed points, with `extent: "points"`), one outline per Map a Zone has Markers on (its points in `order`, then by id, with `shape` `polygon` or `line`), each Pin's point with its element as `element_type` and `element_id`, and `out`, what the reading left aside counted by `no_point`, `no_markers`, `dangling` and `no_map`, a reason with nothing counted absent. `z` is an elevation, never a height. A number counts when it is whole by value (`2.0` reads as 2; a boolean or a fraction is no point), and a row without an id is ignored; since 0.104.1 (serial 106) two rows of one type with one id read as the last one served. Types `MapSpace`, `MapSpaceMap`, `MapSpaceOutline` and `MapSpacePin`. The npm SDK's `mapSpace` answers the same.
- **The layout of a map** (since 0.110.0): `layout_of(map, maps, pins)` answers `{"layout", "ground", "hand"}` from a Map's `x_layout` and its Pins' `x_hand`, the TypeScript SDK's [`layoutOf`](/docs/development/typescript-readers#the-layout-of-a-map) with the same answer: the method or `None`, the served ground Map's id or `None`, and the ids of the Pins a new lay-out keeps (`x_hand` exactly `True`, never `1`; every Pin of a `"hand"` board), in code point order.
- **A child Map on its parent** (since 0.137.0): `carry_of(map, point, maps)` carries a point on a Map up its `parent_map` chain by each level's `x_parent_frame`, the TypeScript SDK's [`carryOf`](/docs/development/typescript-readers#a-child-map-on-its-parent) with the same answer: `{"parent_frame", "lint", "points", "stop"}`, every point in 64-bit floats.
- **The Pins one viewer knows** (since 0.148.0): `pins_known_to(pins, served)` answers which of a map's Pins place an element that is among `served`, the elements as one viewer was served them, the TypeScript SDK's [`pinsKnownTo`](/docs/development/typescript-readers#the-pins-one-viewer-knows) with the same answer: `{"known", "unknown", "out"}`, each known Pin with `how` as `"whole"` or `"known_of"`, the rest a count. It reads nothing but its two lists (a list or a tuple each), so a map drawn as one Character sees it cannot show more than the world told that viewer. Types `PinsKnownTo` and `PinKnown`.
- **A world's default picture** (since 0.127.0): `layout_by_kind(graph)` and `layout_around(graph, focus, steps=1)`, the TypeScript SDK's [`layoutByKind` and `layoutAround`](/docs/development/typescript-readers#a-worlds-default-picture), the same points to the bit. Since 0.129.0, `unplaced_by_kind(graph, placed)` and `unplaced_around(graph, focus, placed, steps=1)` answer the ids a saved layout Map has no Pin for, the same lists as the SDK's; the methods and that reading are the standard's [default layouts profile](/docs/schema/profiles#default-layouts), whose fixture both packages replay.
- **A world laid out in 3D** (since 0.130.0): `layout_by_links_3d(graph, elements=None, *, held=None, held_unit=None)`, the TypeScript SDK's [`layoutByLinks3d`](/docs/development/typescript-readers#a-world-laid-out-in-3d) with the same answer: the same points to the bit for a centre, a grouped element and a pinned one off the ring, within a billionth of a rest for the rest. `points` is one flat list, x, y, z a placed node. Since 0.136.0 every piece of linked elements is laid out, the pieces beside the main one on a ring round it, and an element linked to no other and pinned on no map is answered in `unplaced` instead of placed on a shelf; `BY_LINKS_3D_VERSION` (2) says when a release moved the points, as the TypeScript SDK's does. It is plain Python, so a world of several thousand elements takes minutes. `unplaced_by_links_3d(graph, placed)` (since 0.131.0) answers what a saved `by-links-3d` layout map does not place, as `unplacedByLinks3d` does.
- **A layout along a route** (since 0.108.0): `trail_by_place(input)` lays a world out along a route on a ground map, the TypeScript SDK's [`trailByPlace`](/docs/development/typescript-readers#a-layout-along-a-route) with the same input and the same answer: a Map frame and one Pin per element in the standard's own fields (so `map_space` reads it back), the route, and the recipe it ran with. You hand it the places in travel order and what hangs where; it places them. `TRAIL_TIERS` is the default floors.
- **A world's own words** (since 0.30.0): `type_word(world, element_type, supertype=None, many=False)` gives the word a world's `x_names` map prints for a type (*Employee* for Character in a work world), or `None` for the standard's name; a supertype's own word wins over the type's. The [names profile](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/names.md), schema-dist serial 48; its 29 shared test cases (the fixture every reader of the profile passes) are the package's test.
- **The spine profile** (since 0.44.0): `read_spine_element(element_type, element)` reads one element of a world that maps a software ecosystem and returns a `SpineRead`: its kind (the closed list's spelling, `off-list`, or `free` for a Character, Institution or Collective), each `x_spine_*` key as read or `None`, the audience's primary, the probe's verb or `unsupported`, and `dropped`, every value it left out, each as `{"key", "value"}` with the value as the element held it (since 0.44.1), and `retires`, the retired row's id from `x_spine_retires` as given, on whatever element carries it (since 0.50.0; whether it sits on a Retirement Event and names a row is the doctor's to check). Trimmed and case-blind as the room profile defines it. `SPINE_KINDS` is the closed list. The [spine profile](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/spine.md), schema-dist serial 61; its 46 fixture cases are the package's test. The calendar the profile ships is checked with `onlyworlds.calendar` (since 0.68.0).
- **Push**: `plan_push` and `push` compare a folder with a baseline and PATCH only the fields that changed. An empty field is no change whichever way it is written: for a text field, absent, `""` and `null` are one; for a link list, absent, `[]` and `null` are one (since 0.123.1), so a folder that leaves empty fields out plans nothing against an export that writes them. A rerun skips what already landed. A push creates nothing and never sends the hidden mark: it patches only elements already in the baseline (an element only in the folder is listed as `only_in_folder`), so an element new to the server goes through `create`, `upsert` or `bulk`, which since 0.43.0 send `hidden: true` as the folder has it. Since 0.155.0 a push never sends `date_labels`, the key the [MCP server](/docs/development/mcp#dates-in-the-worlds-words) gives a date's words under, so a body copied from it plans as if the key were not there. A world's `origin` is its birth line, written once: since 0.34.0 a push sets it from the folder's `source` and `producer` only on a first fill from a folder made elsewhere (the world's `origin` empty, the folder not exported from this same world), never over a first import; a key that may not write the world (a contributor's) skips it without failing the push (`PushResult.origin` holds what was set).
- **Client** (`patch_world` takes back a `get_world()` body, `origin` stripped, and sends extension keys as given; a folder `world.json`'s own `source` and `producer` it leaves out, and `source=` and `producer=` send them when you name them, since 0.35.0): `health`, `get_world`, `patch_world`, `list_page`, `iter_elements`, `get`, `create`, `upsert`, `patch`, `delete`, `edit_links`, `bulk`, `changes`, `head` and `walk_changes`; `me` ([Who am I](/docs/development/api/members#who-am-i)), `draught` ([The draught](/docs/development/api/draught)), `world_lenses` and `set_my_lenses` ([Lenses on the API](/docs/development/api/lenses)), and `propose` with the proposal calls ([Proposed changes](/docs/development/api/proposals)). `create` and `bulk` always send an `Idempotency-Key`, so a retry after a lost answer is safe: it never creates an element twice. A retry that meets the first request still running (409 `idempotency_in_flight`) waits and tries again until the stored answer replays (since 0.4.0). The client retries a 429 (never `rate_limited`, a wrong PIN), a 5xx and a lost answer itself, waiting `Retry-After` when one is sent, up to 6 tries in all by default; `Client(key, pin, retry=RetryPolicy(attempts=1))` turns it off. The TypeScript SDK never retries, on purpose.
- **Errors**: `ApiError` carries the envelope's `code`, `param` and `doc_url`, with flags such as `is_id_conflict`, `is_not_author`, `is_resync_required`, `is_idempotency_in_flight`, `is_validation_error` and `is_hidden_not_allowed` (since 0.43.0: a create carried `hidden: true` from a key that may not hide, and nothing was created). Since 0.158.0 `limit` reads which size limit a write passed, a key of the API document's `info.x-ow-limits`, with `is_element_too_large`, `is_element_too_many_links` and `is_extensions_too_large`: the API sends that key on the code `invalid_request` of its three [size refusals](/docs/development/api/writes#field-rules) (since 2026-11-28); on any other refusal `limit` is `None`. Since 0.112.0 `refusals` reads a 422 [`answer_not_parsed`](/api/errors/#answer_not_parsed): each answer an AI use refused, in order, as `{"word", "stop_reason", "output_tokens"}`; `None` for any other error. Pass `if_match=el["change_seq"]` to `patch` or `edit_links` to write only if nobody changed the element since you read it (since 0.2.0); if it moved, `PreconditionFailed` carries `current`, the element as it is now. See [Only if unchanged](/docs/development/api/writes#only-if-unchanged).
- **Export**: `export_world` (an account world to a folder; since 0.7.0 its `world.json` says where it came from and which part of the world it is, `source` and `exported_as`, read from `/me`), and `onlyworlds.okf.export_okf` (a folder to an OKF bundle, since 0.6.0).

**Not in the Python package yet**: typed element models, the account routes, `members()`, hiding, `adopt` (moving who made an element), images and files, `set_my_character`, sign-in, and the snapshot writer. For these, use the [TypeScript SDK](/docs/development/typescript), which has them, or call the [REST API](/docs/development/api-reference) directly. To ask for one, open an issue on [python-sdk](https://github.com/OnlyWorlds/python-sdk/issues).

## Links

- [Source and README](https://github.com/OnlyWorlds/python-sdk)
- [Interactive API reference](https://www.onlyworlds.com/api/docs)