I don't understand, sorry. How does declaring an optional dependency in a toml file solve the problem of accessing the symbol in your code?
Also, you need something that works for simple one-file scripts, not just a whole package or project.
Also, you need something that works for simple one-file scripts, not just a whole package or project.
If you need something for one-off scripts, use https://docs.astral.sh/uv/guides/scripts/.