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
🌐
Python
peps.python.org › pep-0008
PEP 8 – Style Guide for Python Code | peps.python.org
When an extension module written in C or C++ has an accompanying Python module that provides a higher level (e.g. more object oriented) interface, the C/C++ module has a leading underscore (e.g. _socket). Class names should normally use the CapWords convention.
Discussions

coding style - Python file naming convention? - Software Engineering Stack Exchange
I've seen this part of PEP-8 https://www.python.org/dev/peps/pep-0008/#package-and-module-names I'm not clear on whether this refers to the file name of a module/class/package. If I had one examp... More on softwareengineering.stackexchange.com
🌐 softwareengineering.stackexchange.com
February 1, 2016
What is the naming convention in Python for variables and functions? - Stack Overflow
Personally, I like to use snake_case ... for the interfaces. I don't know how these people do research, my eye-tracking is definitely the fastest for short CamelCase and mixedCase names. 2021-10-07T15:21:23.817Z+00:00 ... The coding style is usually part of an organization's internal policy/convention standards, but I think in general, the all_lower_case_underscore_separator style (also called snake_case) is most common in python... More on stackoverflow.com
🌐 stackoverflow.com
Naming conventions and good practice? m_, _, _ptr, g_, get(), set()
The best naming convention is the one which is consistent with the rest of your project; as the only thing worse than a "bad" naming convention is a mix of them in one place. But to answer your question, there isn't realy a universally accepted practice. So long as your names are clear, don't break any of the very few reserved identifiers rules, and your code is readable I don't think anyone will really care if your member data has a m_ or a trailing _ (note - leading underscores can start hitting reserved identifiers and you'll probably want to avoid those). The only consistent rule I tend to see is to use BLOCK CAPS for preprocessor macros as those aren't at the language level and can behave in very unexpected ways; but as I say on your own and in your own code the challenge is picking the right descriptive name rather than wringing hands over whether it should start with a capital letter. When you work for a company they may well have their own style and it is a good idea to follow it; but even then that can vary from place to place. More on reddit.com
🌐 r/cpp_questions
54
7
April 26, 2024
Would it be sacrilegious to name pure abstract base classes with the 'I' prefix?
Thank you for your contribution to the C++ community! As you're asking a question or seeking homework help, we would like to remind you of Rule 3 - Good Faith Help Requests & Homework. When posting a question or homework help request, you must explain your good faith efforts to resolve the problem or complete the assignment on your own. Low-effort questions will be removed. Members of this subreddit are happy to help give you a nudge in the right direction. However, we will not do your homework for you, make apps for you, etc. Homework help posts must be flaired with Homework. ~ CPlusPlus Moderation Team 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/Cplusplus
10
5
September 3, 2023
🌐
Real Python
realpython.com › python-double-underscore
Single and Double Underscores in Python Names – Real Python
August 18, 2025 - To approach this question, the Python community has a well-established naming convention: If a name starts with a letter in uppercase or lowercase, then you should consider that name public and, therefore, part of the code’s API.
🌐
DEV Community
dev.to › alvesjessica › interfaces-in-python-not-truly-an-interface-just-a-convention-43d3
Interfaces in Python: not truly an interface, just a convention. - DEV Community
September 14, 2022 - It has no implementations at all, just the definition of abstract methods. By convention you don't have to but you can use the "Interface" word on the name of the class you created to be the interface.
🌐
DEV Community
dev.to › adammc331 › interface-naming-conventions-3m0o
Interface Naming Conventions - DEV Community
February 6, 2023 - Reviews a few different approaches to naming interfaces and their implementations.
🌐
Namingconvention
namingconvention.org › python
Python · Naming Convention
The style guide for Python is based on Guido’s naming convention recommendations.
Find elsewhere
🌐
LinkedIn
linkedin.com › all › interfaces
How do you name interfaces that are derived or extended from other interfaces?
April 6, 2022 - Common conventions include prefixing interface names with I, such as IAnimal, IFoo, or IDisposable (used in C#, Java, and TypeScript to indicate that the name is an interface). Alternatively, you can use adjectives or nouns that describe the ...
🌐
Real Python
realpython.com › videos › public-non-public-interfaces
Understanding Public & Non-Public Interfaces (Video) – Real Python
04:07 Just to elaborate on that statement, let’s have a look at how IDEs might rely or at least take account of the naming convention of having leading underscores. 04:19 So the class, MyClass here has two methods: a public method, which does not start with an underscore, and all this method does is it prints the word “public”. 04:30 And then there’s a private method which starts with an underscore, and all that does is it prints the word “private”. We then have our if __name__ == "__main__": section where we create an instance of MyClass and then we access the public method of MyClass and then we access the private method of the class.
Published   May 9, 2024
🌐
Real Python
realpython.com › python-interface
Implementing an Interface in Python – Real Python
February 21, 2024 - class InformalParserInterface: def load_data_source(self, path: str, file_name: str) -> str: """Load in the file for extracting text.""" pass def extract_text(self, full_file_name: str) -> dict: """Extract text from the currently loaded file.""" pass · InformalParserInterface defines the two methods .load_data_source() and .extract_text(). These methods are defined but not implemented. The implementation will occur once you create concrete classes that inherit from InformalParserInterface. As you can see, InformalParserInterface looks identical to a standard Python class.
🌐
Python Guides
pythonguides.com › python-naming-conventions
Naming Conventions In Python
November 21, 2024 - Names without leading underscores ... freely. The conventions for internal interfaces involve using underscore prefixes to indicate that these components are intended for use only within a specific module or class....
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-naming-conventions
Python Naming Conventions - GeeksforGeeks
July 23, 2025 - A descriptive name that accurately reflects the purpose of a variable or function reduces the likelihood of misunderstandings or unintentional misuse. In conclusion, By emphasizing readability, supporting collaborative development, aiding error prevention, and enabling seamless tool integration, these conventions serve as a guiding principle for Python developers.
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.

🌐
Dremendo
dremendo.com › python-programming-tutorial › python-naming-conventions
Naming Convention in Python Programming | Dremendo
No keywords or command can be used as a class or interface name. If the class name is more than one word then the first letter of each word should be written in uppercase and the rest of the letter should be written in lowercase.
🌐
iO Flood
ioflood.com › blog › python-naming-conventions
Python Naming Conventions: Pythonic Style Guide
November 17, 2023 - When it comes to naming classes in Python, we use PascalCase (also known as CamelCase). This means that the first letter of each word is capitalized, with no underscores between words.
🌐
Medium
medium.com › @rowainaabdelnasser › python-naming-conventions-10-essential-guidelines-for-clean-and-readable-code-fe80d2057bc9
Python Naming Conventions: 10 Essential Guidelines for Clean and Readable Code | by Rowaina Abdelnasser | Medium
December 8, 2024 - For class names in Python, follow the CamelCase convention. Start each word with an uppercase letter, without any underscores or hyphens. Class names should be descriptive, reflecting the purpose or behavior of the class.
🌐
Readthedocs
visualgit.readthedocs.io › en › latest › pages › naming_convention.html
Python Naming Conventions — CodingConvention 0 documentation
Python Naming Conventions · Edit on GitHub · Avoid using names that are too general or too wordy. Strike a good balance between the two. Bad: data_structure, my_list, info_map, dictionary_for_the_purpose_of_storing_data_representing_word_definitions · Good: user_profile, menu_options, ...
🌐
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.
🌐
Google
google.github.io › styleguide › pyguide.html
Google Python Style Guide
May 23, 2012 - If the source is not accessible, ... naming conventions. Prefer PEP8-compliant descriptive_names for public APIs, which are much more likely to be encountered out of context. Use a narrowly-scoped pylint: disable=invalid-name directive to silence warnings. For just a few variables, use the directive as an endline comment for each one; for more, apply the directive at the beginning of a block. In Python, pydoc as ...