Add your description here
Project description
astronote
astronote は notebook 化したい関数を entrypoint としてマークするための最小 API を提供します。
Usage
from astronote import notebook_entry
@notebook_entry
def daily_report() -> None:
print("build report")
@notebook_entry(name="weekly-summary")
def weekly_summary() -> None:
print("build summary")
@notebook_entry と @notebook_entry(...) の両方を利用できます。各関数には将来の CLI が複数 entrypoint を識別しやすいよう、__astronote_notebook_entries__ 属性へタプル形式でメタデータが保持されます。
Parameter file workflow
astronote can read a JSON parameter file, merge CLI overrides, and record the resolved inputs in notebook metadata.
{
"run_date": "2026-03-20",
"mode": "daily"
}
astronote pipelines/report.py --entrypoint run_report --parameter-file params/report.json --override mode="weekly" --show-schema
Generation flow:
--parameter-fileloads a JSON object and matches keys against the selected entrypoint signature.- Signature defaults fill in missing optional arguments.
--override KEY=JSONapplies last and wins over the parameter file.- The emitted notebook metadata stores a manifest containing the resolved parameters, source path, entrypoint, generated timestamp, tool version, and a simplified parameter schema.
Module expansion
Use --expand-module MODULE to inline a local dependency directly into the generated notebook source when the source script imports sibling modules.
astronote examples/example_multiple_file.py --expand-module sub_module
--expand-module accepts module names only. The value must exactly match the import string used in the source.
For from sub_mod import func, pass --expand-module sub_mod. For from pkg import sub_mod, pass --expand-module pkg.sub_mod.
For example, sub_module and .sub_module are treated as different values.
Relative import targets such as .sub_module are still unsupported as direct --expand-module values. Rewrite them to absolute imports before passing them on the CLI.
astronote recursively expands local dependencies imported by any requested module. Repeat --expand-module only when the source script itself imports multiple top-level local modules that should be embedded.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file astronote-0.1.0.tar.gz.
File metadata
- Download URL: astronote-0.1.0.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
275fb49fb7ac7090c7ee4e4d2fe493c5281b5a1a6fdf13f6f8a35ebb358f72e5
|
|
| MD5 |
392b9d4bd3527d734078529a67601f82
|
|
| BLAKE2b-256 |
44ed1fd6d2292d6474b156e70ba1d7b7e4b357f87193350d1b859ca4853a943e
|
File details
Details for the file astronote-0.1.0-py3-none-any.whl.
File metadata
- Download URL: astronote-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a3053efd19b32f70d1954194a6a7d9b66469696d5ff2878853f0cc8f0ecce8d
|
|
| MD5 |
51567bf191811cd91eeca9382e161464
|
|
| BLAKE2b-256 |
722883d3c34080ec49fe0f260abc07aaaadfb2ee537a0c42f090aa26bd1a580b
|