# Class

*noun*

say it: **“klas”** **/klæs/**

A blueprint for making objects that bundle data with the actions that go with it; one Dog class can make many dogs.

## What is a **class** in Python?

A **class** is a blueprint for making objects that bundle data and the actions that go with it. One `Dog` class can make many dogs.

```python
class Dog:
    def __init__(self, name):
        self.name = name

    def bark(self):
        print(f"{self.name} says woof!")

rex = Dog("Rex")
rex.bark()  # Rex says woof!
```

## In a sentence

- “The Product **class** gives every product a name, a price and a way to print itself.”
- “rex = Dog("Rex") makes one object from the Dog **class**.”

Level: Journeyman · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=3)

Updated: November 19, 2026

## In other subjects

- [Class in C#](https://www.ask-codey.com/glossary/class-c-sharp)
- [Class in Java](https://www.ask-codey.com/glossary/class-java)
- [Class in JavaScript](https://www.ask-codey.com/glossary/class-javascript)
- [Class in OOP](https://www.ask-codey.com/glossary/class-oop)

Source: https://www.ask-codey.com/glossary/class
