Home / Function/ _has_encoding() — flask Function Reference

_has_encoding() — flask Function Reference

Architecture documentation for the _has_encoding() function in test_json.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  d9dea4dc_a9c6_6f2f_1d38_ae165bd5c8d7["_has_encoding()"]
  b6432813_8c45_5dc1_5241_b6184964d73b["test_json.py"]
  d9dea4dc_a9c6_6f2f_1d38_ae165bd5c8d7 -->|defined in| b6432813_8c45_5dc1_5241_b6184964d73b
  style d9dea4dc_a9c6_6f2f_1d38_ae165bd5c8d7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_json.py lines 260–267

def _has_encoding(name):
    try:
        import codecs

        codecs.lookup(name)
        return True
    except LookupError:
        return False

Subdomains

Defined In

Frequently Asked Questions

What does _has_encoding() do?
_has_encoding() is a function in the flask codebase, defined in tests/test_json.py.
Where is _has_encoding() defined?
_has_encoding() is defined in tests/test_json.py at line 260.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free