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:
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.Listor the moduleemail.mime.text. - Double colon: C++ and Rust descend through namespaces with paths like
std::vectororstd::collections::HashMap, and Ruby names constants the same way, as inNet::HTTP. - Multi-part path: SQL addresses a table as
database.schema.table, and a fully qualified domain name (FQDN) such asdocs.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.
Related Resources
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.
For additional information on related topics, take a look at the following resources:
- Absolute vs Relative Imports in Python (Tutorial)
- Python import: Advanced Techniques and Tips (Tutorial)
- What's a Python Namespace Package, and What's It For? (Tutorial)
- Python's __all__: Packages, Modules, and Wildcard Imports (Tutorial)
- Navigating Namespaces and Scope in Python (Course)
- Namespaces and Scope in Python (Quiz)
- Namespaces in Python (Quiz)
- Absolute vs Relative Imports in Python (Course)
- Absolute vs Relative Imports in Python (Quiz)
- Advanced Python import Techniques (Course)
- Python import: Advanced Techniques and Tips (Quiz)
- Python Namespace Packages (Quiz)
- Managing Imports With Python's __all__ (Course)
- Python's __all__: Packages, Modules, and Wildcard Imports (Quiz)
By Martin Breuss • Updated July 23, 2026