apparent_encoding() — requests Function Reference
Architecture documentation for the apparent_encoding() function in models.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD 66352a67_d118_f313_84a1_5784cde1fca4["apparent_encoding()"] eb32847e_3797_d01a_6e44_345e9ea7e251["Response"] 66352a67_d118_f313_84a1_5784cde1fca4 -->|defined in| eb32847e_3797_d01a_6e44_345e9ea7e251 style 66352a67_d118_f313_84a1_5784cde1fca4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/requests/models.py lines 792–799
def apparent_encoding(self):
"""The apparent encoding, provided by the charset_normalizer or chardet libraries."""
if chardet is not None:
return chardet.detect(self.content)["encoding"]
else:
# If no character detection library is available, we'll fall back
# to a standard Python utf-8 str.
return "utf-8"
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does apparent_encoding() do?
apparent_encoding() is a function in the requests codebase, defined in src/requests/models.py.
Where is apparent_encoding() defined?
apparent_encoding() is defined in src/requests/models.py at line 792.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free