_implementation() — requests Function Reference
Architecture documentation for the _implementation() function in help.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD b48dc370_bfcb_dfa8_a349_6f21dd5b1dc1["_implementation()"] e5056bdf_dfc5_d1be_4b2a_43c5b15bf617["help.py"] b48dc370_bfcb_dfa8_a349_6f21dd5b1dc1 -->|defined in| e5056bdf_dfc5_d1be_4b2a_43c5b15bf617 4a32e838_e6f0_c10f_86ea_de9ca62fa6fd["info()"] 4a32e838_e6f0_c10f_86ea_de9ca62fa6fd -->|calls| b48dc370_bfcb_dfa8_a349_6f21dd5b1dc1 style b48dc370_bfcb_dfa8_a349_6f21dd5b1dc1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/requests/help.py lines 34–63
def _implementation():
"""Return a dict with the Python implementation and version.
Provide both the name and the version of the Python implementation
currently running. For example, on CPython 3.10.3 it will return
{'name': 'CPython', 'version': '3.10.3'}.
This function works best on CPython and PyPy: in particular, it probably
doesn't work for Jython or IronPython. Future investigation should be done
to work out the correct shape of the code for those platforms.
"""
implementation = platform.python_implementation()
if implementation == "CPython":
implementation_version = platform.python_version()
elif implementation == "PyPy":
pypy = sys.pypy_version_info
implementation_version = f"{pypy.major}.{pypy.minor}.{pypy.micro}"
if sys.pypy_version_info.releaselevel != "final":
implementation_version = "".join(
[implementation_version, sys.pypy_version_info.releaselevel]
)
elif implementation == "Jython":
implementation_version = platform.python_version() # Complete Guess
elif implementation == "IronPython":
implementation_version = platform.python_version() # Complete Guess
else:
implementation_version = "Unknown"
return {"name": implementation, "version": implementation_version}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does _implementation() do?
_implementation() is a function in the requests codebase, defined in src/requests/help.py.
Where is _implementation() defined?
_implementation() is defined in src/requests/help.py at line 34.
What calls _implementation()?
_implementation() is called by 1 function(s): info.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free