selfbrowse 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
selfbrowse/__init__.py ADDED
@@ -0,0 +1,16 @@
1
+ """Selfbrowse — a small browser agent that gets cheaper the more you use it."""
2
+ from selfbrowse.types import RunResult, Step, Usage
3
+
4
+ __version__ = "0.1.0"
5
+
6
+ __all__ = ["BrowseAgent", "Browser", "RunResult", "Step", "Usage", "__version__"]
7
+
8
+
9
+ def __getattr__(name: str): # lazy: importing `selfbrowse` must not import Playwright
10
+ if name == "BrowseAgent":
11
+ from selfbrowse.agent import BrowseAgent
12
+ return BrowseAgent
13
+ if name == "Browser":
14
+ from selfbrowse.browser import Browser
15
+ return Browser
16
+ raise AttributeError(name)
selfbrowse/__main__.py ADDED
@@ -0,0 +1,3 @@
1
+ from selfbrowse.cli import main
2
+
3
+ raise SystemExit(main())
selfbrowse/_about.py ADDED
@@ -0,0 +1,11 @@
1
+ """
2
+ The project's name and name-derived defaults, kept in one place.
3
+
4
+ Renaming the project means changing this file, the package folder, ``pyproject.toml``
5
+ and the docs — nothing else hard-codes the name.
6
+ """
7
+
8
+ NAME = "selfbrowse" # import name, CLI command, PyPI name
9
+ DISPLAY_NAME = "Selfbrowse"
10
+ HOME_DIRNAME = ".selfbrowse" # per-user data folder under the home directory
11
+ ENV_PREFIX = "SELFBROWSE_" # environment variable prefix