I think naming an interface with an I prefix is perfectly acceptable.

e.g.:

  • IFoo
  • IPublishable

A few years back I used Zope Interfaces. I noticed most codebases used this convention. Our team did too.

We preferred IFoo vs. FooInterface or IFooInterface

Answer from Shekhar on Stack Overflow
Discussions

object oriented design - Does using the word "base" in a class name indicate abstraction? - Software Engineering Stack Exchange
I'm wondering if there is a widely accepted convention for naming base classed in OOP. Does marking a parent class with "Base" indicate that it's abstract or that it's just an extended cl... More on softwareengineering.stackexchange.com
🌐 softwareengineering.stackexchange.com
Naming convention for abstract classes
I'm not sure if it's the formal convention, but I usually name my abstract classes with the word "Abstract" first to definitively indicate they are abstract, then name subclasses with some keyword that indicates they are a subclass of that ABC. class AbstractThing(abc.ABC): ... class ImplementedThing(AbstractThing): ... Edit: I hate formatting on mobile More on reddit.com
🌐 r/learnpython
3
1
August 15, 2020
How do you name Interface(Abstract Base classes, etc) modules, classes in python?
Namaste! Thanks for submitting to r/developersIndia . Make sure to follow the subreddit Code of Conduct while participating in this thread. developersIndia is a volunteer effort, would you like to join the community team to make devsindia the best of the best? I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/developersIndia
4
2
February 26, 2023
oop - Python: how to make abstract class attribute, with all caps naming convention and linter warnings - Stack Overflow
Thanks for posting this, I have ... with CAPS is a PEP convention. ... I think the property decorator approach is the cleanest. Just silence pylint: @abstractmethod @property def CONST_CLASS_ATTR(self) -> str: # pylint: disable=invalid-name return "base"... More on stackoverflow.com
🌐 stackoverflow.com
March 26, 2020
🌐
Python
docs.python.org › 3 › library › abc.html
abc — Abstract Base Classes
Note that the type of ABC is still ABCMeta, therefore inheriting from ABC requires the usual precautions regarding metaclass usage, as multiple inheritance may lead to metaclass conflicts. One may also define an abstract base class by passing the metaclass keyword and using ABCMeta directly, for example:
🌐
Zaiste
zaiste.net › posts › abstract-classes-python
Abstract Classes in Python · Zaiste Programming
January 10, 2013 - Because of Python's dynamic nature there are few things being checked during compilation, and there is no advanced type checking at that stage. For that reason, we could declare an abstract method by just raising a NotImplementedError. class Animal: def say_something(self): raise NotImplementedError() Additionaly, a class could follow some naming conventions e.g. prefixing a class name with Base or Abstract.
🌐
TutsWiki
tutswiki.com › abstract-classes-and-interfaces-in-python
Abstract classes and interfaces in Python :: TutsWiki Beta
ABC allows you to define a class, indicating which methods or properties must be overridden in inherited classes: from abc import ABCMeta, abstractmethod, abstractproperty class Movable(): __metaclass __ = ABCMeta @abstractmethod def move(): """Move object""" @abstractproperty def speed(): ...
🌐
Adam-bien
adam-bien.com › roller › abien › entry › are_naming_conventions_still_needed
Are Naming Conventions Still Needed For Abstract Classes?
September 14, 2009 - Some reasons, why "Abstract" doesn't have to appear as prefix in the name of an ... A prefix "Abstract" doesn't provide any additional value to the user - in contrary it blurs the actual intension. Modern IDEs don't let you instantiate an abstract class, even before saving / compiling.
Top answer
1 of 6
6

"I'm wondering if there is a widely accepted convention for naming base classed in OOP"

Short answer: no, there is not.

If you want to read something directly out of the name of a class, you need to consult the programming guidelines of your team or organization. There are only very few widely accepted naming conventions, and even those don't apply to "OOP in general", but usually to a specific language ecosystem.

For example, in C#, I would usually expect a type name starting with a single I to be an interface (though not every team names gives interfaces always an I prefix; it is a convention suggested by Microsoft). For a class ending with the word Exception I would expect it to be a derivation of System.Exception. And (as mentioned in a comment by @Blake, thanks), attribute classes in C# usually end with the suffix Attribute. In Python, the PEP 8 style guide suggests to let exception classes (which represent errors) end with the name Error.

Specifically for C#, I guess that list is complete. I cannot remember to have seen a naming style "broadly accepted" across teams and organizations, where part of a class name induces a clear semantics.

2 of 6
3

Honestly this reeks of Hungarian Notation. Or to be more correct about it badly applied Hungarian Notation.

Hungarian Notation was meant to express type information that the programming language could not. For example in Assembly it is helpful to know if you are dealing with a pointer to a string, or an int. The language isn't going to track this for you so a local naming standard encoding the type information is particularly helpful.

However this falls flat on its face in languages which have expressive type systems that can encode this information outside of the name. This could by by designating the type as abstract for example or only providing protected constructors only available to deriving types.

A good example of poorly applied Hungarian Notation is the I in a C# interface name like IComparable. Comparable is a sufficiently good name, and the fact that its an interface is surfaced easily enough by looking at its definition, or through an ide.

So i'd ask. Does this language allow me to express in the type system that this class is available for derivation? If so then drop the Base and just call it Car. It easy enough to identify that Model-Y derives from Car.

If the language does not support this ability, then I'd consult in order: You organisational naming conventions, the platform/language naming standards/conventions, the strict need to express this information at all in the name.

Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › python › abstract-classes-in-python
Abstract Classes in Python - GeeksforGeeks
An Abstract Base Class (ABC) defines methods that must be implemented by its subclasses, ensuring that the subclasses follow a consistent structure. ABCs allow you to define common interfaces that various subclasses can implement while enforcing a level of abstraction. Python provides the abc module to define ABCs and enforce the implementation of abstract methods in subclasses.
Published   September 3, 2025
🌐
Reddit
reddit.com › r/learnpython › naming convention for abstract classes
r/learnpython on Reddit: Naming convention for abstract classes
August 15, 2020 -

Hi.

I didn't find any information about this in PEP8, nor did my Google search reveal any informal rules, so I'm asking here: Say I have this:

import abc
class Repo(abc.ABC):
    pass

class RepoImpl(Repo):
    pass

Should I rename rename "RepoImpl" to "Repo" and "Repo" to a) IRepo or b) RepoInterface? Or are there any other conventions the Python community has settled on?

🌐
Llego
llego.dev › home › blog › naming conventions and best practices for class and object names in python
Naming Conventions and Best Practices for Class and Object Names in Python - llego.dev
July 9, 2023 - Additionally, these key points apply specifically for naming classes and objects in Python: Class names should use the CapWords or UpperCamelCase convention. Object and instance names should use lowercase_with_underscores.
🌐
Medium
leapcell.medium.com › elegant-abstractions-mastering-abstract-base-classes-in-advanced-python-bf3739dd815e
Elegant Abstractions: Mastering Abstract Base Classes in Advanced Python
May 2, 2025 - Use ABC to declare LeapCellFileHandler as an abstract base class. Use the @abstractmethod decorator to mark abstract methods. If you try to instantiate a subclass that has not implemented all abstract methods, Python will raise an exception:
🌐
Python
peps.python.org › pep-3119
PEP 3119 – Introducing Abstract Base Classes | peps.python.org
Dynamically adding abstract methods to a class, or attempting to modify the abstraction status of a method or class once it is created, are not supported. The @abstractmethod only affects subclasses derived using regular inheritance; “virtual subclasses” registered with the register() method are not affected. Implementation: The @abstractmethod decorator sets the function attribute __isabstractmethod__ to the value True. The ABCMeta.__new__ method computes the type attribute __abstractmethods__ as the set of all method names that have an __isabstractmethod__ attribute whose value is true.
🌐
Real Python
realpython.com › ref › glossary › abstract-base-class
abstract base class (ABC) | Python Glossary – Real Python
This is useful for ensuring that derived classes implement particular methods from the base class, providing a consistent interface for different parts of your program. To define an abstract base class, you inherit from abc.ABC and use the @abstractmethod decorator to mark methods that must be implemented by subclasses.
🌐
Real Python
realpython.com › python-interface
Implementing an Interface in Python – Real Python
February 21, 2024 - An abstract method is a method that’s declared by the Python interface, but it may not have a useful implementation. The abstract method must be overridden by the concrete class that implements the interface in question.
🌐
Reddit
reddit.com › r/cplusplus › would it be sacrilegious to name pure abstract base classes with the 'i' prefix?
r/Cplusplus on Reddit: Would it be sacrilegious to name pure abstract base classes with the 'I' prefix?
September 3, 2023 -

So I'm learning C++ after spending a good bulk of my time programming in C# and Java.

Because of this, learning C++ has been pretty easy. Mostly just syntax and quirks here and there, but one thing that is difficult to adopt is the fact that C++ does not have interfaces.

That's all well and good, just make a pure abstract base class. My struggle is here however:

Is it wrong to denote one of these classes with an 'I' prefix, such as IPrintable? I have not come across anything like that in C++ code bases and am really wondering how I'm supposed to distinguish my "interfaces" from other concrete classes.

Is there any standard for this? Do people just remember which classes are and aren't/wait for a lint error to throw for not implementing said methods?

Top answer
1 of 2
324

Quoting https://www.python.org/dev/peps/pep-0008/#package-and-module-names:

Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.

For classes:

Class names should normally use the CapWords convention.

And function and (local) variable names should be:

lowercase, with words separated by underscores as necessary to improve readability

See this answer for the difference between a module, class and package:

  • A Python module is simply a Python source file, which can expose classes, functions and global variables.
  • A Python package is simply a directory of Python module(s).

So PEP 8 tells you that:

  • modules (filenames) should have short, all-lowercase names, and they can contain underscores;
  • packages (directories) should have short, all-lowercase names, preferably without underscores;
  • classes should use the CapWords convention.

PEP 8 tells that names should be short; this answer gives a good overview of what to take into account when creating variable names, which also apply to other names (for classes, packages, etc.):

  • variable names are not full descriptors;
  • put details in comments;
  • too specific name might mean too specific code;
  • keep short scopes for quick lookup;
  • spend time thinking about readability.

To finish, a good overview of the naming conventions is given in the Google Python Style Guide.

2 of 2
94

Here is a link for different types of Python name conventions:

Type Public Internal
Packages lower_with_under
Modules lower_with_under _lower_with_under
Classes CapWords _CapWords
Exceptions CapWords
Functions lower_with_under() _lower_with_under()
Global/Class Constants CAPS_WITH_UNDER _CAPS_WITH_UNDER
Global/Class Variables lower_with_under _lower_with_under
Instance Variables lower_with_under _lower_with_under
Method Names lower_with_under() _lower_with_under()
Function/Method Parameters lower_with_under
Local Variables lower_with_under

The style guide for Python is based on Guido’s naming convention recommendations.

🌐
Python Course
python-course.eu › oop › the-abc-of-abstract-base-classes.php
20. The 'ABC' of Abstract Base Classes | OOP | python-course.eu
Our example implemented a case of simple inheritance which has nothing to do with an abstract class. In fact, Python on its own doesn't provide abstract classes. Yet, Python comes with a module which provides the infrastructure for defining Abstract Base Classes (ABCs).