marimo - #34
Conversation
There was a problem hiding this comment.
The pull request #34 has too many files changed.
The GitHub API will only let us fetch up to 300 changed files, and this pull request has 3687.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis change adds extensive documentation, configs, Docker/Dagger build tooling, and a Makefile. It also removes a large portion of the Python package’s public surface: CLI, AST/convert layers, AI providers/tools/MCP, runtime context/requests/handlers, caching/stores, lint registries, SQL parsing, data utilities, UI dataframe/table components, tutorials, and various registries. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as Developer
participant M as Marimo (Dagger)
participant Env as Env
participant C as Container
U->>M: make(task)
activate M
M->>Env: py() base container
activate Env
Env-->>M: dagger.Container
deactivate Env
M->>C: with_workdir("/src")<br/>with_mounted_directory(src)
C-->>M: configured container
M->>C: with_exec(["make","install-all"])
M->>C: with_exec(["make", task])
deactivate M
C-->>U: container (result)
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120+ minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
Summary of ChangesHello @arthrod, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request represents a foundational restructuring and re-initialization of the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here. PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||
|
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here. PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||||||||||||
There was a problem hiding this comment.
Code Review
This pull request adds a comprehensive set of project documentation and configuration files, which is a great step towards standardizing the development process. However, it also includes the deletion of a vast number of source code files without any explanation. This is a critical concern that needs immediate clarification. My review includes specific feedback on the newly added files, addressing some inconsistencies and a potential security risk, as well as a critical comment on the unexplained file deletions.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
| def load(self, glbls: dict[str, Any]) -> Any: | ||
| """Reconstruct the function by executing its source code.""" | ||
| # TODO: Fix line cache and associate with the correct module. | ||
| code_obj = compile(self.code, "<string>", "exec") | ||
| lcls: dict[str, Any] = {} | ||
| exec(code_obj, glbls, lcls) | ||
| # Update the global scope with the function. | ||
| for value in lcls.values(): |
There was a problem hiding this comment.
Reconstructed function not registered for recursion
The new FunctionStub.load executes the stored source into a fresh lcls dict and returns the first value without copying it back into the globals dictionary. Recursive functions (or any function body referring to itself by name) resolve names via their __globals__, which in this implementation is the glbls dict passed into exec. Because the reconstructed function name is never inserted into glbls, calling a recursive function loaded from the cache will raise NameError on the first self-call. The loader should update the global scope (e.g. glbls[name] = fn or glbls.update(lcls)) before returning the function.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 23
🧹 Nitpick comments (32)
marimo/configs/.vimrc (1)
2-2: Useinoremapto avoid recursive mapping surprises
imapis recursive, so any future remap ofkorjcan break this escape chord. Switch to the non-recursive form to keep the mapping stable.-imap kj <Esc> +inoremap kj <Esc>marimo/docker/Dockerfile (1)
8-29: Actually use the non-root user you create.You create
appuserand chown/app, but neverUSER appuser, so the container still runs as root. Switch toUSER appuserafter the setup to get the intended non-root runtime.marimo/docs/_static/js/analytics.js (2)
9-9: Add specific rule and explanation to biome-ignore.The
biome-ignoredirective should specify which rule is being suppressed and why.Apply this diff:
-// biome-ignore +// biome-ignore lint/suspicious/noExplicitAny: Third-party PostHog snippet uses dynamic typing
1-6: Confirm extensionless URL support & remove debug logging
- Ensure your web server rewrites or indexes requests to
/pageso they servepage.html, otherwise stripping.htmlwill break navigation.- Remove or gate the
console.log('Redirecting to', redirectUrl);in production.marimo/.env.testing (1)
1-1: Document the purpose of this test fixture.The environment variable appears to be a test fixture, but its purpose and expected usage are not documented. Adding a comment would help developers understand when and how to use this file.
Consider adding a comment at the top:
+# Test environment configuration +# This file contains dummy values for testing environment variable loading FOO_BAR_SECRET=foo_bar_secretmarimo/development_docs/pyodide.md (1)
10-20: Minor typo in the comment.Line 15 has "server" instead of "serve" in the comment.
Apply this diff:
# build once hatch build -# server and watch for changes +# serve and watch for changes uv run pyodide/build_and_serve.pymarimo/docs/__init__.py (1)
1-5: Enhance module docstring for better documentation.The current docstring is minimal. Consider expanding it to describe the package's purpose, contents, and usage patterns.
Apply this diff to enhance the docstring:
-"""marimo documentation package.""" +"""marimo documentation package. + +This package contains documentation-related modules and utilities for marimo. +The `blocks` submodule provides documentation building blocks and components. + +Example: + >>> from marimo.docs import blocks + >>> # Use blocks for documentation generation +"""As per coding guidelines
marimo/README_Japanese.md (1)
71-71: Minor: Verbose expression can be simplified.The Japanese phrase "ことができ" at line 71 is flagged as potentially verbose by LanguageTool. Consider simplifying for better readability.
marimo/development_docs/openapi.md (1)
1-37: LGTM: Clear and well-structured OpenAPI documentation.The documentation provides a straightforward workflow for working with the OpenAPI specification. The commands are clear and practical.
Optional enhancement: Consider adding:
- Version requirements for
openapi-spec-validatorand other tools- Troubleshooting section for common errors
- Expected output examples for validation
marimo/docs/_static/js/math.js (1)
1-53: LGTM: Well-structured math rendering implementation.The code demonstrates good practices:
- Defensive programming (KaTeX availability check)
- Efficient DOM updates (data-processed attribute)
- Proper error handling
- MutationObserver for dynamic content
Optional modernization: As per coding guidelines, consider future refactoring with modern tooling (oxlint/biome for linting) if this becomes part of a larger frontend build process. For now, this standalone script is appropriate.
marimo/docs/_static/CLAUDE.md (1)
1-367: Add language specifiers to code blocks for better rendering.Multiple code blocks (lines 9, 179, 198, 253, 269, 312, 340, 366) lack language identifiers, which affects syntax highlighting and accessibility.
Apply these changes to add language specifiers:
-``` +```python @app.cell def _(): <your code here> returnApply similar changes to all other fenced code blocks throughout the document. </blockquote></details> <details> <summary>marimo/README.md (4)</summary><blockquote> `30-36`: **Add alt text to images for accessibility (MD045).** Many <img> tags lack alt; add concise, descriptive alt attributes. Example fixes: ```diff - <a href="https://anaconda.org/conda-forge/marimo"><img src="https://img.shields.io/conda/vn/conda-forge/marimo.svg"/></a> + <a href="https://anaconda.org/conda-forge/marimo"><img alt="Conda Forge: marimo version" src="https://img.shields.io/conda/vn/conda-forge/marimo.svg"/></a> - <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/reactive.gif" width="700px" /> + <img alt="Reactive execution demo" src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/reactive.gif" width="700px" /> - <img src="https://marimo.io/shield.svg"/> + <img alt="Open in marimo playground" src="https://marimo.io/shield.svg"/>Also applies to: 76-76, 94-94, 100-100, 108-108, 115-115, 178-178, 217-217, 226-226, 231-231, 236-236, 241-241, 262-262, 267-267, 272-272, 277-277, 309-309, 336-336
10-15: Add rel="noopener noreferrer" to external links with target="_blank".Prevents tabnabbing and improves security.
Example:
- <a href="https://docs.marimo.io" target="_blank"><strong>Docs</strong></a> + <a href="https://docs.marimo.io" target="_blank" rel="noopener noreferrer"><strong>Docs</strong></a>Also applies to: 20-27, 171-176, 219-221, 225-244, 261-279, 335-337
56-56: Use descriptive link text (MD059).Replace “more” with descriptive text.
- and [more](https://docs.marimo.io/guides/editor_features/index.html) + and [more editor features](https://docs.marimo.io/guides/editor_features/index.html)Also applies to: 139-139
119-126: Minor wording: capitalize Markdown, hyphenate “auto-install,” and prefer “parameterized.”Improves consistency and clarity.
-**Dynamic markdown.** Use markdown parametrized by Python variables ... +**Dynamic Markdown.** Use Markdown parameterized by Python variables ... -... and auto install them in +... and auto-install them inmarimo/biome.jsonc (3)
127-139: Consider React automatic JSX runtime.If the frontend uses React 17+/Vite defaults, prefer “automatic” over “reactClassic”.
- "javascript": { "jsxRuntime": "reactClassic", + "javascript": { "jsxRuntime": "automatic",
73-101: Tighten type naming conventions.Types/interfaces are typically PascalCase; allowing CONSTANT_CASE and camelCase for “typeLike” risks inconsistency.
- { "selector": { "kind": "typeLike" }, "formats": ["PascalCase", "CONSTANT_CASE", "camelCase"] } + { "selector": { "kind": "typeLike" }, "formats": ["PascalCase"] }
104-108: ‘useNodejsImportProtocol’ may break bundlers.Enforcing node: protocol can be incompatible with some tooling; ensure compatibility.
If issues arise, lower to “warn” or disable per-package.
marimo/Makefile (2)
56-68: Graceful shutdown of both processes in dev targets.Trap kills only the background marimo process; pnpm may continue running.
- @(trap 'kill %1; exit' INT; \ - uv run marimo edit --no-token --headless /tmp --port 2718 & \ - pnpm dev) + @( \ + uv run marimo edit --no-token --headless /tmp --port 2718 & MARIMO_PID=$$!; \ + pnpm dev & FE_PID=$$!; \ + trap 'kill $$MARIMO_PID $$FE_PID 2>/dev/null || true; exit' INT TERM; \ + wait $$FE_PID; \ + kill $$MARIMO_PID 2>/dev/null || true; \ + )(Apply similarly to dev-sandbox.)
161-164: Optional: add conventional “all” and “clean” targets.Improves DX and satisfies checkmake hints.
+.PHONY: all clean +all: check +clean: + rm -rf marimo/_static marimo/_lsp dist build .turbomarimo/CONTRIBUTING.md (2)
189-201: Align Python version in examples with Makefile.Docs show +py=3.13 but Makefile uses +py=3.12 for py-test/snapshots. Pick one for consistency.
Option A: update Makefile to 3.13; Option B: change examples to 3.12.
41-49: Recommend running prereq check before building.Add “make check-prereqs” to reduce setup friction.
-```bash -make fe && make py -``` +```bash +make check-prereqs && make fe && make py +```marimo/CODE_OF_CONDUCT.md (1)
70-76: Replace bare URLs with Markdown links (MD034).Improves readability and linting.
-available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html> ... -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq +For answers to common questions about this code of conduct, see +<https://www.contributor-covenant.org/faq>marimo/SECURITY.md (1)
5-8: Typos and list formatting (GitHub, MD007).Capitalize “GitHub”; fix unordered list indent.
-To report a security vulnerability, [please draft an advisory through -Github](https://github.com/marimo-team/marimo/security/advisories/new), or +To report a security vulnerability, [please draft an advisory through +GitHub](https://github.com/marimo-team/marimo/security/advisories/new), or email the marimo team; engineering [at] marimo [dot] io. ... - - @AlexanderBarabanov - - @pwntester - - @s-celles - - @acepace - - @devgi +- @AlexanderBarabanov +- @pwntester +- @s-celles +- @acepace +- @devgiAlso applies to: 19-23
marimo/dagger/src/main/backend.py (2)
9-16: Add class/method docstrings per guidelines.Document intent and side effects of the container graph to ease maintenance.
@object_type class Backend: + """Backend orchestration: lint, type-check, and test Python backend inside a Dagger container.""" @@ @function async def test(self) -> dagger.Container: + """Prepare env, run mandatory tests (awaited), then return a container configured for optional tests."""
17-37: Parameterize Python version and make the copies resilient.Hard-coding 3.12 and assuming specific paths can cause fragile runs.
- Introduce an env or function arg PY_VER defaulting to "3.12".
- Add
--parentswhere applicable and guard cp with-for-nas needed. Example:- .with_exec(["mkdir", "-p", "marimo/_static/assets"]) + .with_exec(["mkdir", "-p", "marimo/_static/assets"]) @@ - .with_exec( - ["cp", "frontend/index.html", "marimo/_static/index.html"] - ) + .with_exec(["cp", "-f", "frontend/index.html", "marimo/_static/index.html"])marimo/dagger/src/main/cli.py (1)
7-21: Add docstrings; consider async and a minimal smoke exec to validate the image.Current method just returns a base image; add intent docs and optionally a trivial exec (e.g., python --version) or make it async for parity with other functions.
@object_type class Cli: + """CLI-oriented orchestration surface (playground for quick container smoke checks).""" @@ - @function - def test(self) -> dagger.Container: - return ( - # python base - dag.container().from_("python:3-bookworm") - ) + @function + async def test(self) -> dagger.Container: + """Return a Python base container after a simple smoke command.""" + return await dag.container().from_("python:3-bookworm").with_exec( + ["python", "-V"] + ).sync() or dag.container().from_("python:3-bookworm")marimo/dagger/README.md (1)
1-19: Tighten grammar and use descriptive link text.Address markdownlint MD059 and minor grammar nits.
-This directory contains Dagger scripts for building and testing marimo in a -containerized environment. This allows for running tests and builds in an -environment that is similar to CI. +This directory contains Dagger scripts for building and testing marimo in a +containerized environment. This allows running tests and builds in an +environment similar to CI. @@ -To run a Dagger script, you need to have the Dagger CLI installed. You can install -it by following the instructions [here](https://docs.dagger.io/install). +To run a Dagger script, install the Dagger CLI using the +[Dagger installation guide](https://docs.dagger.io/install).marimo/dagger/src/main/env.py (2)
65-76: Run pnpm as non-root; ensure corepack/pnpm usage matches base image.Node 20 ships corepack; switching to user
nodeavoids root-owned node_modules.return ( dag.container() .from_("node:20-slim") .with_env_variable("CI", "true") + .with_user("node") .with_mounted_cache( - "/root/.local/share/pnpm", dag.cache_volume("pnpm") + "/home/node/.local/share/pnpm", dag.cache_volume("pnpm") ) .with_exec(["corepack", "enable"]) # this enables pnpm )
24-24: Remove unused noqa directive flagged by Ruff (RUF100).
# noqa: E501isn’t needed here since E501 isn’t enabled; drop it.- "curl -fsSL https://deb.nodesource.com/setup_20.x | bash -", # noqa: E501 + "curl -fsSL https://deb.nodesource.com/setup_20.x | bash -",marimo/dagger/src/main/frontend.py (1)
9-19: Add class/method docstrings; default secret argument can hide misconfig.Document purpose and either remove the default or log when a blank token is used to catch CI misconfiguration.
@object_type class Frontend: + """Frontend orchestration: install, lint, type-check, test, and build with pnpm/turbo.""" @@ @function def test( self, - turbo_token: dagger.Secret = dag.set_secret("DEFAULT", ""), # noqa: B008 + turbo_token: dagger.Secret = dag.set_secret("DEFAULT", ""), # noqa: B008 ) -> dagger.Container: - """ - Replace .github/workflows/test_fe.yaml - """ + """Replace .github/workflows/test_fe.yaml with a reproducible container pipeline."""marimo/dagger/src/main/main.py (1)
12-22: Enhance class docstring to explain composite pattern.The docstring is brief. Consider expanding it to explain that this is a composite orchestration class that coordinates multiple subsystems.
Apply this diff:
@object_type class Marimo: - """A collection of tasks for the Marimo project.""" + """A collection of tasks for the Marimo project. + + This composite orchestration class coordinates frontend, backend, CLI, + and environment subsystems for containerized build and test workflows. + All operations are executed within Dagger containers for reproducibility. + """
| /docs/ @akshayka | ||
| /examples/ @akshayka | ||
| /README.md @akshayka | ||
|
|
||
| # LSP | ||
| /lsp/ @manzt | ||
|
|
||
| # Schemas | ||
| /openapi/ @manzt @mscolnick | ||
|
|
||
| # CI | ||
| /.github/ @mscolnick @manzt | ||
| biome.jsonc @mscolnick @manzt |
There was a problem hiding this comment.
Fix CODEOWNERS paths for README and biome.jsonc.
Entries don’t match file locations; owners won’t be applied.
-/README.md @akshayka
+/marimo/README.md @akshayka
...
-biome.jsonc @mscolnick @manzt
+/marimo/biome.jsonc @mscolnick @manztIf a root README/biome also exist, keep both entries.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /docs/ @akshayka | |
| /examples/ @akshayka | |
| /README.md @akshayka | |
| # LSP | |
| /lsp/ @manzt | |
| # Schemas | |
| /openapi/ @manzt @mscolnick | |
| # CI | |
| /.github/ @mscolnick @manzt | |
| biome.jsonc @mscolnick @manzt | |
| /docs/ @akshayka | |
| /examples/ @akshayka | |
| /marimo/README.md @akshayka | |
| # LSP | |
| /lsp/ @manzt | |
| # Schemas | |
| /openapi/ @manzt @mscolnick | |
| # CI | |
| /.github/ @mscolnick @manzt | |
| /marimo/biome.jsonc @mscolnick @manzt |
🤖 Prompt for AI Agents
In marimo/CODEOWNERS around lines 24-36, the README and biome.jsonc entries
don’t match actual file locations so owners aren’t being applied; update the
paths to include both the repository-root and the marimo subpath (e.g., add or
correct /README.md and /biome.jsonc alongside /marimo/README.md and
/marimo/biome.jsonc) and assign the same owners as intended so both root and
package-local files receive the listed reviewers.
| [project] | ||
| name = "main" | ||
| version = "0.0.0" | ||
| dependencies = [] | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Add dagger SDK dep and basic metadata; optionally add ruff/pytest as dev extras.
Without dagger-io, imports may fail at runtime; also add minimal metadata to aid packaging and tooling.
Apply:
[project]
-name = "main"
-version = "0.0.0"
-dependencies = []
+name = "main"
+version = "0.0.0"
+description = "Dagger-based dev/test orchestration for marimo"
+requires-python = ">=3.12"
+license = { text = "Apache-2.0" }
+readme = "README.md"
+authors = [{ name = "marimo team" }]
+dependencies = [
+ "dagger-io>=0.13,<0.14",
+]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
+
+# Optional: dev tools
+[project.optional-dependencies]
+dev = [
+ "ruff>=0.6.0",
+ "pytest>=8.3.0",
+]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| [project] | |
| name = "main" | |
| version = "0.0.0" | |
| dependencies = [] | |
| [build-system] | |
| requires = ["hatchling"] | |
| build-backend = "hatchling.build" | |
| [project] | |
| name = "main" | |
| version = "0.0.0" | |
| description = "Dagger-based dev/test orchestration for marimo" | |
| requires-python = ">=3.12" | |
| license = { text = "Apache-2.0" } | |
| readme = "README.md" | |
| authors = [{ name = "marimo team" }] | |
| dependencies = [ | |
| "dagger-io>=0.13,<0.14", | |
| ] | |
| [build-system] | |
| requires = ["hatchling"] | |
| build-backend = "hatchling.build" | |
| # Optional: dev tools | |
| [project.optional-dependencies] | |
| dev = [ | |
| "ruff>=0.6.0", | |
| "pytest>=8.3.0", | |
| ] |
🤖 Prompt for AI Agents
In marimo/dagger/pyproject.toml lines 1-9, the project lacks the dagger SDK
dependency and minimal package metadata; update the [project] table to include a
proper name, version, description, authors (name and email), license, readme,
classifiers, and add dagger-io (dagger) to dependencies, and optionally add a
[project.optional-dependencies] section with dev extras such as "dev" = ["ruff",
"pytest"] (or similar) so imports won't fail at runtime and tooling/packaging
have required metadata.
| # test-optional:test | ||
| return env.with_exec( | ||
| [ | ||
| "hatch", | ||
| "run", | ||
| "+py=3.12", | ||
| "test-optional:test", | ||
| "-v", | ||
| "tests/", | ||
| "-k", | ||
| "not test_cli", | ||
| ] | ||
| ) |
There was a problem hiding this comment.
Final test is not awaited; it may never run. Ensure execution and return a sensible value.
Return value is a Container; without .sync() the last test likely won’t execute when invoking dagger call backend test.
- # test-optional:test
- return env.with_exec(
- [
- "hatch",
- "run",
- "+py=3.12",
- "test-optional:test",
- "-v",
- "tests/",
- "-k",
- "not test_cli",
- ]
- )
+ # test-optional:test
+ await env.with_exec(
+ [
+ "hatch",
+ "run",
+ "+py=3.12",
+ "test-optional:test",
+ "-v",
+ "tests/",
+ "-k",
+ "not test_cli",
+ ]
+ ).sync()
+ return envCommittable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In marimo/dagger/src/main/backend.py around lines 55 to 67, the function returns
a Dagger Container from env.with_exec(...) which is never executed; call .sync()
(or await the exec result per your Dagger API) on the result of
env.with_exec(...) so the tests actually run, and return a sensible value (e.g.,
the exec result or its exit code/boolean) instead of the Container to ensure
execution completes before returning.
| # python base | ||
| self.py() | ||
| .with_mounted_cache( | ||
| "/root/.local/share/pnpm", dag.cache_volume("pnpm") | ||
| ) | ||
| # package deps | ||
| .with_exec(["apt", "update"]) | ||
| .with_exec(["apt", "install", "-y", "curl"]) | ||
| # install node 20+ | ||
| .with_exec( | ||
| [ | ||
| "sh", | ||
| "-c", | ||
| "curl -fsSL https://deb.nodesource.com/setup_20.x | bash -", # noqa: E501 | ||
| ] | ||
| ) | ||
| .with_exec(["apt", "install", "-y", "nodejs"]) | ||
| # install pnpm@9 | ||
| .with_exec(["npm", "install", "-g", "pnpm@9"]) | ||
| ) |
There was a problem hiding this comment.
Dev container runs privileged steps as nonroot; pnpm cache path mismatches user; Node install via curl|bash.
self.py() ends as user=nonroot; subsequent apt installs will fail; pnpm cache mounted at /root/... won’t be used by nonroot; consider safer Node install.
- return (
- # python base
- self.py()
- .with_mounted_cache(
- "/root/.local/share/pnpm", dag.cache_volume("pnpm")
- )
- # package deps
- .with_exec(["apt", "update"])
- .with_exec(["apt", "install", "-y", "curl"])
+ return (
+ # start from py() but temporarily elevate to root for system installs
+ self.py()
+ .with_user("root")
+ .with_mounted_cache(
+ "/home/nonroot/.local/share/pnpm", dag.cache_volume("pnpm")
+ )
+ # package deps (non-interactive)
+ .with_env_variable("DEBIAN_FRONTEND", "noninteractive")
+ .with_exec(["apt-get", "update"])
+ .with_exec(["apt-get", "install", "-y", "curl", "ca-certificates"])
# install node 20+
- .with_exec(
- [
- "sh",
- "-c",
- "curl -fsSL https://deb.nodesource.com/setup_20.x | bash -", # noqa: E501
- ]
- )
- .with_exec(["apt", "install", "-y", "nodejs"])
+ # Prefer Debian-provided Node or verify Nodesource script with checksum/signature
+ .with_exec(["apt-get", "install", "-y", "nodejs"]) # if using Debian repo
+ # or, if Nodesource is required, add checksum verification before bash
# install pnpm@9
.with_exec(["npm", "install", "-g", "pnpm@9"])
+ .with_user("nonroot")
)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # python base | |
| self.py() | |
| .with_mounted_cache( | |
| "/root/.local/share/pnpm", dag.cache_volume("pnpm") | |
| ) | |
| # package deps | |
| .with_exec(["apt", "update"]) | |
| .with_exec(["apt", "install", "-y", "curl"]) | |
| # install node 20+ | |
| .with_exec( | |
| [ | |
| "sh", | |
| "-c", | |
| "curl -fsSL https://deb.nodesource.com/setup_20.x | bash -", # noqa: E501 | |
| ] | |
| ) | |
| .with_exec(["apt", "install", "-y", "nodejs"]) | |
| # install pnpm@9 | |
| .with_exec(["npm", "install", "-g", "pnpm@9"]) | |
| ) | |
| return ( | |
| # start from py() but temporarily elevate to root for system installs | |
| self.py() | |
| .with_user("root") | |
| .with_mounted_cache( | |
| "/home/nonroot/.local/share/pnpm", dag.cache_volume("pnpm") | |
| ) | |
| # package deps (non-interactive) | |
| .with_env_variable("DEBIAN_FRONTEND", "noninteractive") | |
| .with_exec(["apt-get", "update"]) | |
| .with_exec(["apt-get", "install", "-y", "curl", "ca-certificates"]) | |
| # Prefer Debian-provided Node or verify Nodesource script with checksum/signature | |
| .with_exec(["apt-get", "install", "-y", "nodejs"]) # if using Debian repo | |
| # or, if Nodesource is required, add checksum verification before bash | |
| # install pnpm@9 | |
| .with_exec(["npm", "install", "-g", "pnpm@9"]) | |
| .with_user("nonroot") | |
| ) |
🧰 Tools
🪛 Ruff (0.14.0)
24-24: Unused noqa directive (non-enabled: E501)
Remove unused noqa directive
(RUF100)
| dag.container() | ||
| .from_("python:3.12-bookworm") | ||
| .with_exec(["apt-get", "update"]) | ||
| .with_exec( | ||
| [ | ||
| "apt-get", | ||
| "install", | ||
| "-y", | ||
| "make", | ||
| "libgdal-dev", | ||
| "python3-gdal", | ||
| ] | ||
| ) | ||
| .with_exec(["adduser", "nonroot"]) | ||
| .with_mounted_cache( | ||
| "/home/nonroot/.cache/pip", | ||
| dag.cache_volume("python-312"), | ||
| owner="nonroot", | ||
| ) | ||
| .with_mounted_cache( | ||
| "/home/nonroot/.cache/uv", | ||
| dag.cache_volume("uv-python-312"), | ||
| owner="nonroot", | ||
| ) | ||
| .with_exec(["pip", "install", "hatch", "typos"]) | ||
| .with_user("nonroot") | ||
| ) |
There was a problem hiding this comment.
Use non-interactive user creation and consistent apt-get; install tools before dropping privileges.
adduser can prompt; switch to useradd and ensure home and shell; keep apt-get usage consistent and non-interactive.
- .with_exec(["apt-get", "update"])
+ .with_env_variable("DEBIAN_FRONTEND", "noninteractive")
+ .with_exec(["apt-get", "update"])
@@
- .with_exec(["adduser", "nonroot"])
+ .with_exec(["useradd", "-m", "-s", "/bin/bash", "-u", "1000", "nonroot"])
@@
- .with_exec(["pip", "install", "hatch", "typos"])
+ .with_exec(["pip", "install", "hatch", "uv"])
.with_user("nonroot")Notes:
- Replace
typos(not reliably available via pip) with tools you actually need; considerruff/pytestas pip installs or run via hatch env.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| dag.container() | |
| .from_("python:3.12-bookworm") | |
| .with_exec(["apt-get", "update"]) | |
| .with_exec( | |
| [ | |
| "apt-get", | |
| "install", | |
| "-y", | |
| "make", | |
| "libgdal-dev", | |
| "python3-gdal", | |
| ] | |
| ) | |
| .with_exec(["adduser", "nonroot"]) | |
| .with_mounted_cache( | |
| "/home/nonroot/.cache/pip", | |
| dag.cache_volume("python-312"), | |
| owner="nonroot", | |
| ) | |
| .with_mounted_cache( | |
| "/home/nonroot/.cache/uv", | |
| dag.cache_volume("uv-python-312"), | |
| owner="nonroot", | |
| ) | |
| .with_exec(["pip", "install", "hatch", "typos"]) | |
| .with_user("nonroot") | |
| ) | |
| dag.container() | |
| .from_("python:3.12-bookworm") | |
| .with_env_variable("DEBIAN_FRONTEND", "noninteractive") | |
| .with_exec(["apt-get", "update"]) | |
| .with_exec( | |
| [ | |
| "apt-get", | |
| "install", | |
| "-y", | |
| "make", | |
| "libgdal-dev", | |
| "python3-gdal", | |
| ] | |
| ) | |
| .with_exec(["useradd", "-m", "-s", "/bin/bash", "-u", "1000", "nonroot"]) | |
| .with_mounted_cache( | |
| "/home/nonroot/.cache/pip", | |
| dag.cache_volume("python-312"), | |
| owner="nonroot", | |
| ) | |
| .with_mounted_cache( | |
| "/home/nonroot/.cache/uv", | |
| dag.cache_volume("uv-python-312"), | |
| owner="nonroot", | |
| ) | |
| .with_exec(["pip", "install", "hatch", "uv"]) | |
| .with_user("nonroot") | |
| ) |
🤖 Prompt for AI Agents
In marimo/dagger/src/main/env.py around lines 37 to 63, replace the interactive
adduser and inconsistent apt usage: run apt-get commands non-interactively
(export DEBIAN_FRONTEND=noninteractive and use apt-get update && apt-get install
-y -q <packages>), install required build tools (e.g., build-essential,
python3-dev, gcc) and any lint/test tools before switching user, and replace the
interactive adduser call with useradd --create-home --shell /bin/bash --uid
<optional> nonroot (or equivalent) so no prompt appears; finally move the pip
install step to run as root (before .with_user("nonroot")) and replace the
unreliable "typos" package with the intended tools (e.g., ruff and pytest) or
remove it.
| @node -v | grep -q "v2[0-9]" || { echo "Node.js v20+ is required. Current version: $(shell node -v)"; exit 1; } | ||
| @echo "✅ All prerequisites are installed!" |
There was a problem hiding this comment.
Fix Node.js version check (rejects v30+ by mistake).
Current regex only allows v20–v29. Use a numeric check.
- @node -v | grep -q "v2[0-9]" || { echo "Node.js v20+ is required. Current version: $(shell node -v)"; exit 1; }
+ @node -p 'process.versions.node.split(".")[0] >= 20 ? "" : "fail"' | grep -q '^$$' || { echo "Node.js v20+ is required. Current version: $(shell node -v)"; exit 1; }🤖 Prompt for AI Agents
In marimo/Makefile around lines 31-32, the Node.js version check uses a regex
that only matches v20–v29 and incorrectly rejects v30+; replace the grep-based
regex with a numeric major-version check that extracts Node's major version and
ensures it is >= 20, and update the error message to still print the current
version; implement this by invoking Node to return its major version (or
process.version), comparing it numerically to 20, and exiting with the same
message if the check fails.
| <p align="center"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg"> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <em>这是一款响应式的Python笔记本,具有优秀的可复现性,原生支持Git,并可作为脚本或应用程序部署。</em> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://docs.marimo.io" target="_blank"><strong>用户手册</strong></a> · | ||
| <a href="https://marimo.io/discord?ref=readme" target="_blank"><strong>Discord 社区</strong></a> · | ||
| <a href="https://docs.marimo.io/examples/" target="_blank"><strong>示例</strong></a> · | ||
| <a href="https://marimo.io/gallery/" target="_blank"><strong>展示廊</strong></a> · | ||
| <a href="https://www.youtube.com/@marimo-team/" target="_blank"><strong>YouTube</strong></a> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README.md" target="_blank"><b>English</b></a> | ||
| <b> | </b> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Traditional_Chinese.md" target="_blank"><b>繁體中文</b></a> | ||
| <b> | </b> | ||
| <b>简体中文</b> | ||
| <b> | </b> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Japanese.md" target="_blank"><b>日本語</b></a> | ||
| <b> | </b> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Spanish.md" target="_blank"><b>Español</b></a> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://pypi.org/project/marimo/"><img src="https://img.shields.io/pypi/v/marimo?color=%2334D058&label=pypi"/></a> | ||
| <a href="https://anaconda.org/conda-forge/marimo"><img src="https://img.shields.io/conda/vn/conda-forge/marimo.svg"/></a> | ||
| <a href="https://marimo.io/discord?ref=readme"><img src="https://shields.io/discord/1059888774789730424" alt="discord"/></a> | ||
| <img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/marimo?label=pypi%20%7C%20downloads"/> | ||
| <img alt="Conda Downloads" src="https://img.shields.io/conda/d/conda-forge/marimo"/> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/marimo"/></a> | ||
| </p> | ||
|
|
||
| **Marimo** 是一款响应式 Python 笔记本:运行单元格可与 UI 元素交互,marimo 会自动更新依赖于它的单元格(或将其<a href="#expensive-notebooks">标记为过时单元格</a>),从而保持代码和输出的一致性。**marimo** 笔记本以纯 Python 格式存储,可作为脚本执行,也可作为应用程序部署。 | ||
|
|
||
| **为什么选择 marimo** | ||
|
|
||
| - 🚀 **功能齐全**:替代 `jupyter`、`streamlit`、`jupytext`、`ipywidgets`、`papermill` 等更多工具 | ||
| - ⚡️ **响应式**:运行一个单元格,marimo会响应式地[运行所有依赖单元格](https://docs.marimo.io/guides/reactivity.html)或<a href="#expensive-notebooks">将它们标记为过时</a> | ||
| - 🖐️ **交互性**:[绑定滑块、表格、图表等UI元素](https://docs.marimo.io/guides/interactivity.html)到Python代码——无需回调函数 | ||
| - 🐍 **支持Git版本控制**:笔记本以`.py`文件格式存储 | ||
| - 🛢️ **为数据设计**:使用[SQL](https://docs.marimo.io/guides/working_with_data/sql.html)查询数据框和数据库,过滤和搜索[数据框](https://docs.marimo.io/guides/working_with_data/dataframes.html) | ||
| - 🔬 **可复现**:[无隐藏状态](https://docs.marimo.io/guides/reactivity.html#no-hidden-state),确定性执行,[内置包管理](https://docs.marimo.io/guides/editor_features/package_management.html) | ||
| - 🏃 **可执行**:[作为Python脚本执行](https://docs.marimo.io/guides/scripts.html),通过命令行参数进行配置 | ||
| - 🛜 **可分享**:[部署为交互式Web应用](https://docs.marimo.io/guides/apps.html)或[幻灯片](https://docs.marimo.io/guides/apps.html#slides-layout),[通过WASM在浏览器中运行](https://docs.marimo.io/guides/wasm.html) | ||
| - 🧩 **可复用:** 可从一个笔记本[导入函数和类](https://docs.marimo.io/guides/reusing_functions/)到另一个笔记本 | ||
| - 🧪 **便于测试:** 可在笔记本上运行 [pytest](https://docs.marimo.io/guides/testing/) | ||
| - ⌨️ **现代编辑器**:[GitHub Copilot](https://docs.marimo.io/guides/editor_features/ai_completion.html#github-copilot)、[AI助手](https://docs.marimo.io/guides/editor_features/ai_completion.html#using-ollama)、vim快捷键、变量浏览器和[更多功能](https://docs.marimo.io/guides/editor_features/index.html) | ||
|
|
||
| ```python | ||
| pip install marimo && marimo tutorial intro | ||
| ``` | ||
|
|
||
| _在我们的[在线体验平台](https://marimo.app/l/c7h6pz)试用marimo,完全在浏览器中运行!_ | ||
|
|
||
| _跳转到[快速入门](#快速入门)了解我们的命令行工具。_ | ||
|
|
||
| ## 响应式编程环境 | ||
|
|
||
| Marimo 确保了您的代码、输出和程序的状态始的一致性,解决了与 Jupyter 等传统笔记本相关的许多[问题](https://docs.marimo.io/faq.html#faq-problems)。 | ||
|
|
||
| **独有的响应式设计** | ||
| 运行一个单元格,marimo 就会自动运行引用其变量的单元格,从而避免了手动重新运行单元格这一容易出错的工作。删除单元格,marimo 会从程序内存中删除其变量,消除隐藏状态。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/reactive.gif" width="700px" /> | ||
|
|
||
| <a name="expensive-notebooks"></a> | ||
|
|
||
| **兼容计算密集型笔记本**。marimo允许您[将运行时配置为延迟模式](https://docs.marimo.io/guides/configuration/runtime_configuration.html),将受影响的单元格标记为过时而不是自动运行它们。这既能保证程序状态的完整性,又能防止意外执行计算密集型单元格。 | ||
|
|
||
| **同步的UI元素**。与[UI元素](https://docs.marimo.io/guides/interactivity.html)如[滑块](https://docs.marimo.io/api/inputs/slider.html#slider)、[下拉菜单](https://docs.marimo.io/api/inputs/dropdown.html)、[数据框转换器](https://docs.marimo.io/api/inputs/dataframe.html)和[聊天界面](https://docs.marimo.io/api/inputs/chat.html)交互时,使用它们的单元格会自动以最新值重新运行。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" width="700px" /> | ||
|
|
||
| **交互式数据框**。[分页浏览、搜索、过滤和排序](https://docs.marimo.io/guides/working_with_data/dataframes.html)数百万行数据,极速运行,无需编写代码。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-df.gif" width="700px" /> | ||
|
|
||
| **高效运行时**。marimo通过静态分析代码,只运行需要运行的单元格。 | ||
|
|
||
| **动态Markdown和SQL**。使用Markdown创建依赖Python数据的动态文档。或者构建依赖Python值的[SQL](https://docs.marimo.io/guides/working_with_data/sql.html)查询,并针对数据框、数据库、CSV、Google Sheets或其他数据源执行,使用我们内置的SQL引擎将结果作为Python数据框返回。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-sql-cell.png" width="700px" /> | ||
|
|
||
| 即使使用了Markdown或SQL,您的笔记本仍然是纯Python代码。 | ||
|
|
||
| **确定性执行顺序**。笔记本按照基于变量引用而非单元格页面位置的确定性顺序执行。您可以根据想要讲述的故事组织笔记本。 | ||
|
|
||
| **内置包管理**。marimo内置支持所有主要的包管理器,允许您[在导入时安装包](https://docs.marimo.io/guides/editor_features/package_management.html)。marimo甚至可以[序列化包依赖](https://docs.marimo.io/guides/package_management/inlining_dependencies/)到笔记本文件中,并在隔离的venv沙箱中自动安装它们。 | ||
|
|
||
| **功能齐全**。marimo集成了GitHub Copilot、AI助手、Ruff代码格式化、HTML导出、快速代码补全、[VS Code扩展](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)、交互式数据框查看器和[更多](https://docs.marimo.io/guides/editor_features/index.html)便捷功能。 | ||
|
|
||
| ## 快速起步 | ||
|
|
||
| **安装** 在终端运行以下代码: | ||
|
|
||
| ```bash | ||
| pip install marimo # or conda install -c conda-forge marimo | ||
| marimo tutorial intro | ||
| ``` | ||
|
|
||
| 要安装包含额外依赖项的版本(启用SQL单元格、AI补全等功能),运行: | ||
|
|
||
| ```bash | ||
| pip install marimo[recommended] | ||
| ``` | ||
|
|
||
| **创建新的笔记本** | ||
|
|
||
| 使用以下命令创建或编辑笔记本 | ||
|
|
||
| ```bash | ||
| marimo edit | ||
| ``` | ||
|
|
||
| **运行应用** 将笔记本作为Web应用运行,隐藏并锁定Python代码: | ||
|
|
||
| ```bash | ||
| marimo run your_notebook.py | ||
| ``` | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-model-comparison.gif" style="border-radius: 8px" width="450px" /> | ||
|
|
||
| **作为脚本执行** 在命令行中将笔记本作为脚本执行: | ||
|
|
||
| ```bash | ||
| python your_notebook.py | ||
| ``` | ||
|
|
||
| **自动转换已有的 Jupyter 笔记本** 通过命令行将 Jupyter 笔记本自动转换为 marimo 格式的笔记本 | ||
|
|
||
| ```bash | ||
| marimo convert your_notebook.ipynb > your_notebook.py | ||
| ``` | ||
|
|
||
| 对此,我们也有[在线工具](https://marimo.io/convert)可供使用。 | ||
|
|
||
| **教程** | ||
| 列出所有的可用教程: | ||
|
|
||
| ```bash | ||
| marimo tutorial --help | ||
| ``` | ||
|
|
||
| ## 如果你有一些问题? | ||
|
|
||
| 请参阅我们文档中的[FAQ](https://docs.marimo.io/faq.html)部分。 | ||
|
|
||
| ## 更多信息 | ||
|
|
||
| Marimo 很容易上手,为高级用户提供了很大的空间。 例如,这是一个用 marimo 制作的 embedding 可视化工具 | ||
| ([示例视频](https://marimo.io/videos/landing/full.mp4)): | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/embedding.gif" width="700px" /> | ||
|
|
||
| 查看我们的[文档](https://docs.marimo.io)、 | ||
| [使用示例](https://docs.marimo.io/examples/)和[展示廊](https://marimo.io/gallery)了解更多。 | ||
|
|
||
| <table border="0"> | ||
| <tr> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> | ||
| <img src="https://docs.marimo.io/_static/reactive.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-intro.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/outputs.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> 教程 </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> 输入控件 </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> 绘图 </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> 布局 </a> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/c7h6pz"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/0ue871"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/lxp1jk"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/14ovyr"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
|
|
||
| ## 贡献 | ||
|
|
||
| 我们感谢所有人的贡献! 这是为所有人设计的工具,我们真挚的欢迎任何人的任何意见! | ||
| 请参阅[CONTRIBUTING.md](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md) 获取更多信息,了解如何参与到这个项目中来。 | ||
|
|
||
| > 有问题?请[在Discord上联系我们](https://marimo.io/discord?ref=readme)。 | ||
|
|
||
| ## 社区 | ||
|
|
||
| 我们也正在建设 marimo 社区,来和我们一起玩吧! | ||
|
|
||
| - 🌟 [在GitHub上为我们点赞](https://github.com/marimo-team/marimo) | ||
| - 💬 [在Discord上与我们交流](https://marimo.io/discord?ref=readme) | ||
| - 📧 [订阅我们的通讯](https://marimo.io/newsletter) | ||
| - ☁️ [加入我们的云服务候补名单](https://marimo.io/cloud) | ||
| - ✏️ [在GitHub上开始讨论](https://github.com/marimo-team/marimo/discussions) | ||
| - 🦋 [在Bluesky上关注我们](https://bsky.app/profile/marimo.io) | ||
| - 🐦 [在Twitter上关注我们](https://twitter.com/marimo_io) | ||
| - 🎥 [在YouTube上订阅](https://www.youtube.com/@marimo-team) | ||
| - 🕴️ [在LinkedIn上关注我们](https://www.linkedin.com/company/marimo-io) | ||
|
|
||
| ## 愿景 ✨ | ||
|
|
||
| marimo 是对 Python 笔记本的**重塑**,它是一个可复制、可交互、可共享的 Python 程序,而不是容易出错的 JSON 便笺。 | ||
|
|
||
| 我们相信,我们使用的工具会影响我们的思维方式--更好的工具,造就更好的思维。我们希望通过 marimo 为 Python 社区提供一个更好的编程环境,以便进行研究和交流;进行代码实验和分享;学习计算科学和教授计算科学。 | ||
|
|
||
| 我们的灵感来自于很多已有的项目, 特别是 | ||
| [Pluto.jl](https://github.com/fonsp/Pluto.jl), | ||
| [ObservableHQ](https://observablehq.com/tutorials),和 | ||
| [Bret Victor's essays](http://worrydream.com/)。 | ||
| marimo 是向响应式数据流编程迈进的一大步。从 | ||
| [IPyflow](https://github.com/ipyflow/ipyflow),[streamlit](https://github.com/streamlit/streamlit), | ||
| [TensorFlow](https://github.com/tensorflow/tensorflow), | ||
| [PyTorch](https://github.com/pytorch/pytorch/tree/main), | ||
| [JAX](https://github.com/google/jax),到 | ||
| [React](https://github.com/facebook/react),函数式、声明式和响应式编程的理念正在改善一系列工具。 | ||
|
|
||
| <p align="right"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-horizontal.png" height="200px"> | ||
| </p> |
There was a problem hiding this comment.
Critical accessibility issue: All images lack alt text.
This Simplified Chinese README contains 21 images without alt text, violating WCAG accessibility standards.
Add descriptive alt attributes:
-<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg">
+<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg" alt="marimo标志">Apply to all images at lines 2, 30, 31, 35, 69, 77, 81, 87, 126, 158, 167, 172, 177, 182, 203, 208, 213, 218, 263.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <p align="center"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg"> | |
| </p> | |
| <p align="center"> | |
| <em>这是一款响应式的Python笔记本,具有优秀的可复现性,原生支持Git,并可作为脚本或应用程序部署。</em> | |
| </p> | |
| <p align="center"> | |
| <a href="https://docs.marimo.io" target="_blank"><strong>用户手册</strong></a> · | |
| <a href="https://marimo.io/discord?ref=readme" target="_blank"><strong>Discord 社区</strong></a> · | |
| <a href="https://docs.marimo.io/examples/" target="_blank"><strong>示例</strong></a> · | |
| <a href="https://marimo.io/gallery/" target="_blank"><strong>展示廊</strong></a> · | |
| <a href="https://www.youtube.com/@marimo-team/" target="_blank"><strong>YouTube</strong></a> | |
| </p> | |
| <p align="center"> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/README.md" target="_blank"><b>English</b></a> | |
| <b> | </b> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Traditional_Chinese.md" target="_blank"><b>繁體中文</b></a> | |
| <b> | </b> | |
| <b>简体中文</b> | |
| <b> | </b> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Japanese.md" target="_blank"><b>日本語</b></a> | |
| <b> | </b> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Spanish.md" target="_blank"><b>Español</b></a> | |
| </p> | |
| <p align="center"> | |
| <a href="https://pypi.org/project/marimo/"><img src="https://img.shields.io/pypi/v/marimo?color=%2334D058&label=pypi"/></a> | |
| <a href="https://anaconda.org/conda-forge/marimo"><img src="https://img.shields.io/conda/vn/conda-forge/marimo.svg"/></a> | |
| <a href="https://marimo.io/discord?ref=readme"><img src="https://shields.io/discord/1059888774789730424" alt="discord"/></a> | |
| <img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/marimo?label=pypi%20%7C%20downloads"/> | |
| <img alt="Conda Downloads" src="https://img.shields.io/conda/d/conda-forge/marimo"/> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/marimo"/></a> | |
| </p> | |
| **Marimo** 是一款响应式 Python 笔记本:运行单元格可与 UI 元素交互,marimo 会自动更新依赖于它的单元格(或将其<a href="#expensive-notebooks">标记为过时单元格</a>),从而保持代码和输出的一致性。**marimo** 笔记本以纯 Python 格式存储,可作为脚本执行,也可作为应用程序部署。 | |
| **为什么选择 marimo** | |
| - 🚀 **功能齐全**:替代 `jupyter`、`streamlit`、`jupytext`、`ipywidgets`、`papermill` 等更多工具 | |
| - ⚡️ **响应式**:运行一个单元格,marimo会响应式地[运行所有依赖单元格](https://docs.marimo.io/guides/reactivity.html)或<a href="#expensive-notebooks">将它们标记为过时</a> | |
| - 🖐️ **交互性**:[绑定滑块、表格、图表等UI元素](https://docs.marimo.io/guides/interactivity.html)到Python代码——无需回调函数 | |
| - 🐍 **支持Git版本控制**:笔记本以`.py`文件格式存储 | |
| - 🛢️ **为数据设计**:使用[SQL](https://docs.marimo.io/guides/working_with_data/sql.html)查询数据框和数据库,过滤和搜索[数据框](https://docs.marimo.io/guides/working_with_data/dataframes.html) | |
| - 🔬 **可复现**:[无隐藏状态](https://docs.marimo.io/guides/reactivity.html#no-hidden-state),确定性执行,[内置包管理](https://docs.marimo.io/guides/editor_features/package_management.html) | |
| - 🏃 **可执行**:[作为Python脚本执行](https://docs.marimo.io/guides/scripts.html),通过命令行参数进行配置 | |
| - 🛜 **可分享**:[部署为交互式Web应用](https://docs.marimo.io/guides/apps.html)或[幻灯片](https://docs.marimo.io/guides/apps.html#slides-layout),[通过WASM在浏览器中运行](https://docs.marimo.io/guides/wasm.html) | |
| - 🧩 **可复用:** 可从一个笔记本[导入函数和类](https://docs.marimo.io/guides/reusing_functions/)到另一个笔记本 | |
| - 🧪 **便于测试:** 可在笔记本上运行 [pytest](https://docs.marimo.io/guides/testing/) | |
| - ⌨️ **现代编辑器**:[GitHub Copilot](https://docs.marimo.io/guides/editor_features/ai_completion.html#github-copilot)、[AI助手](https://docs.marimo.io/guides/editor_features/ai_completion.html#using-ollama)、vim快捷键、变量浏览器和[更多功能](https://docs.marimo.io/guides/editor_features/index.html) | |
| ```python | |
| pip install marimo && marimo tutorial intro | |
| ``` | |
| _在我们的[在线体验平台](https://marimo.app/l/c7h6pz)试用marimo,完全在浏览器中运行!_ | |
| _跳转到[快速入门](#快速入门)了解我们的命令行工具。_ | |
| ## 响应式编程环境 | |
| Marimo 确保了您的代码、输出和程序的状态始的一致性,解决了与 Jupyter 等传统笔记本相关的许多[问题](https://docs.marimo.io/faq.html#faq-problems)。 | |
| **独有的响应式设计** | |
| 运行一个单元格,marimo 就会自动运行引用其变量的单元格,从而避免了手动重新运行单元格这一容易出错的工作。删除单元格,marimo 会从程序内存中删除其变量,消除隐藏状态。 | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/reactive.gif" width="700px" /> | |
| <a name="expensive-notebooks"></a> | |
| **兼容计算密集型笔记本**。marimo允许您[将运行时配置为延迟模式](https://docs.marimo.io/guides/configuration/runtime_configuration.html),将受影响的单元格标记为过时而不是自动运行它们。这既能保证程序状态的完整性,又能防止意外执行计算密集型单元格。 | |
| **同步的UI元素**。与[UI元素](https://docs.marimo.io/guides/interactivity.html)如[滑块](https://docs.marimo.io/api/inputs/slider.html#slider)、[下拉菜单](https://docs.marimo.io/api/inputs/dropdown.html)、[数据框转换器](https://docs.marimo.io/api/inputs/dataframe.html)和[聊天界面](https://docs.marimo.io/api/inputs/chat.html)交互时,使用它们的单元格会自动以最新值重新运行。 | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" width="700px" /> | |
| **交互式数据框**。[分页浏览、搜索、过滤和排序](https://docs.marimo.io/guides/working_with_data/dataframes.html)数百万行数据,极速运行,无需编写代码。 | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-df.gif" width="700px" /> | |
| **高效运行时**。marimo通过静态分析代码,只运行需要运行的单元格。 | |
| **动态Markdown和SQL**。使用Markdown创建依赖Python数据的动态文档。或者构建依赖Python值的[SQL](https://docs.marimo.io/guides/working_with_data/sql.html)查询,并针对数据框、数据库、CSV、Google Sheets或其他数据源执行,使用我们内置的SQL引擎将结果作为Python数据框返回。 | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-sql-cell.png" width="700px" /> | |
| 即使使用了Markdown或SQL,您的笔记本仍然是纯Python代码。 | |
| **确定性执行顺序**。笔记本按照基于变量引用而非单元格页面位置的确定性顺序执行。您可以根据想要讲述的故事组织笔记本。 | |
| **内置包管理**。marimo内置支持所有主要的包管理器,允许您[在导入时安装包](https://docs.marimo.io/guides/editor_features/package_management.html)。marimo甚至可以[序列化包依赖](https://docs.marimo.io/guides/package_management/inlining_dependencies/)到笔记本文件中,并在隔离的venv沙箱中自动安装它们。 | |
| **功能齐全**。marimo集成了GitHub Copilot、AI助手、Ruff代码格式化、HTML导出、快速代码补全、[VS Code扩展](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)、交互式数据框查看器和[更多](https://docs.marimo.io/guides/editor_features/index.html)便捷功能。 | |
| ## 快速起步 | |
| **安装** 在终端运行以下代码: | |
| ```bash | |
| pip install marimo # or conda install -c conda-forge marimo | |
| marimo tutorial intro | |
| ``` | |
| 要安装包含额外依赖项的版本(启用SQL单元格、AI补全等功能),运行: | |
| ```bash | |
| pip install marimo[recommended] | |
| ``` | |
| **创建新的笔记本** | |
| 使用以下命令创建或编辑笔记本 | |
| ```bash | |
| marimo edit | |
| ``` | |
| **运行应用** 将笔记本作为Web应用运行,隐藏并锁定Python代码: | |
| ```bash | |
| marimo run your_notebook.py | |
| ``` | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-model-comparison.gif" style="border-radius: 8px" width="450px" /> | |
| **作为脚本执行** 在命令行中将笔记本作为脚本执行: | |
| ```bash | |
| python your_notebook.py | |
| ``` | |
| **自动转换已有的 Jupyter 笔记本** 通过命令行将 Jupyter 笔记本自动转换为 marimo 格式的笔记本 | |
| ```bash | |
| marimo convert your_notebook.ipynb > your_notebook.py | |
| ``` | |
| 对此,我们也有[在线工具](https://marimo.io/convert)可供使用。 | |
| **教程** | |
| 列出所有的可用教程: | |
| ```bash | |
| marimo tutorial --help | |
| ``` | |
| ## 如果你有一些问题? | |
| 请参阅我们文档中的[FAQ](https://docs.marimo.io/faq.html)部分。 | |
| ## 更多信息 | |
| Marimo 很容易上手,为高级用户提供了很大的空间。 例如,这是一个用 marimo 制作的 embedding 可视化工具 | |
| ([示例视频](https://marimo.io/videos/landing/full.mp4)): | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/embedding.gif" width="700px" /> | |
| 查看我们的[文档](https://docs.marimo.io)、 | |
| [使用示例](https://docs.marimo.io/examples/)和[展示廊](https://marimo.io/gallery)了解更多。 | |
| <table border="0"> | |
| <tr> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> | |
| <img src="https://docs.marimo.io/_static/reactive.gif" style="max-height: 150px; width: auto; display: block" /> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" style="max-height: 150px; width: auto; display: block" /> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-intro.gif" style="max-height: 150px; width: auto; display: block" /> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/outputs.gif" style="max-height: 150px; width: auto; display: block" /> | |
| </a> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> 教程 </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> 输入控件 </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> 绘图 </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> 布局 </a> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <a target="_blank" href="https://marimo.app/l/c7h6pz"> | |
| <img src="https://marimo.io/shield.svg"/> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://marimo.app/l/0ue871"> | |
| <img src="https://marimo.io/shield.svg"/> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://marimo.app/l/lxp1jk"> | |
| <img src="https://marimo.io/shield.svg"/> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://marimo.app/l/14ovyr"> | |
| <img src="https://marimo.io/shield.svg"/> | |
| </a> | |
| </td> | |
| </tr> | |
| </table> | |
| ## 贡献 | |
| 我们感谢所有人的贡献! 这是为所有人设计的工具,我们真挚的欢迎任何人的任何意见! | |
| 请参阅[CONTRIBUTING.md](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md) 获取更多信息,了解如何参与到这个项目中来。 | |
| > 有问题?请[在Discord上联系我们](https://marimo.io/discord?ref=readme)。 | |
| ## 社区 | |
| 我们也正在建设 marimo 社区,来和我们一起玩吧! | |
| - 🌟 [在GitHub上为我们点赞](https://github.com/marimo-team/marimo) | |
| - 💬 [在Discord上与我们交流](https://marimo.io/discord?ref=readme) | |
| - 📧 [订阅我们的通讯](https://marimo.io/newsletter) | |
| - ☁️ [加入我们的云服务候补名单](https://marimo.io/cloud) | |
| - ✏️ [在GitHub上开始讨论](https://github.com/marimo-team/marimo/discussions) | |
| - 🦋 [在Bluesky上关注我们](https://bsky.app/profile/marimo.io) | |
| - 🐦 [在Twitter上关注我们](https://twitter.com/marimo_io) | |
| - 🎥 [在YouTube上订阅](https://www.youtube.com/@marimo-team) | |
| - 🕴️ [在LinkedIn上关注我们](https://www.linkedin.com/company/marimo-io) | |
| ## 愿景 ✨ | |
| marimo 是对 Python 笔记本的**重塑**,它是一个可复制、可交互、可共享的 Python 程序,而不是容易出错的 JSON 便笺。 | |
| 我们相信,我们使用的工具会影响我们的思维方式--更好的工具,造就更好的思维。我们希望通过 marimo 为 Python 社区提供一个更好的编程环境,以便进行研究和交流;进行代码实验和分享;学习计算科学和教授计算科学。 | |
| 我们的灵感来自于很多已有的项目, 特别是 | |
| [Pluto.jl](https://github.com/fonsp/Pluto.jl), | |
| [ObservableHQ](https://observablehq.com/tutorials),和 | |
| [Bret Victor's essays](http://worrydream.com/)。 | |
| marimo 是向响应式数据流编程迈进的一大步。从 | |
| [IPyflow](https://github.com/ipyflow/ipyflow),[streamlit](https://github.com/streamlit/streamlit), | |
| [TensorFlow](https://github.com/tensorflow/tensorflow), | |
| [PyTorch](https://github.com/pytorch/pytorch/tree/main), | |
| [JAX](https://github.com/google/jax),到 | |
| [React](https://github.com/facebook/react),函数式、声明式和响应式编程的理念正在改善一系列工具。 | |
| <p align="right"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-horizontal.png" height="200px"> | |
| </p> | |
| <p align="center"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg" alt="marimo标志"> | |
| </p> |
🧰 Tools
🪛 LanguageTool
[uncategorized] ~50-~50: “个”不能与“笔记本”搭配,可改为:""一本"笔记本"
Context: ...mo.io/guides/wasm.html) - 🧩 可复用: 可从一个笔记本[导入函数和类](https://docs.marimo.io/guide...
(wa5)
[uncategorized] ~95-~95: 您的意思是“"不"全”?
Context: ...itHub Copilot、AI助手、Ruff代码格式化、HTML导出、快速代码补全、[VS Code扩展](https://marketplace.visual...
(BU)
[uncategorized] ~106-~106: 您的意思是“"不"全”?
Context: ...ial intro 要安装包含额外依赖项的版本(启用SQL单元格、AI补全等功能),运行: bash pip install marimo[re...
(BU)
[uncategorized] ~226-~226: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:真挚"地"欢迎
Context: ...le> ## 贡献 我们感谢所有人的贡献! 这是为所有人设计的工具,我们真挚的欢迎任何人的任何意见! 请参阅[CONTRIBUTING.md](https:/...
(wb4)
🪛 markdownlint-cli2 (0.18.1)
2-2: Images should have alternate text (alt text)
(MD045, no-alt-text)
30-30: Images should have alternate text (alt text)
(MD045, no-alt-text)
31-31: Images should have alternate text (alt text)
(MD045, no-alt-text)
35-35: Images should have alternate text (alt text)
(MD045, no-alt-text)
40-40: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
60-60: Link fragments should be valid
(MD051, link-fragments)
69-69: Images should have alternate text (alt text)
(MD045, no-alt-text)
77-77: Images should have alternate text (alt text)
(MD045, no-alt-text)
81-81: Images should have alternate text (alt text)
(MD045, no-alt-text)
87-87: Images should have alternate text (alt text)
(MD045, no-alt-text)
112-112: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
126-126: Images should have alternate text (alt text)
(MD045, no-alt-text)
158-158: Images should have alternate text (alt text)
(MD045, no-alt-text)
167-167: Images should have alternate text (alt text)
(MD045, no-alt-text)
172-172: Images should have alternate text (alt text)
(MD045, no-alt-text)
177-177: Images should have alternate text (alt text)
(MD045, no-alt-text)
182-182: Images should have alternate text (alt text)
(MD045, no-alt-text)
203-203: Images should have alternate text (alt text)
(MD045, no-alt-text)
208-208: Images should have alternate text (alt text)
(MD045, no-alt-text)
213-213: Images should have alternate text (alt text)
(MD045, no-alt-text)
218-218: Images should have alternate text (alt text)
(MD045, no-alt-text)
263-263: Images should have alternate text (alt text)
(MD045, no-alt-text)
🤖 Prompt for AI Agents
In marimo/README_Chinese.md (images at lines 2, 30, 31, 35, 69, 77, 81, 87, 126,
158, 167, 172, 177, 182, 203, 208, 213, 218, 263): every <img> is missing an alt
attribute; add concise, descriptive alt text for each image (e.g., "Marimo
logotype", "marimo UI animated demo showing reactive cell updates", "PyPI
version badge", "interactive dataframe demo gif", "embedding visualization gif",
etc.), and for purely decorative images use alt="" to mark them decorative;
ensure alt text is meaningful, short, and matches the image content.
| <p align="center"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg"> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <em>再現性が高く、Git対応で、スクリプトやアプリとして展開できるリアクティブなPythonノートブック。</em> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://docs.marimo.io" target="_blank"><strong>ドキュメント</strong></a> · | ||
| <a href="https://marimo.io/discord?ref=readme" target="_blank"><strong>Discord</strong></a> · | ||
| <a href="https://docs.marimo.io/examples/" target="_blank"><strong>サンプル</strong></a> · | ||
| <a href="https://marimo.io/gallery/" target="_blank"><strong>ギャラリー</strong></a> · | ||
| <a href="https://www.youtube.com/@marimo-team/" target="_blank"><strong>YouTube</strong></a> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README.md" target="_blank"><b>English</b></a> | ||
| <b> | </b> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Traditional_Chinese.md" target="_blank"><b>繁體中文</b></a> | ||
| <b> | </b> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Chinese.md" target="_blank"><b>简体中文</b></a> | ||
| <b> | </b> | ||
| <b>日本語</b> | ||
| <b> | </b> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Spanish.md" target="_blank"><b>Español</b></a> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://pypi.org/project/marimo/"><img src="https://img.shields.io/pypi/v/marimo?color=%2334D058&label=pypi"/></a> | ||
| <a href="https://anaconda.org/conda-forge/marimo"><img src="https://img.shields.io/conda/vn/conda-forge/marimo.svg"/></a> | ||
| <a href="https://marimo.io/discord?ref=readme"><img src="https://shields.io/discord/1059888774789730424" alt="discord"/></a> | ||
| <img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/marimo?label=pypi%20%7C%20downloads"/> | ||
| <img alt="Conda Downloads" src="https://img.shields.io/conda/d/conda-forge/marimo"/> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/marimo"/></a> | ||
| </p> | ||
|
|
||
| **marimo**はリアクティブなPythonノートブックです:セルを実行したりUI要素を操作すると、marimoは自動的に依存するセルを実行(または<a href="#expensive-notebooks">それらを古いものとしてマーク</a>)し、コードと出力の一貫性を保ちます。marimoノートブックは純粋なPythonとして保存され、スクリプトとして実行でき、アプリとして展開できます。 | ||
|
|
||
| **主な特徴** | ||
|
|
||
| - 🚀 **すぐに使える充実機能**: `jupyter`、`streamlit`、`jupytext`、`ipywidgets`、`papermill`などの代替 | ||
| - ⚡️ **リアクティブ**: セルを実行すると、marimoはリアクティブに[すべての依存セルを実行](https://docs.marimo.io/guides/reactivity.html)するか、<a href="#expensive-notebooks">それらを古いものとしてマーク</a> | ||
| - 🖐️ **インタラクティブ**: [スライダー、テーブル、プロットなど](https://docs.marimo.io/guides/interactivity.html)をPythonにバインド — コールバック不要 | ||
| - 🔬 **再現性**: [隠れた状態なし](https://docs.marimo.io/guides/reactivity.html#no-hidden-state)、決定論的実行、[組み込みパッケージ管理](https://docs.marimo.io/guides/editor_features/package_management.html) | ||
| - 🏃 **実行可能**: [Pythonスクリプトとして実行](https://docs.marimo.io/guides/scripts.html)、CLIの引数によるパラメータ化 | ||
| - 🛜 **共有可能**: [インタラクティブなWebアプリとして展開](https://docs.marimo.io/guides/apps.html)または[スライド](https://docs.marimo.io/guides/apps.html#slides-layout)、[ブラウザでWASM経由で実行](https://docs.marimo.io/guides/wasm.html) | ||
| - 🛢️ **データ向け設計**: [SQL](https://docs.marimo.io/guides/working_with_data/sql.html)でデータフレームやデータベースをクエリ、[データフレーム](https://docs.marimo.io/guides/working_with_data/dataframes.html)のフィルタリングと検索 | ||
| - 🐍 **Git対応**: ノートブックは`.py`ファイルとして保存 | ||
| - ⌨️ **モダンなエディタ**: [GitHub Copilot](https://docs.marimo.io/guides/editor_features/ai_completion.html#github-copilot)、[AIアシスタント](https://docs.marimo.io/guides/editor_features/ai_completion.html#using-ollama)、vimキーバインディング、変数エクスプローラー、[その他](https://docs.marimo.io/guides/editor_features/index.html) | ||
|
|
||
| ```python | ||
| pip install marimo && marimo tutorial intro | ||
| ``` | ||
|
|
||
| _[オンラインプレイグラウンド](https://marimo.app/l/c7h6pz)でmarimoを試してみてください。完全にブラウザ内で動作します!_ | ||
|
|
||
| _CLIの基本的な使い方については[クイックスタート](#クイックスタート)をご覧ください。_ | ||
|
|
||
| ## リアクティブなプログラミング環境 | ||
|
|
||
| marimoはノートブックのコード、出力、プログラムの状態の一貫性を保証します。これにより、Jupyterのような従来のノートブックに関連する[多くの問題](https://docs.marimo.io/faq.html#faq-problems)を解決します。 | ||
|
|
||
| **リアクティブなプログラミング環境** | ||
| セルを実行すると、marimoは_リアクト_し、その変数を参照するセルを自動的に実行することで、手動でセルを再実行するというエラーが起きやすいタスクを排除します。セルを削除すると、marimoはその変数をプログラムのメモリから削除し、隠れた状態を排除します。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/reactive.gif" width="700px" /> | ||
|
|
||
| <a name="expensive-notebooks"></a> | ||
|
|
||
| **計算コストの高いノートブックとの互換性** marimoでは、[ランタイムを遅延評価に設定](https://docs.marimo.io/guides/configuration/runtime_configuration.html)することができ、影響を受けるセルを自動的に実行する代わりに古いものとしてマークします。これにより、プログラムの状態に関する保証を提供しながら、コストの高いセルの偶発的な実行を防ぎます。 | ||
|
|
||
| **同期されたUI要素** [スライダー](https://docs.marimo.io/api/inputs/slider.html#slider)、[ドロップダウン](https://docs.marimo.io/api/inputs/dropdown.html)、[データフレーム変換](https://docs.marimo.io/api/inputs/dataframe.html)、[チャットインターフェース](https://docs.marimo.io/api/inputs/chat.html)などの[UI要素](https://docs.marimo.io/guides/interactivity.html)を操作すると、それらを使用するセルが自動的に最新の値で再実行されます。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" width="700px" /> | ||
|
|
||
| **インタラクティブなデータフレーム** 何百万行ものデータを[ページング、検索、フィルタリング、ソート](https://docs.marimo.io/guides/working_with_data/dataframes.html)を、コード不要で驚くほど高速に実行できます。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-df.gif" width="700px" /> | ||
|
|
||
| **高性能ランタイム** marimoはコードを静的に分析することで、実行が必要なセルのみを実行します。 | ||
|
|
||
| **動的なマークダウンとSQL** マークダウンを使用して、Pythonデータに依存する動的なストーリーを作成できます。または、Pythonの値に依存する[SQL](https://docs.marimo.io/guides/working_with_data/sql.html)クエリを構築し、データフレーム、データベース、CSV、Google Sheets、またはその他のものに対して実行できます。組み込みのSQLエンジンを使用すると、結果がPythonのデータフレームとして返されます。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-sql-cell.png" width="700px" /> | ||
|
|
||
| マークダウンやSQLを使用しても、ノートブックは純粋なPythonのままです。 | ||
|
|
||
| **決定論的な実行順序** ノートブックは、セルのページ上の位置ではなく、変数の参照に基づいて決定論的な順序で実行されます。伝えたいストーリーに最適な方法でノートブックを整理できます。 | ||
|
|
||
| **組み込みパッケージ管理** marimoには主要なパッケージマネージャーのサポートが組み込まれており、[インポート時にパッケージをインストール](https://docs.marimo.io/guides/editor_features/package_management.html)できます。marimoは[パッケージの要件をシリアル化](https://docs.marimo.io/guides/package_management/inlining_dependencies/)してノートブックファイルに保存し、隔離されたvenv環境に自動的にインストールすることもできます。 | ||
|
|
||
| **必要な機能がすべて揃っている** marimoにはGitHub Copilot、AIアシスタント、Ruffコードフォーマット、HTML出力、高速コード補完、[VS Code拡張機能](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)、インタラクティブなデータフレームビューワー、[その他多くの](https://docs.marimo.io/guides/editor_features/index.html)便利な機能が含まれています。 | ||
|
|
||
| ## クイックスタート | ||
|
|
||
| **インストール** ターミナルで次を実行します: | ||
|
|
||
| ```bash | ||
| pip install marimo # または conda install -c conda-forge marimo | ||
| marimo tutorial intro | ||
| ``` | ||
|
|
||
| SQL セル、AI 補完などの追加機能を含めてインストールするには、次を実行します: | ||
|
|
||
| ```bash | ||
| pip install marimo[recommended] | ||
| ``` | ||
|
|
||
| **ノートブックの作成** | ||
|
|
||
| 次のコマンドでノートブックを作成または編集します: | ||
|
|
||
| ```bash | ||
| marimo edit | ||
| ``` | ||
|
|
||
| **アプリの実行** ノートブックをウェブアプリとして実行し、Pythonコードを非表示かつ編集不可にします: | ||
|
|
||
| ```bash | ||
| marimo run your_notebook.py | ||
| ``` | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-model-comparison.gif" style="border-radius: 8px" width="450px" /> | ||
|
|
||
| **スクリプトとして実行** ノートブックをコマンドラインでスクリプトとして実行します: | ||
|
|
||
| ```bash | ||
| python your_notebook.py | ||
| ``` | ||
|
|
||
| **Jupyterノートブックの自動変換** CLIを使用してJupyterノートブックをmarimoノートブックに自動変換します: | ||
|
|
||
| ```bash | ||
| marimo convert your_notebook.ipynb > your_notebook.py | ||
| ``` | ||
|
|
||
| または[ウェブインターフェース](https://marimo.io/convert)を使用します。 | ||
|
|
||
| **チュートリアル** | ||
| すべてのチュートリアルをリストします: | ||
|
|
||
| ```bash | ||
| marimo tutorial --help | ||
| ``` | ||
|
|
||
| ## 質問がありますか? | ||
|
|
||
| [FAQ](https://docs.marimo.io/faq.html)をご覧ください。 | ||
|
|
||
| ## もっと詳しく | ||
|
|
||
| marimoは簡単に始められ、パワーユーザー向けの多くの機能があります。 | ||
| 例えば、marimoで作成された埋め込み可視化ツールです | ||
| ([動画](https://marimo.io/videos/landing/full.mp4)): | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/embedding.gif" width="700px" /> | ||
|
|
||
| 詳細については、[ドキュメント](https://docs.marimo.io)、[使用例](https://docs.marimo.io/examples/)、[ギャラリー](https://marimo.io/gallery)をご覧ください。 | ||
|
|
||
| <table border="0"> | ||
| <tr> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> | ||
| <img src="https://docs.marimo.io/_static/reactive.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-intro.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/outputs.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> チュートリアル </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> 入力 </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> プロット </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> レイアウト </a> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/c7h6pz"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/0ue871"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/lxp1jk"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/14ovyr"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
|
|
||
| ## コントリビューション | ||
|
|
||
| すべての貢献を歓迎します!専門家である必要はありません。 | ||
| 開始方法の詳細については、[CONTRIBUTING.md](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md)をご覧ください。 | ||
|
|
||
| > 質問がありますか?[Discord](https://marimo.io/discord?ref=readme)でお問い合わせください。 | ||
|
|
||
| ## コミュニティ | ||
|
|
||
| コミュニティを構築中です。ぜひ参加してください! | ||
|
|
||
| - 🌟 [GitHubでスターをつける](https://github.com/marimo-team/marimo) | ||
| - 💬 [Discordでチャット](https://marimo.io/discord?ref=readme) | ||
| - 📧 [ニュースレターを購読](https://marimo.io/newsletter) | ||
| - ☁️ [クラウドウェイトリストに参加](https://marimo.io/cloud) | ||
| - ✏️ [GitHubでディスカッションを開始](https://github.com/marimo-team/marimo/discussions) | ||
| - 🦋 [Blueskyでフォロー](https://bsky.app/profile/marimo.io) | ||
| - 🐦 [Twitterでフォロー](https://twitter.com/marimo_io) | ||
| - 🎥 [YouTubeで購読](https://www.youtube.com/@marimo-team) | ||
| - 🕴️ [LinkedInでフォロー](https://www.linkedin.com/company/marimo-io) | ||
|
|
||
| ## インスピレーション ✨ | ||
|
|
||
| marimoは、エラーが発生しやすいJSONのスクラッチパッドではなく、再現性が高く、インタラクティブで、共有可能なPythonプログラムとしてのPythonノートブックの**再発明**です。 | ||
|
|
||
| 私たちは、使用するツールが私たちの思考方法を形作ると信じています—より良いツールが、より良い思考をもたらします。marimoを通じて、研究を行い、それを伝えるため、コードを実験し、それを共有するため、計算科学を学び、それを教えるために、Pythonコミュニティにより良いプログラミング環境を提供したいと考えています。 | ||
|
|
||
| 私たちのインスピレーションは多くの場所やプロジェクト、特に[Pluto.jl](https://github.com/fonsp/Pluto.jl)、[ObservableHQ](https://observablehq.com/tutorials)、[Bret Victorのエッセイ](http://worrydream.com/)から来ています。marimoはリアクティブなデータフロープログラミングへの大きな動きの一部です。[IPyflow](https://github.com/ipyflow/ipyflow)、[streamlit](https://github.com/streamlit/streamlit)、[TensorFlow](https://github.com/tensorflow/tensorflow)、[PyTorch](https://github.com/pytorch/pytorch/tree/main)、[JAX](https://github.com/google/jax)、[React](https://github.com/facebook/react)から、関数型、宣言型、リアクティブプログラミングの考え方が広範囲のツールを良い方向に変革しています。 | ||
|
|
||
| <p align="right"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-horizontal.png" height="200px"> | ||
| </p> |
There was a problem hiding this comment.
Critical accessibility issue: All images lack alt text.
This README contains 21 images without alt text, which is a WCAG accessibility violation that prevents screen reader users from understanding the content.
Each <img> tag should include an alt attribute with descriptive text. For example:
-<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg">
+<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg" alt="marimo logo">Apply similar changes to all other images in the document (lines 2, 30, 31, 33, 34, 35, 67, 75, 79, 85, 124, 157, 165, 170, 175, 180, 201, 206, 211, 216, 252).
🧰 Tools
🪛 LanguageTool
[uncategorized] ~71-~71: 「ことができる」という表現は冗長な可能性があります。
Context: ...nfiguration/runtime_configuration.html)することができ、影響を受けるセルを自動的に実行する代わりに古いものとしてマークします。これに...
(DOUSI_KOTOGADEKIRU)
🪛 markdownlint-cli2 (0.18.1)
2-2: Images should have alternate text (alt text)
(MD045, no-alt-text)
30-30: Images should have alternate text (alt text)
(MD045, no-alt-text)
31-31: Images should have alternate text (alt text)
(MD045, no-alt-text)
35-35: Images should have alternate text (alt text)
(MD045, no-alt-text)
40-40: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
67-67: Images should have alternate text (alt text)
(MD045, no-alt-text)
75-75: Images should have alternate text (alt text)
(MD045, no-alt-text)
79-79: Images should have alternate text (alt text)
(MD045, no-alt-text)
85-85: Images should have alternate text (alt text)
(MD045, no-alt-text)
110-110: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
124-124: Images should have alternate text (alt text)
(MD045, no-alt-text)
157-157: Images should have alternate text (alt text)
(MD045, no-alt-text)
165-165: Images should have alternate text (alt text)
(MD045, no-alt-text)
170-170: Images should have alternate text (alt text)
(MD045, no-alt-text)
175-175: Images should have alternate text (alt text)
(MD045, no-alt-text)
180-180: Images should have alternate text (alt text)
(MD045, no-alt-text)
201-201: Images should have alternate text (alt text)
(MD045, no-alt-text)
206-206: Images should have alternate text (alt text)
(MD045, no-alt-text)
211-211: Images should have alternate text (alt text)
(MD045, no-alt-text)
216-216: Images should have alternate text (alt text)
(MD045, no-alt-text)
252-252: Images should have alternate text (alt text)
(MD045, no-alt-text)
🤖 Prompt for AI Agents
In marimo/README_Japanese.md around lines 2, 30, 31, 33, 34, 35, 67, 75, 79, 85,
124, 157, 165, 170, 175, 180, 201, 206, 211, 216, and 252: every <img> tag is
missing an alt attribute (WCAG violation). For each image add a meaningful
alt="..." that succinctly describes the image content or purpose (e.g., "marimo
logotype", "reactivity demo gif", "interactive UI demo", "embedding
visualization gif", "shield badge", etc.); for purely decorative images use
alt="" (empty string) to hide them from screen readers. Ensure each added alt
text is brief, descriptive, and matches the image shown.
| <p align="center"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg"> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <em>Un cuaderno (notebook) de Python reactivo que es reproducible, compatible con Git y desplegable como scripts o aplicaciones.</em> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://docs.marimo.io" target="_blank"><strong>Documentos</strong></a> · | ||
| <a href="https://marimo.io/discord?ref=readme" target="_blank"><strong>Discord</strong></a> · | ||
| <a href="https://docs.marimo.io/examples/" target="_blank"><strong>Ejemplos</strong></a> · | ||
| <a href="https://marimo.io/gallery/" target="_blank"><strong>Galería</strong></a> · | ||
| <a href="https://www.youtube.com/@marimo-team/" target="_blank"><strong>YouTube</strong></a> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README.md" target="_blank"><b>English</b></a> | ||
| <b> | </b> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Traditional_Chinese.md" target="_blank"><b>繁體中文</b></a> | ||
| <b> | </b> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Chinese.md" target="_blank"><b>简体中文</b></a> | ||
| <b> | </b> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Japanese.md" target="_blank"><b>日本語</b></a> | ||
| <b> | </b> | ||
| <b>Español</b> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://pypi.org/project/marimo/"><img src="https://img.shields.io/pypi/v/marimo?color=%2334D058&label=pypi"/></a> | ||
| <a href="https://anaconda.org/conda-forge/marimo"><img src="https://img.shields.io/conda/vn/conda-forge/marimo.svg"/></a> | ||
| <a href="https://marimo.io/discord?ref=readme"><img src="https://shields.io/discord/1059888774789730424" alt="discord"/></a> | ||
| <img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/marimo?label=pypi%20%7C%20downloads"/> | ||
| <img alt="Conda Downloads" src="https://img.shields.io/conda/d/conda-forge/marimo"/> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/marimo"/></a> | ||
| </p> | ||
|
|
||
| **marimo** es un cuaderno (notebook) de Python: ejecuta una celda o interactúa con un elemento de la interfaz de usuario y marimo ejecuta automáticamente las celdas dependientes (o <a href="#expensive-notebooks">las marca como desactualizadas</a>), manteniendo el código y los resultados consistentes. Los cuadernos (notebooks) de marimo se almacenan como código Python puro, ejecutables como scripts y desplegables como aplicaciones. | ||
|
|
||
| **Puntos Destacados**. | ||
|
|
||
| - 🚀 **baterías incluidas:** reemplaza `jupyter`, `streamlit`, `jupytext`, `ipywidgets`, `papermill` y más | ||
| - ⚡️ **reactive**: ejecuta una celda y marimo reactivamente [ejecuta las celdas dependientes](https://docs.marimo.io/guides/reactivity.html) o <a href="#expensive-notebooks">las marca como desactualizadas</a> | ||
| - 🖐️ **interaction:** [vincula deslizadores, tablas, gráficas y más](https://docs.marimo.io/guides/interactivity.html) a Python — sin "callbacks" requeridos | ||
| - 🔬 **reproducible:** [sin estado oculto](https://docs.marimo.io/guides/reactivity.html#no-hidden-state), ejecución determinística, [gestión de paquetes integrada](https://docs.marimo.io/guides/editor_features/package_management.html) | ||
| - 🏃 **ejecutable:** [se ejecuta como script de Python](https://docs.marimo.io/guides/scripts.html), parametrizable mediante arguments de la línea de commandos (CLI) | ||
| - 🛜 **compartible**: [se despliega como una aplicación web interactiva](https://docs.marimo.io/guides/apps.html) o [diapositivas](https://docs.marimo.io/guides/apps.html#slides-layout), [ejecutar en navegador via WASM](https://docs.marimo.io/guides/wasm.html) | ||
| - 🛢️ **diseñado para datos**: consulta marcos de datos y bases de datos [con SQL](https://docs.marimo.io/guides/working_with_data/sql.html), filtrar y buscar [marcos de datos](https://docs.marimo.io/guides/working_with_data/dataframes.html) | ||
| - 🐍 **compatible con git:** cuadernos (notebooks) son almacenados como archivos `.py` | ||
| - ⌨️ **un editor moderno**: [GitHub Copilot](https://docs.marimo.io/guides/editor_features/ai_completion.html#github-copilot), [asistentes IA](https://docs.marimo.io/guides/editor_features/ai_completion.html#using-ollama), atajos de teclado de vim, explorador de variables y [más](https://docs.marimo.io/guides/editor_features/index.html) | ||
|
|
||
| ```python | ||
| pip install marimo && marimo tutorial intro | ||
| ``` | ||
|
|
||
| _¡Prueba marimo en [nuestro entorno de pruebas](https://marimo.app/l/c7h6pz), se ejecuta completamente en el navegador!_ | ||
|
|
||
| _[Inicia rápido](#quickstart) para una introducción sobre nuestro CLI._ | ||
|
|
||
| ## Un entorno de programación reactivo | ||
|
|
||
| marimo garantiza que el código de tu notebook, los resultados y el estado del program sean consistentes. Esto [resuelve muchos problems](https://docs.marimo.io/faq.html#faq-problems) asociados con notebooks tradicionales como Jupyter. | ||
|
|
||
| **Un entorno de programación reactivo.** | ||
| Ejecuta una celda y marimo reacciona ejecutando automáticamente las celdas que referencian sus variables, eliminando la tarea propensa a errores de volver a ejecutar celdas manualmente. Elimina una celda y marimo borra sus variables de la memoria del program, eliminando el estado oculto. | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/reactive.gif" width="700px" /> | ||
|
|
||
| <a name="expensive-notebooks"></a> | ||
|
|
||
| **Compatible con cuadernos (notebooks) pesados.** marimo te permite [configurar el runtime | ||
| para que sea | ||
| lazy](https://docs.marimo.io/guides/configuration/runtime_configuration.html), | ||
| marcando las celdas afectadas como obsoletas en lugar de ejecutarlas automáticamente. Esto te da garantías sobre el estado del program mientras previene la ejecución accidental de celdas costosas. | ||
|
|
||
| **Elementos UI sincronizados.** Interactúa con [ | ||
| elementos UI](https://docs.marimo.io/guides/interactivity.html) como [sliders](https://docs.marimo.io/api/inputs/slider.html#slider), | ||
| [dropdowns](https://docs.marimo.io/api/inputs/dropdown.html), [transformadores de dataframes](https://docs.marimo.io/api/inputs/dataframe.html), e [ | ||
| interfaces de chat](https://docs.marimo.io/api/inputs/chat.html), y las celdas que los usan se vuelven a ejecutar automáticamente con sus valores más recientes. | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" width="700px" /> | ||
|
|
||
| **Marcos de datos interactivos.** [Navega, busca, filtra, y | ||
| ordena](https://docs.marimo.io/guides/working_with_data/dataframes.html) | ||
| millones de filas increíblemente rápido, sin necesidad de codigo. | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-df.gif" width="700px" /> | ||
|
|
||
| **Tiempo de ejecución eficiente.** marimo ejecuta solo las celdas que necesitan set ejecutadas analizando estáticamente tu código. | ||
|
|
||
| **Markdown dinámico y SQL.** Usa markdown para contar historias dinámicas que dependen de | ||
| datos de Python. O construye consultas [SQL](https://docs.marimo.io/guides/working_with_data/sql.html) | ||
| que dependen de valores de Python y ejecútalas contra dataframes, bases de datos, CSVs, Google Sheets, o cualquier otra cosa usando nuestro motor SQL integrado, que devuelve el resultado como un dataframe de Python. | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-sql-cell.png" width="700px" /> | ||
|
|
||
| Tus notebooks siguen siendo Python puro, incluso si usan markdown o SQL. | ||
|
|
||
| **Orden de ejecución determinístico.** Los notebooks se ejecutan en un orden determinístico, basado en referencias de variables en lugar de las posiciones de las celdas en la página. | ||
| Organiza tus notebooks para que se ajusten mejor a las historias que quieres contar. | ||
|
|
||
| **Gestión de paquetes integrada.** marimo tiene soporte integrado para todos los gestores de paquetes principles, permitiéndote [instalar paquetes al importarlos](https://docs.marimo.io/guides/editor_features/package_management.html). marimo puede incluso | ||
| [serializar los requisitos de paquetes](https://docs.marimo.io/guides/package_management/inlining_dependencies/) | ||
| en archivos de notebook, e instalarlos automáticamente en sandboxes venv aislados. | ||
|
|
||
| **Baterías incluidas.** marimo viene con GitHub Copilot, asistentes de IA, formateo de código con Ruff, exportación HTML, autocompletado rápido, una [extensión de VS Code](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo), | ||
| un visor interaction de dataframes, y [muchas más](https://docs.marimo.io/guides/editor_features/index.html) | ||
| características de calidad de vida. | ||
|
|
||
| ## Inicio rápido | ||
|
|
||
| **Instalación.** En una terminal, ejecuta | ||
|
|
||
| ```bash | ||
| pip install marimo # or conda install -c conda-forge marimo | ||
| marimo tutorial intro | ||
| ``` | ||
|
|
||
| Para instalar con dependencies adicionales que desbloquean celdas SQL, completado con IA y más, ejecuta | ||
|
|
||
| ```bash | ||
| pip install marimo[recommended] | ||
| ``` | ||
|
|
||
| **Crear cuadernos (notebooks).** | ||
|
|
||
| Crea o edita notebooks con | ||
|
|
||
| ```bash | ||
| marimo edit | ||
| ``` | ||
|
|
||
| **Ejecutar aplicaciones.** Ejecuta tu notebook como una aplicación web, con el código Python oculto y no editable: | ||
|
|
||
| ```bash | ||
| marimo run your_notebook.py | ||
| ``` | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-model-comparison.gif" style="border-radius: 8px" width="450px" /> | ||
|
|
||
| **Ejecutar como scripts.** Ejecuta un notebook como un script en la línea de commandos: | ||
|
|
||
| ```bash | ||
| python your_notebook.py | ||
| ``` | ||
|
|
||
| **Convertir cuadernos (notebooks) de Jupyter automáticamente.** Convierte automáticamente notebooks de Jupyter a notebooks de marimo con el CLI: | ||
|
|
||
| ```bash | ||
| marimo convert your_notebook.ipynb > your_notebook.py | ||
| ``` | ||
|
|
||
| o usa nuestra [interfaz web](https://marimo.io/convert). | ||
|
|
||
| **Tutorials.** | ||
| Lista de todos los tutorials: | ||
|
|
||
| ```bash | ||
| marimo tutorial --help | ||
| ``` | ||
|
|
||
| ## ¿Preguntas? | ||
|
|
||
| Consulta las [FAQ](https://docs.marimo.io/faq.html) en nuestra documentation. | ||
|
|
||
| ## Aprende más | ||
|
|
||
| marimo es fácil para empezar, con mucho espacio para usuarios avanzados. Por ejemplo, aquí hay un visualizador de embeddings hecho en marimo | ||
| ([video](https://marimo.io/videos/landing/full.mp4)): | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/embedding.gif" width="700px" /> | ||
|
|
||
| Revisa nuestra [documentation](https://docs.marimo.io), | ||
| la carpeta [`examples/`](examples/), y nuestra [galeria](https://marimo.io/gallery) para aprender mas. | ||
|
|
||
| <table border="0"> | ||
| <tr> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> | ||
| <img src="https://docs.marimo.io/_static/reactive.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-intro.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/outputs.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> Tutorial </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> Inputs </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> Plots </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> Layout </a> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/c7h6pz"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/0ue871"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/lxp1jk"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/14ovyr"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
|
|
||
| ## Contribuir | ||
|
|
||
| ¡Apreciamos todas las contribuciones! No necesitas set un experto para ayudar. Por favor consulta [CONTRIBUTING.md](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md) para más detalles sobre cómo empezar. | ||
|
|
||
| > Dudas? Acércate a nosotros [en Discord](https://marimo.io/discord?ref=readme). | ||
|
|
||
| ## Comunidad | ||
|
|
||
| Estamos construyendo una comunidad. ¡Ven a pasar el rato con nosotros! | ||
|
|
||
| - 🌟 [Star us on GitHub](https://github.com/marimo-team/marimo) | ||
| - 💬 [Chat with us on Discord](https://marimo.io/discord?ref=readme) | ||
| - 📧 [Subscribe to our Newsletter](https://marimo.io/newsletter) | ||
| - ☁️ [Join our Cloud Waitlist](https://marimo.io/cloud) | ||
| - ✏️ [Start a GitHub Discussion](https://github.com/marimo-team/marimo/discussions) | ||
| - 🦋 [Follow us on Bluesky](https://bsky.app/profile/marimo.io) | ||
| - 🐦 [Follow us on Twitter](https://twitter.com/marimo_io) | ||
| - 🎥 [Subscribe on YouTube](https://www.youtube.com/@marimo-team) | ||
| - 🕴️ [Follow us on LinkedIn](https://www.linkedin.com/company/marimo-io) | ||
|
|
||
| ## Inspiración ✨ | ||
|
|
||
| marimo es una **reinvención** de Python como un program Python reproducible, interaction y compartible, en lugar de un bloc de notas JSON propenso a errores. | ||
|
|
||
| Creemos que las herramientas que usamos dan forma a nuestra manera de pensar — mejores herramientas, para mentes mejores. Con marimo, esperamos proporcionar a la comunidad de Python un mejor entorno de programación para hacer investigación y comunicarla; para experimentar con código y compartirlo; para aprender ciencia computational y enseñarla. | ||
|
|
||
| Nuestra inspiración viene de muchos lugares y proyectos, especialmente | ||
| [Pluto.jl](https://github.com/fonsp/Pluto.jl), | ||
| [ObservableHQ](https://observablehq.com/tutorials), y | ||
| [los ensayos de Bret Victor](http://worrydream.com/). marimo es parte de | ||
| un movimiento mayor hacia la programación reactiva de flujo de datos. Desde | ||
| [IPyflow](https://github.com/ipyflow/ipyflow), [streamlit](https://github.com/streamlit/streamlit), | ||
| [TensorFlow](https://github.com/tensorflow/tensorflow), | ||
| [PyTorch](https://github.com/pytorch/pytorch/tree/main), | ||
| [JAX](https://github.com/google/jax), y | ||
| [React](https://github.com/facebook/react), las ideas de programación functional, declarativa y reactiva están transformando una amplia gama de herramientas para mejor. | ||
|
|
||
| <p align="right"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-horizontal.png" height="200px"> | ||
| </p> |
There was a problem hiding this comment.
Critical accessibility issue: All images lack alt text.
This Spanish README contains 21 images without alt text, which is a WCAG accessibility violation.
Add alt attributes to all images:
-<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg">
+<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg" alt="logotipo de marimo">Apply to all images at lines 2, 30, 31, 35, 67, 81, 87, 95, 139, 171, 180, 185, 190, 195, 216, 221, 226, 231, 275.
Additionally: Multiple orthography and grammar issues were flagged by LanguageTool (e.g., "marimo" spelled inconsistently, "program" vs "programa", "set" vs "ser"). Consider native speaker review for translation quality.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <p align="center"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg"> | |
| </p> | |
| <p align="center"> | |
| <em>Un cuaderno (notebook) de Python reactivo que es reproducible, compatible con Git y desplegable como scripts o aplicaciones.</em> | |
| </p> | |
| <p align="center"> | |
| <a href="https://docs.marimo.io" target="_blank"><strong>Documentos</strong></a> · | |
| <a href="https://marimo.io/discord?ref=readme" target="_blank"><strong>Discord</strong></a> · | |
| <a href="https://docs.marimo.io/examples/" target="_blank"><strong>Ejemplos</strong></a> · | |
| <a href="https://marimo.io/gallery/" target="_blank"><strong>Galería</strong></a> · | |
| <a href="https://www.youtube.com/@marimo-team/" target="_blank"><strong>YouTube</strong></a> | |
| </p> | |
| <p align="center"> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/README.md" target="_blank"><b>English</b></a> | |
| <b> | </b> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Traditional_Chinese.md" target="_blank"><b>繁體中文</b></a> | |
| <b> | </b> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Chinese.md" target="_blank"><b>简体中文</b></a> | |
| <b> | </b> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Japanese.md" target="_blank"><b>日本語</b></a> | |
| <b> | </b> | |
| <b>Español</b> | |
| </p> | |
| <p align="center"> | |
| <a href="https://pypi.org/project/marimo/"><img src="https://img.shields.io/pypi/v/marimo?color=%2334D058&label=pypi"/></a> | |
| <a href="https://anaconda.org/conda-forge/marimo"><img src="https://img.shields.io/conda/vn/conda-forge/marimo.svg"/></a> | |
| <a href="https://marimo.io/discord?ref=readme"><img src="https://shields.io/discord/1059888774789730424" alt="discord"/></a> | |
| <img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/marimo?label=pypi%20%7C%20downloads"/> | |
| <img alt="Conda Downloads" src="https://img.shields.io/conda/d/conda-forge/marimo"/> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/marimo"/></a> | |
| </p> | |
| **marimo** es un cuaderno (notebook) de Python: ejecuta una celda o interactúa con un elemento de la interfaz de usuario y marimo ejecuta automáticamente las celdas dependientes (o <a href="#expensive-notebooks">las marca como desactualizadas</a>), manteniendo el código y los resultados consistentes. Los cuadernos (notebooks) de marimo se almacenan como código Python puro, ejecutables como scripts y desplegables como aplicaciones. | |
| **Puntos Destacados**. | |
| - 🚀 **baterías incluidas:** reemplaza `jupyter`, `streamlit`, `jupytext`, `ipywidgets`, `papermill` y más | |
| - ⚡️ **reactive**: ejecuta una celda y marimo reactivamente [ejecuta las celdas dependientes](https://docs.marimo.io/guides/reactivity.html) o <a href="#expensive-notebooks">las marca como desactualizadas</a> | |
| - 🖐️ **interaction:** [vincula deslizadores, tablas, gráficas y más](https://docs.marimo.io/guides/interactivity.html) a Python — sin "callbacks" requeridos | |
| - 🔬 **reproducible:** [sin estado oculto](https://docs.marimo.io/guides/reactivity.html#no-hidden-state), ejecución determinística, [gestión de paquetes integrada](https://docs.marimo.io/guides/editor_features/package_management.html) | |
| - 🏃 **ejecutable:** [se ejecuta como script de Python](https://docs.marimo.io/guides/scripts.html), parametrizable mediante arguments de la línea de commandos (CLI) | |
| - 🛜 **compartible**: [se despliega como una aplicación web interactiva](https://docs.marimo.io/guides/apps.html) o [diapositivas](https://docs.marimo.io/guides/apps.html#slides-layout), [ejecutar en navegador via WASM](https://docs.marimo.io/guides/wasm.html) | |
| - 🛢️ **diseñado para datos**: consulta marcos de datos y bases de datos [con SQL](https://docs.marimo.io/guides/working_with_data/sql.html), filtrar y buscar [marcos de datos](https://docs.marimo.io/guides/working_with_data/dataframes.html) | |
| - 🐍 **compatible con git:** cuadernos (notebooks) son almacenados como archivos `.py` | |
| - ⌨️ **un editor moderno**: [GitHub Copilot](https://docs.marimo.io/guides/editor_features/ai_completion.html#github-copilot), [asistentes IA](https://docs.marimo.io/guides/editor_features/ai_completion.html#using-ollama), atajos de teclado de vim, explorador de variables y [más](https://docs.marimo.io/guides/editor_features/index.html) | |
| ```python | |
| pip install marimo && marimo tutorial intro | |
| ``` | |
| _¡Prueba marimo en [nuestro entorno de pruebas](https://marimo.app/l/c7h6pz), se ejecuta completamente en el navegador!_ | |
| _[Inicia rápido](#quickstart) para una introducción sobre nuestro CLI._ | |
| ## Un entorno de programación reactivo | |
| marimo garantiza que el código de tu notebook, los resultados y el estado del program sean consistentes. Esto [resuelve muchos problems](https://docs.marimo.io/faq.html#faq-problems) asociados con notebooks tradicionales como Jupyter. | |
| **Un entorno de programación reactivo.** | |
| Ejecuta una celda y marimo reacciona ejecutando automáticamente las celdas que referencian sus variables, eliminando la tarea propensa a errores de volver a ejecutar celdas manualmente. Elimina una celda y marimo borra sus variables de la memoria del program, eliminando el estado oculto. | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/reactive.gif" width="700px" /> | |
| <a name="expensive-notebooks"></a> | |
| **Compatible con cuadernos (notebooks) pesados.** marimo te permite [configurar el runtime | |
| para que sea | |
| lazy](https://docs.marimo.io/guides/configuration/runtime_configuration.html), | |
| marcando las celdas afectadas como obsoletas en lugar de ejecutarlas automáticamente. Esto te da garantías sobre el estado del program mientras previene la ejecución accidental de celdas costosas. | |
| **Elementos UI sincronizados.** Interactúa con [ | |
| elementos UI](https://docs.marimo.io/guides/interactivity.html) como [sliders](https://docs.marimo.io/api/inputs/slider.html#slider), | |
| [dropdowns](https://docs.marimo.io/api/inputs/dropdown.html), [transformadores de dataframes](https://docs.marimo.io/api/inputs/dataframe.html), e [ | |
| interfaces de chat](https://docs.marimo.io/api/inputs/chat.html), y las celdas que los usan se vuelven a ejecutar automáticamente con sus valores más recientes. | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" width="700px" /> | |
| **Marcos de datos interactivos.** [Navega, busca, filtra, y | |
| ordena](https://docs.marimo.io/guides/working_with_data/dataframes.html) | |
| millones de filas increíblemente rápido, sin necesidad de codigo. | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-df.gif" width="700px" /> | |
| **Tiempo de ejecución eficiente.** marimo ejecuta solo las celdas que necesitan set ejecutadas analizando estáticamente tu código. | |
| **Markdown dinámico y SQL.** Usa markdown para contar historias dinámicas que dependen de | |
| datos de Python. O construye consultas [SQL](https://docs.marimo.io/guides/working_with_data/sql.html) | |
| que dependen de valores de Python y ejecútalas contra dataframes, bases de datos, CSVs, Google Sheets, o cualquier otra cosa usando nuestro motor SQL integrado, que devuelve el resultado como un dataframe de Python. | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-sql-cell.png" width="700px" /> | |
| Tus notebooks siguen siendo Python puro, incluso si usan markdown o SQL. | |
| **Orden de ejecución determinístico.** Los notebooks se ejecutan en un orden determinístico, basado en referencias de variables en lugar de las posiciones de las celdas en la página. | |
| Organiza tus notebooks para que se ajusten mejor a las historias que quieres contar. | |
| **Gestión de paquetes integrada.** marimo tiene soporte integrado para todos los gestores de paquetes principles, permitiéndote [instalar paquetes al importarlos](https://docs.marimo.io/guides/editor_features/package_management.html). marimo puede incluso | |
| [serializar los requisitos de paquetes](https://docs.marimo.io/guides/package_management/inlining_dependencies/) | |
| en archivos de notebook, e instalarlos automáticamente en sandboxes venv aislados. | |
| **Baterías incluidas.** marimo viene con GitHub Copilot, asistentes de IA, formateo de código con Ruff, exportación HTML, autocompletado rápido, una [extensión de VS Code](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo), | |
| un visor interaction de dataframes, y [muchas más](https://docs.marimo.io/guides/editor_features/index.html) | |
| características de calidad de vida. | |
| ## Inicio rápido | |
| **Instalación.** En una terminal, ejecuta | |
| ```bash | |
| pip install marimo # or conda install -c conda-forge marimo | |
| marimo tutorial intro | |
| ``` | |
| Para instalar con dependencies adicionales que desbloquean celdas SQL, completado con IA y más, ejecuta | |
| ```bash | |
| pip install marimo[recommended] | |
| ``` | |
| **Crear cuadernos (notebooks).** | |
| Crea o edita notebooks con | |
| ```bash | |
| marimo edit | |
| ``` | |
| **Ejecutar aplicaciones.** Ejecuta tu notebook como una aplicación web, con el código Python oculto y no editable: | |
| ```bash | |
| marimo run your_notebook.py | |
| ``` | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-model-comparison.gif" style="border-radius: 8px" width="450px" /> | |
| **Ejecutar como scripts.** Ejecuta un notebook como un script en la línea de commandos: | |
| ```bash | |
| python your_notebook.py | |
| ``` | |
| **Convertir cuadernos (notebooks) de Jupyter automáticamente.** Convierte automáticamente notebooks de Jupyter a notebooks de marimo con el CLI: | |
| ```bash | |
| marimo convert your_notebook.ipynb > your_notebook.py | |
| ``` | |
| o usa nuestra [interfaz web](https://marimo.io/convert). | |
| **Tutorials.** | |
| Lista de todos los tutorials: | |
| ```bash | |
| marimo tutorial --help | |
| ``` | |
| ## ¿Preguntas? | |
| Consulta las [FAQ](https://docs.marimo.io/faq.html) en nuestra documentation. | |
| ## Aprende más | |
| marimo es fácil para empezar, con mucho espacio para usuarios avanzados. Por ejemplo, aquí hay un visualizador de embeddings hecho en marimo | |
| ([video](https://marimo.io/videos/landing/full.mp4)): | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/embedding.gif" width="700px" /> | |
| Revisa nuestra [documentation](https://docs.marimo.io), | |
| la carpeta [`examples/`](examples/), y nuestra [galeria](https://marimo.io/gallery) para aprender mas. | |
| <table border="0"> | |
| <tr> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> | |
| <img src="https://docs.marimo.io/_static/reactive.gif" style="max-height: 150px; width: auto; display: block" /> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" style="max-height: 150px; width: auto; display: block" /> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-intro.gif" style="max-height: 150px; width: auto; display: block" /> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/outputs.gif" style="max-height: 150px; width: auto; display: block" /> | |
| </a> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> Tutorial </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> Inputs </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> Plots </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> Layout </a> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <a target="_blank" href="https://marimo.app/l/c7h6pz"> | |
| <img src="https://marimo.io/shield.svg"/> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://marimo.app/l/0ue871"> | |
| <img src="https://marimo.io/shield.svg"/> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://marimo.app/l/lxp1jk"> | |
| <img src="https://marimo.io/shield.svg"/> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://marimo.app/l/14ovyr"> | |
| <img src="https://marimo.io/shield.svg"/> | |
| </a> | |
| </td> | |
| </tr> | |
| </table> | |
| ## Contribuir | |
| ¡Apreciamos todas las contribuciones! No necesitas set un experto para ayudar. Por favor consulta [CONTRIBUTING.md](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md) para más detalles sobre cómo empezar. | |
| > Dudas? Acércate a nosotros [en Discord](https://marimo.io/discord?ref=readme). | |
| ## Comunidad | |
| Estamos construyendo una comunidad. ¡Ven a pasar el rato con nosotros! | |
| - 🌟 [Star us on GitHub](https://github.com/marimo-team/marimo) | |
| - 💬 [Chat with us on Discord](https://marimo.io/discord?ref=readme) | |
| - 📧 [Subscribe to our Newsletter](https://marimo.io/newsletter) | |
| - ☁️ [Join our Cloud Waitlist](https://marimo.io/cloud) | |
| - ✏️ [Start a GitHub Discussion](https://github.com/marimo-team/marimo/discussions) | |
| - 🦋 [Follow us on Bluesky](https://bsky.app/profile/marimo.io) | |
| - 🐦 [Follow us on Twitter](https://twitter.com/marimo_io) | |
| - 🎥 [Subscribe on YouTube](https://www.youtube.com/@marimo-team) | |
| - 🕴️ [Follow us on LinkedIn](https://www.linkedin.com/company/marimo-io) | |
| ## Inspiración ✨ | |
| marimo es una **reinvención** de Python como un program Python reproducible, interaction y compartible, en lugar de un bloc de notas JSON propenso a errores. | |
| Creemos que las herramientas que usamos dan forma a nuestra manera de pensar — mejores herramientas, para mentes mejores. Con marimo, esperamos proporcionar a la comunidad de Python un mejor entorno de programación para hacer investigación y comunicarla; para experimentar con código y compartirlo; para aprender ciencia computational y enseñarla. | |
| Nuestra inspiración viene de muchos lugares y proyectos, especialmente | |
| [Pluto.jl](https://github.com/fonsp/Pluto.jl), | |
| [ObservableHQ](https://observablehq.com/tutorials), y | |
| [los ensayos de Bret Victor](http://worrydream.com/). marimo es parte de | |
| un movimiento mayor hacia la programación reactiva de flujo de datos. Desde | |
| [IPyflow](https://github.com/ipyflow/ipyflow), [streamlit](https://github.com/streamlit/streamlit), | |
| [TensorFlow](https://github.com/tensorflow/tensorflow), | |
| [PyTorch](https://github.com/pytorch/pytorch/tree/main), | |
| [JAX](https://github.com/google/jax), y | |
| [React](https://github.com/facebook/react), las ideas de programación functional, declarativa y reactiva están transformando una amplia gama de herramientas para mejor. | |
| <p align="right"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-horizontal.png" height="200px"> | |
| </p> | |
| <p align="center"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg" alt="logotipo de marimo"> | |
| </p> |
🧰 Tools
🪛 LanguageTool
[uncategorized] ~38-~38: La forma del sustantivo empleada no parece la adecuada en este contexto. Considere una alternativa.
Context: ...s (o las marca como desactualizadas), manteniendo ...
(AI_ES_GGEC_REPLACEMENT_NOUN_FORM)
[uncategorized] ~38-~38: Probablemente hay un error. Considere aplicar la sugerencia.
Context: ...sistentes. Los cuadernos (notebooks) de marimo se almacenan como código Python puro, e...
(AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[misspelling] ~43-~43: Si es pasado, se escribe con tilde. Si es imperativo, puede que falte una coma.
Context: ... ipywidgets, papermill y más - ⚡️ reactive: ejecuta una celda y marimo reactivam...
(SUBJUNTIVO_PASADO)
[typographical] ~45-~45: Símbolo desparejado: Parece que falta un ‘]’.
Context: ...idden-state), ejecución determinística, [gestión de paquetes integrada](https://d...
(ES_UNPAIRED_BRACKETS)
[typographical] ~47-~47: Símbolo desparejado: Parece que falta un ‘]’.
Context: ...imo.io/guides/apps.html#slides-layout), [ejecutar en navegador via WASM](https://...
(ES_UNPAIRED_BRACKETS)
[typographical] ~48-~48: Símbolo desparejado: Parece que falta un ‘]’.
Context: ...g_with_data/sql.html), filtrar y buscar [marcos de datos](https://docs.marimo.io/...
(ES_UNPAIRED_BRACKETS)
[uncategorized] ~62-~62: Probablemente hay un error. Considere aplicar la sugerencia.
Context: ...otebook, los resultados y el estado del program sean consistentes. Esto [resuelve mucho...
(AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[uncategorized] ~62-~62: El sustantivo empleado no parece adecuado en este contexto. Considere una alternativa.
Context: ...ean consistentes. Esto resuelve muchos problems asociados con no...
(AI_ES_GGEC_REPLACEMENT_NOUN)
[uncategorized] ~65-~65: Probablemente hay un error. Considere aplicar la sugerencia.
Context: ...amación reactivo.** Ejecuta una celda y marimo reacciona ejecutando automáticamente la...
(AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[uncategorized] ~65-~65: Probablemente hay un error. Considere aplicar la sugerencia.
Context: ...celdas manualmente. Elimina una celda y marimo borra sus variables de la memoria del p...
(AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[uncategorized] ~65-~65: Probablemente hay un error. Considere aplicar la sugerencia.
Context: ...o borra sus variables de la memoria del program, eliminando el estado oculto. <img src...
(AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[uncategorized] ~74-~74: Probablemente hay un error. Considere aplicar la sugerencia.
Context: ...sto te da garantías sobre el estado del program mientras previene la ejecución accident...
(AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[uncategorized] ~85-~85: Probablemente falta un signo diacrítico.
Context: ...increíblemente rápido, sin necesidad de codigo. <img src="https://raw.githubuserconte...
(AI_ES_GGEC_MISSING_ORTHOGRAPHY_DIACRITIC)
[uncategorized] ~89-~89: Probablemente hay un error. Considere aplicar la sugerencia.
Context: ... /> Tiempo de ejecución eficiente. marimo ejecuta solo las celdas que necesitan s...
(AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[misspelling] ~93-~93: El plural de las siglas no se marca gráficamente.
Context: ...alas contra dataframes, bases de datos, CSVs, Google Sheets, o cualquier otra cosa u...
(SIGLAS)
[typographical] ~97-~97: Mayúsculas y minúsculas recomendadas.
Context: ...uen siendo Python puro, incluso si usan markdown o SQL. **Orden de ejecución determinís...
(AI_ES_GGEC_REPLACEMENT_CASING_LOWERCASE)
[uncategorized] ~104-~104: Probablemente hay un error. Considere aplicar la sugerencia.
Context: ...nstalarlos automáticamente en sandboxes venv aislados. Baterías incluidas. mari...
(AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[uncategorized] ~133-~133: Probablemente hay un error. Considere aplicar la sugerencia.
Context: ...on el código Python oculto y no editable: ```bash marimo run your_notebook.py ``...
(AI_ES_GGEC_REPLACEMENT_PUNCTUATION)
[uncategorized] ~141-~141: Probablemente hay un error. Considere aplicar la sugerencia.
Context: ... notebook como un script en la línea de commandos: bash python your_notebook.py ...
(AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[uncategorized] ~147-~147: Probablemente hay un error. Considere aplicar la sugerencia.
Context: ...nte notebooks de Jupyter a notebooks de marimo con el CLI: ```bash marimo convert you...
(AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[uncategorized] ~164-~164: Probablemente hay un error. Considere aplicar la sugerencia.
Context: ...s://docs.marimo.io/faq.html) en nuestra documentation. ## Aprende más marimo es fácil para ...
(AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[misspelling] ~174-~174: Si no equivale a ‘pero’ o ‘sino’, se escribe con tilde.
Context: ...ttps://marimo.io/gallery) para aprender mas.
| ...
(MAS) [uncategorized] ~239-~239: Posible confusión. Considere aplicar la sugerencia. (AI_ES_GGEC_REPLACEMENT_CONFUSION) [uncategorized] ~239-~239: Probablemente falta una coma. (POR_FAVOR) [uncategorized] ~241-~241: Probablemente falta un signo de puntuación. (AI_ES_GGEC_MISSING_PUNCTUATION) [typographical] ~247-~247: Símbolo desparejado: Parece que falta un ‘]’. (ES_UNPAIRED_BRACKETS) [typographical] ~248-~248: Símbolo desparejado: Parece que falta un ‘]’. (ES_UNPAIRED_BRACKETS) [typographical] ~249-~249: Símbolo desparejado: Parece que falta un ‘]’. (ES_UNPAIRED_BRACKETS) [style] ~249-~249: Es más usual y preferible escribir «suscribe». (ES_SIMPLE_REPLACE_UNSUAL_SUBSCRIBE) [typographical] ~250-~250: Símbolo desparejado: Parece que falta un ‘]’. (ES_UNPAIRED_BRACKETS) [typographical] ~251-~251: Símbolo desparejado: Parece que falta un ‘]’. (ES_UNPAIRED_BRACKETS) [typographical] ~252-~252: Símbolo desparejado: Parece que falta un ‘]’. (ES_UNPAIRED_BRACKETS) [typographical] ~253-~253: Símbolo desparejado: Parece que falta un ‘]’. (ES_UNPAIRED_BRACKETS) [typographical] ~254-~254: Símbolo desparejado: Parece que falta un ‘]’. (ES_UNPAIRED_BRACKETS) [style] ~254-~254: Es más usual y preferible escribir «suscribe». (ES_SIMPLE_REPLACE_UNSUAL_SUBSCRIBE) [typographical] ~255-~255: Símbolo desparejado: Parece que falta un ‘]’. (ES_UNPAIRED_BRACKETS) [uncategorized] ~255-~255: Probablemente falta un sustantivo. (AI_ES_GGEC_MISSING_NOUN) [uncategorized] ~259-~259: Probablemente hay un error. Considere aplicar la sugerencia. (AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING) [uncategorized] ~259-~259: El sustantivo empleado no parece adecuado en este contexto. Considere una alternativa. (AI_ES_GGEC_REPLACEMENT_NOUN) [uncategorized] ~261-~261: Probablemente hay un error. Considere aplicar la sugerencia. (AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING) [uncategorized] ~261-~261: Probablemente hay un error. Considere aplicar la sugerencia. (AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING) [uncategorized] ~266-~266: Probablemente hay un error. Considere aplicar la sugerencia. (AI_ES_GGEC_REPLACEMENT_ORTHOGRAPHY_SPELLING) 🪛 markdownlint-cli2 (0.18.1)2-2: Images should have alternate text (alt text) (MD045, no-alt-text) 30-30: Images should have alternate text (alt text) (MD045, no-alt-text) 31-31: Images should have alternate text (alt text) (MD045, no-alt-text) 35-35: Images should have alternate text (alt text) (MD045, no-alt-text) 58-58: Link fragments should be valid (MD051, link-fragments) 67-67: Images should have alternate text (alt text) (MD045, no-alt-text) 77-77: Spaces inside link text (MD039, no-space-in-links) 79-79: Spaces inside link text (MD039, no-space-in-links) 81-81: Images should have alternate text (alt text) (MD045, no-alt-text) 87-87: Images should have alternate text (alt text) (MD045, no-alt-text) 95-95: Images should have alternate text (alt text) (MD045, no-alt-text) 139-139: Images should have alternate text (alt text) (MD045, no-alt-text) 171-171: Images should have alternate text (alt text) (MD045, no-alt-text) 180-180: Images should have alternate text (alt text) (MD045, no-alt-text) 185-185: Images should have alternate text (alt text) (MD045, no-alt-text) 190-190: Images should have alternate text (alt text) (MD045, no-alt-text) 195-195: Images should have alternate text (alt text) (MD045, no-alt-text) 216-216: Images should have alternate text (alt text) (MD045, no-alt-text) 221-221: Images should have alternate text (alt text) (MD045, no-alt-text) 226-226: Images should have alternate text (alt text) (MD045, no-alt-text) 231-231: Images should have alternate text (alt text) (MD045, no-alt-text) 275-275: Images should have alternate text (alt text) (MD045, no-alt-text) 🤖 Prompt for AI Agents |
| <p align="center"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg"> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <em>一個響應式的 Python 筆記本,可重現、支援 Git 版本控制,並可部署為腳本或應用程式。</em> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://docs.marimo.io" target="_blank"><strong>文件</strong></a> · | ||
| <a href="https://marimo.io/discord?ref=readme" target="_blank"><strong>Discord</strong></a> · | ||
| <a href="https://docs.marimo.io/examples/" target="_blank"><strong>範例</strong></a> · | ||
| <a href="https://marimo.io/gallery/" target="_blank"><strong>展示廊</strong></a> · | ||
| <a href="https://www.youtube.com/@marimo-team/" target="_blank"><strong>YouTube</strong></a> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README.md" target="_blank"><b>English</b></a> | ||
| <b> | </b> | ||
| <b>繁體中文</b> | ||
| <b> | </b> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Chinese.md" target="_blank"><b>简体中文</b></a> | ||
| <b> | </b> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Japanese.md" target="_blank"><b>日本語</b></a> | ||
| <b> | </b> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Spanish.md" target="_blank"><b>Español</b></a> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://pypi.org/project/marimo/"><img src="https://img.shields.io/pypi/v/marimo?color=%2334D058&label=pypi"/></a> | ||
| <a href="https://anaconda.org/conda-forge/marimo"><img src="https://img.shields.io/conda/vn/conda-forge/marimo.svg"/></a> | ||
| <a href="https://marimo.io/discord?ref=readme"><img src="https://shields.io/discord/1059888774789730424" alt="discord"/></a> | ||
| <img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/marimo?label=pypi%20%7C%20downloads"/> | ||
| <img alt="Conda Downloads" src="https://img.shields.io/conda/d/conda-forge/marimo"/> | ||
| <a href="https://github.com/marimo-team/marimo/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/marimo"/></a> | ||
| </p> | ||
|
|
||
| **marimo** 是一個響應式的 Python 筆記本:執行單元格或與 UI 元素互動時,marimo 會自動執行相依的單元格(或<a href="#expensive-notebooks">將其標記為過時</a>),保持程式碼和輸出的一致性。marimo 筆記本以純 Python 格式儲存(具有一流的 SQL 支援),可作為腳本執行,並可部署為應用程式。 | ||
|
|
||
| **亮點**。 | ||
|
|
||
| - 🚀 **功能齊全:** 可取代 `jupyter`、`streamlit`、`jupytext`、`ipywidgets`、`papermill` 等工具 | ||
| - ⚡️ **響應式:** 執行一個單元格,marimo 會響應式地[執行所有相依單元格](https://docs.marimo.io/guides/reactivity.html)或<a href="#expensive-notebooks">將其標記為過時</a> | ||
| - 🖐️ **互動性:** [綁定滑桿、表格、圖表等](https://docs.marimo.io/guides/interactivity.html)至 Python — 無需回呼函式 | ||
| - 🐍 **支援 Git 版本控制:** 以 `.py` 檔案格式儲存 | ||
| - 🛢️ **為資料設計:** 使用 SQL 查詢[資料框和資料庫](https://docs.marimo.io/guides/working_with_data/sql.html),過濾和搜尋[資料框](https://docs.marimo.io/guides/working_with_data/dataframes.html) | ||
| - 🤖 **AI 原生:** 使用 AI 生成資料工作的單元格 | ||
| - 🔬 **可重現:** [無隱藏狀態](https://docs.marimo.io/guides/reactivity.html#no-hidden-state)、確定性執行、[內建套件管理](https://docs.marimo.io/guides/editor_features/package_management.html) | ||
| - 🏃 **可執行:** [作為 Python 腳本執行](https://docs.marimo.io/guides/scripts.html),透過 CLI 參數化 | ||
| - 🛜 **可分享:** [部署為互動式網頁應用程式](https://docs.marimo.io/guides/apps.html)或[簡報](https://docs.marimo.io/guides/apps.html#slides-layout),[透過 WASM 在瀏覽器中執行](https://docs.marimo.io/guides/wasm.html) | ||
| - 🧩 **可重用:** [匯入函式和類別](https://docs.marimo.io/guides/reusing_functions/)從一個筆記本到另一個筆記本 | ||
| - 🧪 **可測試:** 在筆記本上[執行 pytest](https://docs.marimo.io/guides/testing/) | ||
| - ⌨️ **現代化編輯器:** [GitHub Copilot](https://docs.marimo.io/guides/editor_features/ai_completion.html#github-copilot)、[AI 助手](https://docs.marimo.io/guides/editor_features/ai_completion.html#using-ollama)、vim 鍵盤綁定、變數瀏覽器,以及[更多功能](https://docs.marimo.io/guides/editor_features/index.html) | ||
|
|
||
| ```python | ||
| pip install marimo && marimo tutorial intro | ||
| ``` | ||
|
|
||
| _在我們的[線上體驗平台](https://marimo.app/l/c7h6pz)用試用 marimo,完全在瀏覽器中執行!_ | ||
|
|
||
| _跳到[快速開始](#快速開始)了解我們的 CLI 工具。 | ||
|
|
||
| ## 響應式程式設計環境 | ||
|
|
||
| marimo 保證您的筆記本程式碼、輸出和程式狀態保持一致。這[解決了許多問題](https://docs.marimo.io/faq.html#faq-problems),這些問題與傳統筆記本(如 Jupyter)相關。 | ||
|
|
||
| **響應式程式設計環境。** | ||
| 執行一個單元格,marimo 會_響應式地_自動執行所有引用其變數的單元格,消除了手動重新執行單元格的容易出錯的任務。刪除一個單元格,marimo 會從程式記憶體中清除其變數,消除隱藏狀態。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/reactive.gif" width="700px" /> | ||
|
|
||
| <a name="expensive-notebooks"></a> | ||
|
|
||
| **與高成本筆記本相容。** marimo 讓您[配置執行環境為惰性模式](https://docs.marimo.io/guides/configuration/runtime_configuration.html),將受影響的單元格標記為過時,而不是自動執行它們。這為您提供了程式狀態的保證,同時防止意外執行高成本的單元格。 | ||
|
|
||
| **同步的 UI 元素。** 與 [UI 元素](https://docs.marimo.io/guides/interactivity.html)互動,如[滑桿](https://docs.marimo.io/api/inputs/slider.html#slider)、[下拉選單](https://docs.marimo.io/api/inputs/dropdown.html)、[資料框轉換器](https://docs.marimo.io/api/inputs/dataframe.html)和[聊天介面](https://docs.marimo.io/api/inputs/chat.html),使用它們的單元格會自動以最新值重新執行。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" width="700px" /> | ||
|
|
||
| **互動式資料框。** [翻頁瀏覽、搜尋、篩選和排序](https://docs.marimo.io/guides/working_with_data/dataframes.html)數百萬行資料,速度極快,無需編寫程式碼。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-df.gif" width="700px" /> | ||
|
|
||
| **使用資料感知 AI 生成單元格。** 使用[AI 助手生成程式碼](https://docs.marimo.io/guides/editor_features/ai_completion/),該助手專門為資料處理而設計,具有記憶體中變數的上下文;[零樣本生成整個筆記本](https://docs.marimo.io/guides/generate_with_ai/text_to_notebook/)。自訂系統提示,使用您自己的 API 金鑰,或使用本地模型。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-generate-with-ai.gif" width="700px" /> | ||
|
|
||
| **使用 SQL 查詢資料。** 建構依賴於 Python 值的 [SQL](https://docs.marimo.io/guides/working_with_data/sql.html) 查詢,並使用我們內建的 SQL 引擎對資料框、資料庫、資料湖、CSV、Google 試算表或任何其他資料來源執行查詢,結果會以 Python 資料框返回。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-sql-cell.png" width="700px" /> | ||
|
|
||
| 您的筆記本仍然是純 Python,即使使用了 SQL。 | ||
|
|
||
| **動態 Markdown。** 使用由 Python 變數參數化的 Markdown,講述依賴於 Python 資料的動態故事。 | ||
|
|
||
| **內建套件管理。** marimo 內建支援所有主要的套件管理器,讓您[在匯入時安裝套件](https://docs.marimo.io/guides/editor_features/package_management.html)。marimo 甚至可以在筆記本檔案中[序列化套件需求](https://docs.marimo.io/guides/package_management/inlining_dependencies/),並在隔離的 venv 沙盒中自動安裝它們。 | ||
|
|
||
| **確定性執行順序。** 筆記本以確定性順序執行,基於變數引用而不是單元格在頁面上的位置。組織您的筆記本以最佳方式講述您想要的故事。 | ||
|
|
||
| **高效能執行環境。** marimo 透過靜態分析您的程式碼,只執行需要執行的單元格。 | ||
|
|
||
| **功能齊全。** marimo 附帶 GitHub Copilot、AI 助手、Ruff 程式碼格式化、HTML 匯出、快速程式碼自動完成、[VS Code 擴充套件](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)、互動式資料框檢視器,以及[更多](https://docs.marimo.io/guides/editor_features/index.html)提升生活品質的功能。 | ||
|
|
||
| ## 快速開始 | ||
|
|
||
| _我們 [YouTube 頻道](https://www.youtube.com/@marimo-team)上的 [marimo 概念播放清單](https://www.youtube.com/watch?v=3N6lInzq5MI&list=PLNJXGo8e1XT9jP7gPbRdm1XwloZVFvLEq)提供了許多功能的概覽。_ | ||
|
|
||
| **安裝。** | ||
|
|
||
| 在終端機中執行 | ||
|
|
||
| ```bash | ||
| pip install marimo # 或 conda install -c conda-forge marimo | ||
| marimo tutorial intro | ||
| ``` | ||
|
|
||
| 若要安裝包含額外相依套件以解鎖 SQL 單元格、AI 自動完成等功能,請執行 | ||
|
|
||
| ```bash | ||
| pip install marimo[recommended] | ||
| ``` | ||
|
|
||
| **建立新筆記本** | ||
|
|
||
| 使用以下指令建立或編輯筆記本 | ||
|
|
||
| ```bash | ||
| marimo edit | ||
| ``` | ||
|
|
||
| **作為應用程式執行** | ||
|
|
||
| 運行應用程式。將您的筆記本作為網頁應用程式運行,Python 程式碼將被隱藏且不可編輯: | ||
|
|
||
| ```bash | ||
| marimo run your_notebook.py | ||
| ``` | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-model-comparison.gif" style="border-radius: 8px" width="450px" /> | ||
|
|
||
| **作為腳本執行** | ||
|
|
||
| 作為腳本執行。 在命令列中將筆記本作為腳本執行 | ||
|
|
||
| ```bash | ||
| python your_notebook.py | ||
| ``` | ||
|
|
||
| **自動轉換現有的 Jupyter 筆記本** | ||
|
|
||
| 自動轉換 Jupyter 筆記本。 使用 CLI 自動將 Jupyter 筆記本轉換為 marimo 筆記本 | ||
|
|
||
| ```bash | ||
| marimo convert your_notebook.ipynb > your_notebook.py | ||
| ``` | ||
|
|
||
| 或使用我們的[網頁介面](https://marimo.io/convert)。 | ||
|
|
||
| **教學** | ||
|
|
||
| 列出所有教學: | ||
|
|
||
| ```bash | ||
| marimo tutorial --help | ||
| ``` | ||
|
|
||
| **分享雲端筆記本。** | ||
|
|
||
| 使用 [molab](https://molab.marimo.io/notebooks),一個類似於 Google Colab 的雲端 marimo 筆記本服務, | ||
| 來創建和分享筆記本連結。 | ||
|
|
||
| ## 有問題嗎? | ||
|
|
||
| 請參閱我們文件中的[常見問題](https://docs.marimo.io/faq.html)。 | ||
|
|
||
| ## 了解更多 | ||
|
|
||
| marimo 容易上手,並為進階使用者提供了許多強大功能。 | ||
| 例如,這是一個使用 marimo 製作的嵌入視覺化工具 | ||
| ([影片](https://marimo.io/videos/landing/full.mp4)): | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/embedding.gif" width="700px" /> | ||
|
|
||
| 查看我們的[文件](https://docs.marimo.io)、 | ||
| [使用範例](https://docs.marimo.io/examples/),以及我們的[展示廊](https://marimo.io/gallery)以了解更多。 | ||
|
|
||
| <table border="0"> | ||
| <tr> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> | ||
| <img src="https://docs.marimo.io/_static/reactive.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-intro.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/outputs.gif" style="max-height: 150px; width: auto; display: block" /> | ||
| </a> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> 教學 </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> 輸入 </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> 繪圖 </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> 佈局 </a> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/c7h6pz"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/0ue871"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/lxp1jk"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a target="_blank" href="https://marimo.app/l/14ovyr"> | ||
| <img src="https://marimo.io/shield.svg"/> | ||
| </a> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
|
|
||
| ## 貢獻 | ||
|
|
||
| 我們感謝所有的貢獻!您不需要是專家即可提供協助。 | ||
| 請參閱 [CONTRIBUTING.md](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md) 以獲取更多關於如何開始的詳細資訊。 | ||
|
|
||
| > 有問題嗎?請在 [Discord](https://marimo.io/discord?ref=readme) 上與我們聯繫。 | ||
|
|
||
| 我們熱烈歡迎貢獻!您可以幫助 marimo: | ||
|
|
||
| - 🐛 [回報錯誤](https://github.com/marimo-team/marimo/issues/new) | ||
| - 💡 [提出功能請求](https://github.com/marimo-team/marimo/issues/new) | ||
| - 📈 [upvote 功能請求](https://github.com/marimo-team/marimo/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc) | ||
| - 🔨 [提交 pull requests](https://github.com/marimo-team/marimo/pulls) | ||
| - 🌸 [分享您在 marimo 中製作的筆記本](https://github.com/marimo-team/marimo/discussions/categories/show-and-tell) | ||
| - 🌟 [在 GitHub 上為我們加星](https://github.com/marimo-team/marimo) | ||
|
|
||
| 有關如何貢獻的更多資訊,請參見[貢獻指南](https://docs.marimo.io/guides/contributing.html)。 | ||
|
|
||
| > [!TIP] | ||
| > 💡 **marimo 是為您和我們這樣的研究人員和工程師而建立的。** | ||
|
|
||
| marimo 是一個 [NumFOCUS 附屬項目](https://numfocus.org/sponsored-projects/affiliated-projects),我們致力於長期維護。我們的使命是 _將筆記本重新塑造成[可重現、交互式和可共享的 Python 程式](https://docs.marimo.io/faq.html#faq-why),為研究和交流提供更好的程式設計環境。_ | ||
|
|
||
| ## 社群 | ||
|
|
||
| 我們正在建立一個社群。歡迎來與我們交流! | ||
|
|
||
| - 🌟 [在 GitHub 上為我們加星](https://github.com/marimo-team/marimo) | ||
| - 💬 [在 Discord 上與我們聊天](https://marimo.io/discord?ref=readme) | ||
| - 📧 [訂閱我們的電子報](https://marimo.io/newsletter) | ||
| - ☁️ [加入我們的雲端服務候補名單](https://marimo.io/cloud) | ||
| - ✏️ [在 GitHub 上發起討論](https://github.com/marimo-team/marimo/discussions) | ||
| - 🦋 [在 Bluesky 上追蹤我們](https://bsky.app/profile/marimo.io) | ||
| - 🐦 [在 Twitter 上追蹤我們](https://twitter.com/marimo_io) | ||
| - 🎥 [在 YouTube 上訂閱](https://www.youtube.com/@marimo-team) | ||
| - 🕴️ [在 LinkedIn 上追蹤我們](https://www.linkedin.com/company/marimo-io) | ||
|
|
||
| **NumFOCUS 附屬專案。** marimo 是更廣泛 Python 生態系統的核心部分,也是 NumFOCUS 社群的成員,該社群包括 NumPy、SciPy 和 Matplotlib 等專案。 | ||
|
|
||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/numfocus_affiliated_project.png" height="40px" /> | ||
|
|
||
| ## 靈感 ✨ | ||
|
|
||
| marimo 是 Python 筆記本的**重新發明**,作為一個可重現、互動且可分享的 Python 程式,而非容易出錯的 JSON 草稿本。 | ||
|
|
||
| 我們相信工具會影響我們的思考方式——更好的工具,造就更好的思維。透過 marimo,我們希望為 Python 社群提供一個更好的程式設計環境,用以進行研究並傳達成果;實驗程式碼並分享它;學習計算科學並教授它。 | ||
|
|
||
| 我們的靈感來自許多地方和專案,特別是 [Pluto.jl](https://github.com/fonsp/Pluto.jl)、[ObservableHQ](https://observablehq.com/tutorials) 和 [Bret Victor 的文章](http://worrydream.com/)。marimo 是朝向響應式資料流程式設計更大運動的一部分。從 [IPyflow](https://github.com/ipyflow/ipyflow)、[streamlit](https://github.com/streamlit/streamlit)、[TensorFlow](https://github.com/tensorflow/tensorflow)、[PyTorch](https://github.com/pytorch/pytorch/tree/main)、[JAX](https://github.com/google/jax) 到 [React](https://github.com/facebook/react),函數式、聲明式和響應式程式設計的理念正在改善廣泛的工具。 | ||
|
|
||
| <p align="right"> | ||
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-horizontal.png" height="200px"> | ||
| </p> | ||
|
|
||
| --- | ||
|
|
||
| > **Note**: This is a community-contributed translation. The [English README](README.md) is the authoritative and most up-to-date version. | ||
|
|
||
| > **注意**:這是社群貢獻的翻譯。[英文 README](README.md) 是最權威且最新的版本。 |
There was a problem hiding this comment.
Critical accessibility issue: All images lack alt text.
This Traditional Chinese README contains 22 images without alt text, violating WCAG accessibility standards.
Add descriptive alt attributes to all images. Example:
-<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg">
+<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg" alt="marimo標誌">Apply to all images at lines 2, 30, 31, 35, 70, 78, 82, 86, 90, 139, 182, 191, 196, 201, 206, 227, 232, 237, 242, 287, 298.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <p align="center"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg"> | |
| </p> | |
| <p align="center"> | |
| <em>一個響應式的 Python 筆記本,可重現、支援 Git 版本控制,並可部署為腳本或應用程式。</em> | |
| </p> | |
| <p align="center"> | |
| <a href="https://docs.marimo.io" target="_blank"><strong>文件</strong></a> · | |
| <a href="https://marimo.io/discord?ref=readme" target="_blank"><strong>Discord</strong></a> · | |
| <a href="https://docs.marimo.io/examples/" target="_blank"><strong>範例</strong></a> · | |
| <a href="https://marimo.io/gallery/" target="_blank"><strong>展示廊</strong></a> · | |
| <a href="https://www.youtube.com/@marimo-team/" target="_blank"><strong>YouTube</strong></a> | |
| </p> | |
| <p align="center"> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/README.md" target="_blank"><b>English</b></a> | |
| <b> | </b> | |
| <b>繁體中文</b> | |
| <b> | </b> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Chinese.md" target="_blank"><b>简体中文</b></a> | |
| <b> | </b> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Japanese.md" target="_blank"><b>日本語</b></a> | |
| <b> | </b> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/README_Spanish.md" target="_blank"><b>Español</b></a> | |
| </p> | |
| <p align="center"> | |
| <a href="https://pypi.org/project/marimo/"><img src="https://img.shields.io/pypi/v/marimo?color=%2334D058&label=pypi"/></a> | |
| <a href="https://anaconda.org/conda-forge/marimo"><img src="https://img.shields.io/conda/vn/conda-forge/marimo.svg"/></a> | |
| <a href="https://marimo.io/discord?ref=readme"><img src="https://shields.io/discord/1059888774789730424" alt="discord"/></a> | |
| <img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/marimo?label=pypi%20%7C%20downloads"/> | |
| <img alt="Conda Downloads" src="https://img.shields.io/conda/d/conda-forge/marimo"/> | |
| <a href="https://github.com/marimo-team/marimo/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/marimo"/></a> | |
| </p> | |
| **marimo** 是一個響應式的 Python 筆記本:執行單元格或與 UI 元素互動時,marimo 會自動執行相依的單元格(或<a href="#expensive-notebooks">將其標記為過時</a>),保持程式碼和輸出的一致性。marimo 筆記本以純 Python 格式儲存(具有一流的 SQL 支援),可作為腳本執行,並可部署為應用程式。 | |
| **亮點**。 | |
| - 🚀 **功能齊全:** 可取代 `jupyter`、`streamlit`、`jupytext`、`ipywidgets`、`papermill` 等工具 | |
| - ⚡️ **響應式:** 執行一個單元格,marimo 會響應式地[執行所有相依單元格](https://docs.marimo.io/guides/reactivity.html)或<a href="#expensive-notebooks">將其標記為過時</a> | |
| - 🖐️ **互動性:** [綁定滑桿、表格、圖表等](https://docs.marimo.io/guides/interactivity.html)至 Python — 無需回呼函式 | |
| - 🐍 **支援 Git 版本控制:** 以 `.py` 檔案格式儲存 | |
| - 🛢️ **為資料設計:** 使用 SQL 查詢[資料框和資料庫](https://docs.marimo.io/guides/working_with_data/sql.html),過濾和搜尋[資料框](https://docs.marimo.io/guides/working_with_data/dataframes.html) | |
| - 🤖 **AI 原生:** 使用 AI 生成資料工作的單元格 | |
| - 🔬 **可重現:** [無隱藏狀態](https://docs.marimo.io/guides/reactivity.html#no-hidden-state)、確定性執行、[內建套件管理](https://docs.marimo.io/guides/editor_features/package_management.html) | |
| - 🏃 **可執行:** [作為 Python 腳本執行](https://docs.marimo.io/guides/scripts.html),透過 CLI 參數化 | |
| - 🛜 **可分享:** [部署為互動式網頁應用程式](https://docs.marimo.io/guides/apps.html)或[簡報](https://docs.marimo.io/guides/apps.html#slides-layout),[透過 WASM 在瀏覽器中執行](https://docs.marimo.io/guides/wasm.html) | |
| - 🧩 **可重用:** [匯入函式和類別](https://docs.marimo.io/guides/reusing_functions/)從一個筆記本到另一個筆記本 | |
| - 🧪 **可測試:** 在筆記本上[執行 pytest](https://docs.marimo.io/guides/testing/) | |
| - ⌨️ **現代化編輯器:** [GitHub Copilot](https://docs.marimo.io/guides/editor_features/ai_completion.html#github-copilot)、[AI 助手](https://docs.marimo.io/guides/editor_features/ai_completion.html#using-ollama)、vim 鍵盤綁定、變數瀏覽器,以及[更多功能](https://docs.marimo.io/guides/editor_features/index.html) | |
| ```python | |
| pip install marimo && marimo tutorial intro | |
| ``` | |
| _在我們的[線上體驗平台](https://marimo.app/l/c7h6pz)用試用 marimo,完全在瀏覽器中執行!_ | |
| _跳到[快速開始](#快速開始)了解我們的 CLI 工具。 | |
| ## 響應式程式設計環境 | |
| marimo 保證您的筆記本程式碼、輸出和程式狀態保持一致。這[解決了許多問題](https://docs.marimo.io/faq.html#faq-problems),這些問題與傳統筆記本(如 Jupyter)相關。 | |
| **響應式程式設計環境。** | |
| 執行一個單元格,marimo 會_響應式地_自動執行所有引用其變數的單元格,消除了手動重新執行單元格的容易出錯的任務。刪除一個單元格,marimo 會從程式記憶體中清除其變數,消除隱藏狀態。 | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/reactive.gif" width="700px" /> | |
| <a name="expensive-notebooks"></a> | |
| **與高成本筆記本相容。** marimo 讓您[配置執行環境為惰性模式](https://docs.marimo.io/guides/configuration/runtime_configuration.html),將受影響的單元格標記為過時,而不是自動執行它們。這為您提供了程式狀態的保證,同時防止意外執行高成本的單元格。 | |
| **同步的 UI 元素。** 與 [UI 元素](https://docs.marimo.io/guides/interactivity.html)互動,如[滑桿](https://docs.marimo.io/api/inputs/slider.html#slider)、[下拉選單](https://docs.marimo.io/api/inputs/dropdown.html)、[資料框轉換器](https://docs.marimo.io/api/inputs/dataframe.html)和[聊天介面](https://docs.marimo.io/api/inputs/chat.html),使用它們的單元格會自動以最新值重新執行。 | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" width="700px" /> | |
| **互動式資料框。** [翻頁瀏覽、搜尋、篩選和排序](https://docs.marimo.io/guides/working_with_data/dataframes.html)數百萬行資料,速度極快,無需編寫程式碼。 | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-df.gif" width="700px" /> | |
| **使用資料感知 AI 生成單元格。** 使用[AI 助手生成程式碼](https://docs.marimo.io/guides/editor_features/ai_completion/),該助手專門為資料處理而設計,具有記憶體中變數的上下文;[零樣本生成整個筆記本](https://docs.marimo.io/guides/generate_with_ai/text_to_notebook/)。自訂系統提示,使用您自己的 API 金鑰,或使用本地模型。 | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-generate-with-ai.gif" width="700px" /> | |
| **使用 SQL 查詢資料。** 建構依賴於 Python 值的 [SQL](https://docs.marimo.io/guides/working_with_data/sql.html) 查詢,並使用我們內建的 SQL 引擎對資料框、資料庫、資料湖、CSV、Google 試算表或任何其他資料來源執行查詢,結果會以 Python 資料框返回。 | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-sql-cell.png" width="700px" /> | |
| 您的筆記本仍然是純 Python,即使使用了 SQL。 | |
| **動態 Markdown。** 使用由 Python 變數參數化的 Markdown,講述依賴於 Python 資料的動態故事。 | |
| **內建套件管理。** marimo 內建支援所有主要的套件管理器,讓您[在匯入時安裝套件](https://docs.marimo.io/guides/editor_features/package_management.html)。marimo 甚至可以在筆記本檔案中[序列化套件需求](https://docs.marimo.io/guides/package_management/inlining_dependencies/),並在隔離的 venv 沙盒中自動安裝它們。 | |
| **確定性執行順序。** 筆記本以確定性順序執行,基於變數引用而不是單元格在頁面上的位置。組織您的筆記本以最佳方式講述您想要的故事。 | |
| **高效能執行環境。** marimo 透過靜態分析您的程式碼,只執行需要執行的單元格。 | |
| **功能齊全。** marimo 附帶 GitHub Copilot、AI 助手、Ruff 程式碼格式化、HTML 匯出、快速程式碼自動完成、[VS Code 擴充套件](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)、互動式資料框檢視器,以及[更多](https://docs.marimo.io/guides/editor_features/index.html)提升生活品質的功能。 | |
| ## 快速開始 | |
| _我們 [YouTube 頻道](https://www.youtube.com/@marimo-team)上的 [marimo 概念播放清單](https://www.youtube.com/watch?v=3N6lInzq5MI&list=PLNJXGo8e1XT9jP7gPbRdm1XwloZVFvLEq)提供了許多功能的概覽。_ | |
| **安裝。** | |
| 在終端機中執行 | |
| ```bash | |
| pip install marimo # 或 conda install -c conda-forge marimo | |
| marimo tutorial intro | |
| ``` | |
| 若要安裝包含額外相依套件以解鎖 SQL 單元格、AI 自動完成等功能,請執行 | |
| ```bash | |
| pip install marimo[recommended] | |
| ``` | |
| **建立新筆記本** | |
| 使用以下指令建立或編輯筆記本 | |
| ```bash | |
| marimo edit | |
| ``` | |
| **作為應用程式執行** | |
| 運行應用程式。將您的筆記本作為網頁應用程式運行,Python 程式碼將被隱藏且不可編輯: | |
| ```bash | |
| marimo run your_notebook.py | |
| ``` | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-model-comparison.gif" style="border-radius: 8px" width="450px" /> | |
| **作為腳本執行** | |
| 作為腳本執行。 在命令列中將筆記本作為腳本執行 | |
| ```bash | |
| python your_notebook.py | |
| ``` | |
| **自動轉換現有的 Jupyter 筆記本** | |
| 自動轉換 Jupyter 筆記本。 使用 CLI 自動將 Jupyter 筆記本轉換為 marimo 筆記本 | |
| ```bash | |
| marimo convert your_notebook.ipynb > your_notebook.py | |
| ``` | |
| 或使用我們的[網頁介面](https://marimo.io/convert)。 | |
| **教學** | |
| 列出所有教學: | |
| ```bash | |
| marimo tutorial --help | |
| ``` | |
| **分享雲端筆記本。** | |
| 使用 [molab](https://molab.marimo.io/notebooks),一個類似於 Google Colab 的雲端 marimo 筆記本服務, | |
| 來創建和分享筆記本連結。 | |
| ## 有問題嗎? | |
| 請參閱我們文件中的[常見問題](https://docs.marimo.io/faq.html)。 | |
| ## 了解更多 | |
| marimo 容易上手,並為進階使用者提供了許多強大功能。 | |
| 例如,這是一個使用 marimo 製作的嵌入視覺化工具 | |
| ([影片](https://marimo.io/videos/landing/full.mp4)): | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/embedding.gif" width="700px" /> | |
| 查看我們的[文件](https://docs.marimo.io)、 | |
| [使用範例](https://docs.marimo.io/examples/),以及我們的[展示廊](https://marimo.io/gallery)以了解更多。 | |
| <table border="0"> | |
| <tr> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> | |
| <img src="https://docs.marimo.io/_static/reactive.gif" style="max-height: 150px; width: auto; display: block" /> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-ui.gif" style="max-height: 150px; width: auto; display: block" /> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-intro.gif" style="max-height: 150px; width: auto; display: block" /> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/outputs.gif" style="max-height: 150px; width: auto; display: block" /> | |
| </a> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/getting_started/key_concepts.html"> 教學 </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/api/inputs/index.html"> 輸入 </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/guides/working_with_data/plotting.html"> 繪圖 </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://docs.marimo.io/api/layouts/index.html"> 佈局 </a> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <a target="_blank" href="https://marimo.app/l/c7h6pz"> | |
| <img src="https://marimo.io/shield.svg"/> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://marimo.app/l/0ue871"> | |
| <img src="https://marimo.io/shield.svg"/> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://marimo.app/l/lxp1jk"> | |
| <img src="https://marimo.io/shield.svg"/> | |
| </a> | |
| </td> | |
| <td> | |
| <a target="_blank" href="https://marimo.app/l/14ovyr"> | |
| <img src="https://marimo.io/shield.svg"/> | |
| </a> | |
| </td> | |
| </tr> | |
| </table> | |
| ## 貢獻 | |
| 我們感謝所有的貢獻!您不需要是專家即可提供協助。 | |
| 請參閱 [CONTRIBUTING.md](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md) 以獲取更多關於如何開始的詳細資訊。 | |
| > 有問題嗎?請在 [Discord](https://marimo.io/discord?ref=readme) 上與我們聯繫。 | |
| 我們熱烈歡迎貢獻!您可以幫助 marimo: | |
| - 🐛 [回報錯誤](https://github.com/marimo-team/marimo/issues/new) | |
| - 💡 [提出功能請求](https://github.com/marimo-team/marimo/issues/new) | |
| - 📈 [upvote 功能請求](https://github.com/marimo-team/marimo/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc) | |
| - 🔨 [提交 pull requests](https://github.com/marimo-team/marimo/pulls) | |
| - 🌸 [分享您在 marimo 中製作的筆記本](https://github.com/marimo-team/marimo/discussions/categories/show-and-tell) | |
| - 🌟 [在 GitHub 上為我們加星](https://github.com/marimo-team/marimo) | |
| 有關如何貢獻的更多資訊,請參見[貢獻指南](https://docs.marimo.io/guides/contributing.html)。 | |
| > [!TIP] | |
| > 💡 **marimo 是為您和我們這樣的研究人員和工程師而建立的。** | |
| marimo 是一個 [NumFOCUS 附屬項目](https://numfocus.org/sponsored-projects/affiliated-projects),我們致力於長期維護。我們的使命是 _將筆記本重新塑造成[可重現、交互式和可共享的 Python 程式](https://docs.marimo.io/faq.html#faq-why),為研究和交流提供更好的程式設計環境。_ | |
| ## 社群 | |
| 我們正在建立一個社群。歡迎來與我們交流! | |
| - 🌟 [在 GitHub 上為我們加星](https://github.com/marimo-team/marimo) | |
| - 💬 [在 Discord 上與我們聊天](https://marimo.io/discord?ref=readme) | |
| - 📧 [訂閱我們的電子報](https://marimo.io/newsletter) | |
| - ☁️ [加入我們的雲端服務候補名單](https://marimo.io/cloud) | |
| - ✏️ [在 GitHub 上發起討論](https://github.com/marimo-team/marimo/discussions) | |
| - 🦋 [在 Bluesky 上追蹤我們](https://bsky.app/profile/marimo.io) | |
| - 🐦 [在 Twitter 上追蹤我們](https://twitter.com/marimo_io) | |
| - 🎥 [在 YouTube 上訂閱](https://www.youtube.com/@marimo-team) | |
| - 🕴️ [在 LinkedIn 上追蹤我們](https://www.linkedin.com/company/marimo-io) | |
| **NumFOCUS 附屬專案。** marimo 是更廣泛 Python 生態系統的核心部分,也是 NumFOCUS 社群的成員,該社群包括 NumPy、SciPy 和 Matplotlib 等專案。 | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/numfocus_affiliated_project.png" height="40px" /> | |
| ## 靈感 ✨ | |
| marimo 是 Python 筆記本的**重新發明**,作為一個可重現、互動且可分享的 Python 程式,而非容易出錯的 JSON 草稿本。 | |
| 我們相信工具會影響我們的思考方式——更好的工具,造就更好的思維。透過 marimo,我們希望為 Python 社群提供一個更好的程式設計環境,用以進行研究並傳達成果;實驗程式碼並分享它;學習計算科學並教授它。 | |
| 我們的靈感來自許多地方和專案,特別是 [Pluto.jl](https://github.com/fonsp/Pluto.jl)、[ObservableHQ](https://observablehq.com/tutorials) 和 [Bret Victor 的文章](http://worrydream.com/)。marimo 是朝向響應式資料流程式設計更大運動的一部分。從 [IPyflow](https://github.com/ipyflow/ipyflow)、[streamlit](https://github.com/streamlit/streamlit)、[TensorFlow](https://github.com/tensorflow/tensorflow)、[PyTorch](https://github.com/pytorch/pytorch/tree/main)、[JAX](https://github.com/google/jax) 到 [React](https://github.com/facebook/react),函數式、聲明式和響應式程式設計的理念正在改善廣泛的工具。 | |
| <p align="right"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-horizontal.png" height="200px"> | |
| </p> | |
| --- | |
| > **Note**: This is a community-contributed translation. The [English README](README.md) is the authoritative and most up-to-date version. | |
| > **注意**:這是社群貢獻的翻譯。[英文 README](README.md) 是最權威且最新的版本。 | |
| <p align="center"> | |
| <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg" alt="marimo 標誌"> | |
| </p> |
🧰 Tools
🪛 LanguageTool
[uncategorized] ~293-~293: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:好"地"思
Context: ... JSON 草稿本。 我們相信工具會影響我們的思考方式——更好的工具,造就更好的思維。透過 marimo,我們希望為 Python 社群提供一個更好的程式設計環...
(wb4)
🪛 markdownlint-cli2 (0.18.1)
2-2: Images should have alternate text (alt text)
(MD045, no-alt-text)
30-30: Images should have alternate text (alt text)
(MD045, no-alt-text)
31-31: Images should have alternate text (alt text)
(MD045, no-alt-text)
35-35: Images should have alternate text (alt text)
(MD045, no-alt-text)
70-70: Images should have alternate text (alt text)
(MD045, no-alt-text)
78-78: Images should have alternate text (alt text)
(MD045, no-alt-text)
82-82: Images should have alternate text (alt text)
(MD045, no-alt-text)
86-86: Images should have alternate text (alt text)
(MD045, no-alt-text)
90-90: Images should have alternate text (alt text)
(MD045, no-alt-text)
139-139: Images should have alternate text (alt text)
(MD045, no-alt-text)
182-182: Images should have alternate text (alt text)
(MD045, no-alt-text)
191-191: Images should have alternate text (alt text)
(MD045, no-alt-text)
196-196: Images should have alternate text (alt text)
(MD045, no-alt-text)
201-201: Images should have alternate text (alt text)
(MD045, no-alt-text)
206-206: Images should have alternate text (alt text)
(MD045, no-alt-text)
227-227: Images should have alternate text (alt text)
(MD045, no-alt-text)
232-232: Images should have alternate text (alt text)
(MD045, no-alt-text)
237-237: Images should have alternate text (alt text)
(MD045, no-alt-text)
242-242: Images should have alternate text (alt text)
(MD045, no-alt-text)
287-287: Images should have alternate text (alt text)
(MD045, no-alt-text)
298-298: Images should have alternate text (alt text)
(MD045, no-alt-text)
304-304: Blank line inside blockquote
(MD028, no-blanks-blockquote)
🤖 Prompt for AI Agents
In marimo/README_Traditional_Chinese.md around lines
2,30,31,35,70,78,82,86,90,139,182,191,196,201,206,227,232,237,242,287,298:
multiple <img> tags are missing alt attributes causing an accessibility
violation; for each <img> add a concise, descriptive alt="…" attribute (describe
the image purpose/context, e.g., "marimo 標誌", "示範互動 UI 畫面", or "reactive gif")
appropriate to the image and language of the document, keep alt text short and
meaningful, and leave alt="" only for purely decorative images if truly
decorative.
User description
📝 Summary
🔍 Description of Changes
📋 Checklist
PR Type
Enhancement, Documentation, Tests
Description
This PR represents a comprehensive overhaul and restructuring of the marimo project, including:
Major Enhancements:
Added comprehensive interactive table UI component with advanced features (pagination, sorting, filtering, cell selection, column summaries, lazy loading, and export functionality)
Implemented multi-provider AI completion system with streaming support for OpenAI, Azure, Anthropic, Google, and Bedrock
Enhanced cache decorator with async/await support, task deduplication, and runtime tracking
Added dataset extraction utilities and DuckDB database introspection capabilities
Implemented comprehensive CLI with authentication, sandbox mode, and file validation
Created AST parsing infrastructure for notebook serialization and validation
New Examples and Documentation:
Added interactive examples for Unsloth Llama 3.1 fine-tuning, HuggingFace chatbot, PyMDE graph embeddings
Created signal decomposition tutorial with CVXPY (Mauna Loa CO2, solar power, change point detection)
Added WASM-specific introduction notebook and updated main tutorial
Included comprehensive kitchen sink test notebook for UI components
Architecture Changes:
Created comprehensive request types module for runtime control
Added cache context base class with enhanced stub handling
Implemented CLI utilities for file operations and user prompts
Restructured multiple core modules (deleted and reorganized 80+ files)
Note: This appears to be a major refactoring or migration, with extensive file deletions suggesting a significant codebase reorganization.
Diagram Walkthrough
File Walkthrough
13 files
table.py
Add comprehensive interactive table UI component with advancedfeaturesmarimo/marimo/_plugins/ui/_impl/table.py
(Pandas, Polars, Ibis, PyArrow)
search functionality
styling and hover text
columns, and header tooltips
(CSV, JSON, Parquet)
providers.py
Add multi-provider AI completion system with streaming and toolsupportmarimo/marimo/_server/ai/providers.py
Azure OpenAI, Anthropic, Google, Bedrock)
providers
Anthropic extended thinking, and Google thinking models
certificates
tool call responses
cli.py
Complete CLI implementation with commands, authentication, and sandboxsupportmarimo/marimo/_cli/cli.py
commands (
edit,new,run,tutorial, etc.)--tokenand--token-passwordoptions--sandboxflag for isolatedenvironments with PEP 723 dependency tracking
conversion fallback for non-marimo Python files
server configuration options
parse.py
AST parsing infrastructure for marimo notebook serialization andvalidationmarimo/marimo/_ast/parse.py
ParserandExtractorclassesis_cell,is_setup_cell,is_body_cell, etc.)parse_notebookfunction to extract header, imports,version, app instantiation, and cells
detailed error messages
and code extraction from offsets
app.py
Interactive signal decomposition tutorial with multiple problem typesmarimo/examples/third_party/cvxpy/signals/app.py
multiple parts
for different signal types
solar power, change point detection)
configuration
classes
problems.py
Signal decomposition problem implementations with feedback andvisualizationmarimo/examples/third_party/cvxpy/signals/modules/problems.py
OSDProblembase class and concrete problemimplementations
change point detection, and soiling
for each problem type
CustomDataProblemclassdrawing_graphs.py
Interactive graph embedding visualization with PyMDEmarimo/examples/third_party/pymde/drawing_graphs.py
PyMDE
penalties and losses
and loss functions
save.py
Add async/await support and runtime tracking to cache decoratormarimo/marimo/_save/save.py
@cachedecorator with new_cache_call_asyncclass
duplicate work
_start_timeandruntimemetadata
UNEXPECTED_FAILURE_BOILERPLATEconstant tocache.pymodule_prepare_call_executionand_finalize_cache_updatehelper methodsmissesproperty to track actual cache misses instead of usingloader hits
CacheContextbase class for shared cache interface functionalityget_datasets.py
Add dataset extraction and DuckDB database introspection utilitiesmarimo/marimo/_data/get_datasets.py
and databases
get_datasets_from_variablesto convert Python objects toDataTablemodelsget_databases_from_duckdbfunction
has_updates_to_datasourcehelperDataTypeenumextensions
requests.py
Create comprehensive request types module for runtime controlmarimo/marimo/_runtime/requests.py
request types
HTTPRequestclass as pickle-able subset of Starlette/FastAPIRequest
ExecutionRequest,ExecuteMultipleRequest,ExecuteScratchpadRequest)SetUIElementValueRequest,FunctionCallRequest)SetCellConfigRequest,SetUserConfigRequest)ClearCacheRequest,GetCacheInfoRequest)cache.py
Add cache context base class and enhance cache stub handlingmarimo/marimo/_save/cache.py
UNEXPECTED_FAILURE_BOILERPLATEconstant fromsave.pyto thismodule
CacheContextbase class with cache statistics methods(
cache_info,cache_clear)hits,misses,maxsize,currsize, andtime_savedpropertiesloaderproperty for accessing the underlyingLoaderinstanceCacheclass with_restore_from_stub_if_neededand_convert_to_stub_if_neededmethodspreserve_pointersparameter to maintain object identity duringstub conversion
dataloaders.py
Add data loading utilities for signal processing examplesmarimo/examples/third_party/cvxpy/signals/modules/dataloaders.py
get_c02_datato fetch and clean CO2 measurement data fromNOAA
make_changepoint_datafor generating synthetic changepointdetection datasets
get_pvdaq_datafor loading photovoltaic system datamake_soiling_datawith complex PV time series simulationincluding seasonality and degradation
utils.py
Add CLI utility for file overwrite confirmation promptsmarimo/marimo/_cli/utils.py
prompt_to_overwritefunctionGLOBAL_SETTINGS.YESflag to skip promptsclick.confirmfor interactive overwrite confirmation4 files
llama_3_1_8b_2x_faster_finetuning.py
Add interactive Unsloth Llama 3.1 fine-tuning example notebookmarimo/examples/third_party/unsloth/llama_3_1_8b_2x_faster_finetuning.py
using Unsloth
parameters (max sequence length, 4-bit loading)
adapters
testing the fine-tuned model
chatbot.py
Add HuggingFace chatbot example with configurable parametersmarimo/examples/third_party/huggingface/chatbot.py
model
(temperature, top-p, max tokens, system message)
wasm-intro.py
Add WASM-specific introduction and tutorial notebookmarimo/frontend/public/files/wasm-intro.py
and UI elements
intro.py
Update introduction tutorial with lazy mode and enhanced tipsmarimo/marimo/_tutorials/intro.py
1 files
kitchen_sink.py
Add comprehensive kitchen sink test notebook for UI componentsmarimo/frontend/e2e-tests/py/kitchen_sink.py
dropdowns, tables, charts, etc.)
layout components
patterns
101 files