@@ -6,7 +6,7 @@ Installation
66
77.. code-block :: console
88
9- pip install py -discovery
9+ pip install python -discovery
1010
1111 Core concepts
1212-------------
@@ -39,24 +39,24 @@ The simplest use case: get information about the Python that is running right no
3939
4040 from pathlib import Path
4141
42- from py_discovery import DiskCache, PythonInfo
42+ from python_discovery import DiskCache, PythonInfo
4343
44- cache = DiskCache(root = Path(" ~/.cache/py -discovery" ).expanduser())
44+ cache = DiskCache(root = Path(" ~/.cache/python -discovery" ).expanduser())
4545 info = PythonInfo.current_system(cache)
4646
4747 print (info.executable) # /usr/bin/python3.12
4848 print (info.version_info[:3 ]) # (3, 12, 1)
4949 print (info.implementation) # CPython (or PyPy, GraalPy, etc.)
5050 print (info.architecture) # 64 (or 32)
5151
52- The returned :class: `~py_discovery .PythonInfo ` object contains everything the library knows about that interpreter:
52+ The returned :class: `~python_discovery .PythonInfo ` object contains everything the library knows about that interpreter:
5353paths, version numbers, sysconfig variables, platform details, and more.
5454
5555Finding a different interpreter
5656--------------------------------
5757
5858Usually you need a *specific * Python version, not the one currently running. Pass a **spec ** string
59- to :func: `~py_discovery .get_interpreter ` to search your system.
59+ to :func: `~python_discovery .get_interpreter ` to search your system.
6060
6161.. mermaid ::
6262
@@ -74,9 +74,9 @@ to :func:`~py_discovery.get_interpreter` to search your system.
7474
7575 from pathlib import Path
7676
77- from py_discovery import DiskCache, get_interpreter
77+ from python_discovery import DiskCache, get_interpreter
7878
79- cache = DiskCache(root = Path(" ~/.cache/py -discovery" ).expanduser())
79+ cache = DiskCache(root = Path(" ~/.cache/python -discovery" ).expanduser())
8080 result = get_interpreter(" python3.12" , cache = cache)
8181 if result is not None :
8282 print (result.executable)
@@ -90,7 +90,7 @@ You can pass multiple specs as a list -- the library tries each one in order and
9090 Writing specs
9191-------------
9292
93- A spec tells py -discovery what to look for. The simplest form is just a version number like ``3.12 ``.
93+ A spec tells python -discovery what to look for. The simplest form is just a version number like ``3.12 ``.
9494You can add more constraints to narrow the search.
9595
9696.. mermaid ::
@@ -139,7 +139,7 @@ Parsing a spec
139139--------------
140140
141141You can parse a spec string into its components without searching the system. This is useful for
142- inspecting what a spec means or for building tools on top of py -discovery.
142+ inspecting what a spec means or for building tools on top of python -discovery.
143143
144144.. mermaid ::
145145
@@ -157,7 +157,7 @@ inspecting what a spec means or for building tools on top of py-discovery.
157157
158158.. code-block :: python
159159
160- from py_discovery import PythonSpec
160+ from python_discovery import PythonSpec
161161
162162 spec = PythonSpec.from_string_spec(" cpython3.12t-64-arm64" )
163163 spec.implementation # "cpython"
@@ -175,6 +175,6 @@ Every call will run a subprocess to query the interpreter, so this is slower for
175175
176176.. code-block :: python
177177
178- from py_discovery import get_interpreter
178+ from python_discovery import get_interpreter
179179
180180 result = get_interpreter(" python3.12" )
0 commit comments