Skip to content

README SDK quick-start imports a nonexistent Doc API in both Python and Node #250

Description

@wernerkasselman-au

Summary

The root README's SDK quick-start documents a Doc wrapper API that neither
checked-in SDK exports.

The Python example starts with:

from officecli import Doc

and the Node example starts with:

import { Doc } from "@officecli/sdk";

Both fail before any OfficeCLI command is sent. The SDKs expose a thin
resident-pipe surface (create / openDocumentsend / batch),
not the documented Doc.add(...) / Doc.get(...) wrapper.

Reproduction

From the repository root:

PYTHONPATH=sdk/python python3 -c 'from officecli import Doc'

Actual:

ImportError: cannot import name 'Doc' from 'officecli'

For Node:

node --input-type=module -e \
  "import * as sdk from './sdk/node/index.js'; console.log('Doc' in sdk, Object.keys(sdk).sort().join(','))"

Actual:

false Document,OfficeCliError,create,default,install,module.exports,open,pipePaths

Expected

The root README should show code that works with the SDKs currently shipped in
this repository:

  • Python: import officecli, then officecli.create(...) or
    officecli.open(...), followed by doc.send(...) / doc.batch(...).
  • Node: const oc = require('@officecli/sdk'), then await oc.create(...)
    or await oc.open(...), followed by doc.send(...) / doc.batch(...).

The SDK-local READMEs already document those two surfaces correctly.

Impact

A user following either root-README example hits an import/export error
immediately. The examples also imply a second, higher-level vocabulary that
the SDKs intentionally do not maintain, so the failure is not a small spelling
error: the documented API shape is different from the shipped one.

Verification

After the README is corrected:

PYTHONPATH=sdk/python python3 -c 'import officecli; print(officecli.Document)'
node --input-type=module -e \
  "import * as sdk from './sdk/node/index.js'; console.log(typeof sdk.create, typeof sdk.open)"

Both commands should succeed, and the root examples should match the
corresponding SDK README quick-starts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions