Home / Function/ _get_idna_encoded_host() — requests Function Reference

_get_idna_encoded_host() — requests Function Reference

Architecture documentation for the _get_idna_encoded_host() function in models.py from the requests codebase.

Entity Profile

Dependency Diagram

graph TD
  f217af3f_cba9_c7bc_ae2a_4fe5a6bea032["_get_idna_encoded_host()"]
  c8cfcd0c_a36a_3124_6cd4_1516b06c63b3["PreparedRequest"]
  f217af3f_cba9_c7bc_ae2a_4fe5a6bea032 -->|defined in| c8cfcd0c_a36a_3124_6cd4_1516b06c63b3
  77892816_404a_4492_b558_b565f63d2ad0["prepare_url()"]
  77892816_404a_4492_b558_b565f63d2ad0 -->|calls| f217af3f_cba9_c7bc_ae2a_4fe5a6bea032
  style f217af3f_cba9_c7bc_ae2a_4fe5a6bea032 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/requests/models.py lines 402–409

    def _get_idna_encoded_host(host):
        import idna

        try:
            host = idna.encode(host, uts46=True).decode("utf-8")
        except idna.IDNAError:
            raise UnicodeError
        return host

Domain

Subdomains

Called By

Frequently Asked Questions

What does _get_idna_encoded_host() do?
_get_idna_encoded_host() is a function in the requests codebase, defined in src/requests/models.py.
Where is _get_idna_encoded_host() defined?
_get_idna_encoded_host() is defined in src/requests/models.py at line 402.
What calls _get_idna_encoded_host()?
_get_idna_encoded_host() is called by 1 function(s): prepare_url.

Analyze Your Own Codebase

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

Try Supermodel Free