---
title: class name should be PascalCase
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > Code Security > Static Code Analysis (SAST) > SAST
  Rules > class name should be PascalCase
---

# class name should be PascalCase

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ().
{% /alert %}

{% /callout %}

## Metadata{% #metadata %}

**ID:** `python-code-style/class-name`

**Language:** Python

**Severity:** Notice

**Category:** Code Style

## Description{% #description %}

Class names should be `PascalCase` and not `camelCase` or `snake_case`.

#### Learn More{% #learn-more %}

- [PEP8 style guide](https://peps.python.org/pep-0008/#descriptive-naming-styles)

## Non-Compliant Code Examples{% #non-compliant-code-examples %}

```python
class _runtimeMetricsStatus(type):
    pass
```

```python
class myClass(Parent):
    def __init__(self):
        pass
```

## Compliant Code Examples{% #compliant-code-examples %}

```python
class REQUESTS_MODE(IntEnum):
    AGENTLESS_EVENTS = 0
    EVP_PROXY_EVENTS = 1
```

```python
class _RuntimeMetricsStatus(type):
    pass
```

```python
class Migration(migrations.Migration):

    dependencies = [
        ('tweets', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='tweet',
            name='parent',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='replies', to='tweets.tweet'),
        ),
        migrations.DeleteModel(
            name='Reply',
        ),
    ]
```

```python
class MyClass(Parent):
    def __init__(self):
        pass

class TestRestapiV4Lock(FunctionalTestController):
    pass

class TestS3Storage(TestCase):
    pass

class TestS35Storage(TestCase):
    pass

class TestS35Storage(TestCase):
    pass

class Float64Serializer(object):
    pass

class LongNameThatHa5SomeNumbers999:
    pass

class K8sFaultyChangeSignal:
    pass

class ModeA:
    pass

class CreateAMode:
    pass

class context(ContextDecorator):
    pass
```
  Seamless integrations. Try Datadog Code SecurityDatadog Code Security 
{% icon name="icon-external-link" /%}
 