Skip to main content

Spreadsheet Use: Alias package for univer-use

Project description

Univer Use

LangGraph-powered agent utilities and tools for Univer spreadsheets. This library provides a ready-to-use graph entrypoint and helper tools to build agents that operate against Univer via Univer-MCP.

Features

  • LangGraph graph entrypoint: univer_use/graph.py:build_graph
  • Spreadsheet action agent with MCP tools
  • Prompt templates packaged with the library

Install

You can install this package using either name (both are the same package):

Option 1: univer-use

  • pip: pip install univer-use
  • uv: uv add univer-use
  • Poetry: poetry add univer-use

Option 2: spreadsheet-use

  • pip: pip install spreadsheet-use
  • uv: uv add spreadsheet-use
  • Poetry: poetry add spreadsheet-use

Note: Both univer-use and spreadsheet-use provide identical functionality. Choose whichever name you prefer.

Requirements

  • Python 3.11+
  • Credentials via environment or .env (python-dotenv):
    • OPENROUTER_API_KEY – API key for your OpenRouter-compatible provider
    • OPENROUTER_ENDPOINT – Base URL for the provider endpoint
    • UNIVER_API_KEY – Univer API key (if required by your MCP setup)

Quickstart

First, Initialize Univer Instance (refer to Univer-MCP for more details). You can simply use Univer-MCP Playground.

Then, run the minimal example to compile and run the graph once:

import asyncio
# Both imports work the same way:
# from spreadsheet_use import build_graph
from univer_use import build_graph

async def main():
    graph = await build_graph()
    # Provide initial state. At minimum, include a conversation_id.
    messages = [
        {
            "role": "user",
            "content": "Build a modern salary calculator.",
        }
    ]
    state = {
        "messages": messages,
        "conversation_id": "default",
    }
    result = await graph.ainvoke(state)
    print(result)


if __name__ == "__main__":
    from dotenv import load_dotenv
    load_dotenv()
    asyncio.run(main())

For more details, see examples/sheet_edit.

More examples will be added soon.

This uses the graph at univer_use/graph.py:build_graph. Set env vars in .env or your shell before running. See examples/sheet_edit/.env for an example.

Contributing

Refer to CONTRIBUTING.md for more details.

Available Make Commands Run make help to see all available commands for development.

Package Architecture

  • univer-use: The main package containing all functionality
  • spreadsheet-use: A lightweight alias package that depends on univer-use

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spreadsheet_use-0.1.2.tar.gz (141.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spreadsheet_use-0.1.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file spreadsheet_use-0.1.2.tar.gz.

File metadata

  • Download URL: spreadsheet_use-0.1.2.tar.gz
  • Upload date:
  • Size: 141.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for spreadsheet_use-0.1.2.tar.gz
Algorithm Hash digest
SHA256 57a2cbec3cc10e04f1b891643170f65393a0bce0da0d48fd55c24ef6b9220f54
MD5 733327aa6855af2fc7bbd797f272df54
BLAKE2b-256 9633c1361bac7804187cecc83034de5f3fd9b9e37a67bfd7d8694edda37db232

See more details on using hashes here.

Provenance

The following attestation bundles were made for spreadsheet_use-0.1.2.tar.gz:

Publisher: release.yml on dream-num/univer-use

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spreadsheet_use-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for spreadsheet_use-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8929c37c4ee31c197ecb7eb6bc51b1f3674b849872214e1a23578c146686ebf5
MD5 ba9bb6cb2efca399215beccd66a05f12
BLAKE2b-256 3988d8520d605c855350176858ba92951106324710de45c3d76ec3aa095ffd12

See more details on using hashes here.

Provenance

The following attestation bundles were made for spreadsheet_use-0.1.2-py3-none-any.whl:

Publisher: release.yml on dream-num/univer-use

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page