Skip to content

fully qualified name (FQN)

A fully qualified name (FQN) is a name that identifies a program element without ambiguity by spelling out the complete path of enclosing namespaces, packages, modules, or scopes needed to reach it. Because it carries that full context, an FQN denotes the same element from anywhere, unlike a short or relative name whose meaning depends on the current scope or set of imports.

Reading the Python FQN email.mime.text.MIMEText from left to right walks down one enclosing level at a time to reach the element it names:

The FQN email.mime.text.MIMEText read left to right, from the email package down through subpackage and module to the MIMEText class.
Reading email.mime.text.MIMEText Level by Level

Most languages build an FQN by joining the levels of the hierarchy with a separator, though the exact delimiter differs from one language to the next:

  • Dot: Java, C#, and Python chain package, module, and member names, as in java.util.List or the module email.mime.text.
  • Double colon: C++ and Rust descend through namespaces with paths like std::vector or std::collections::HashMap, and Ruby names constants the same way, as in Net::HTTP.
  • Multi-part path: SQL addresses a table as database.schema.table, and a fully qualified domain name (FQDN) such as docs.python.org. names a host all the way up to the DNS root.

The idea appears wherever names must stay unambiguous across a large system. Stack traces print FQNs so a symbol traces back to its exact definition, and import machinery, serialization formats, and reflection APIs use them to locate code by name. In Python, an object’s fully qualified name combines its __module__ with its __qualname__, the dotted path from a module’s global scope to a nested class, function, or method.

Namespaces and Scopes in Python

Tutorial

Namespaces in Python

In this tutorial, you'll learn about Python namespaces, the structures that store and organize the symbolic names during the execution of a Python program. You'll learn when namespaces are created, how they're implemented, and how they support variable scope.

intermediate python

For additional information on related topics, take a look at the following resources:


By Martin Breuss • Updated July 23, 2026