Metadata-Version: 2.1
Name: pydantic-dbmodel-core
Version: 0.0.1
Summary: Enabling the coexistence of class variables and instance variables with identical names on Pydantic
Project-URL: Homepage, https://github.com/mauro-andre/pydantic-dbmodel-core
Author-email: Mauro André <eng.mauroandre@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Database
Classifier: Topic :: Database :: Database Engines/Servers
Requires-Python: >=3.11
Requires-Dist: pydantic<2.6.0,>=2.5.0
Description-Content-Type: text/markdown

# `pydantic-dbmodel-core`

## Overview

The `pydantic-dbmodel-core` library presents the `DbModelCore` class, an augmentation of the `BaseModel` class from Pydantic. This enhancement is achieved through a change in the `ModelMetaclass` meta-class, enabling the coexistence of class variables and instance variables with identical names. This feature, available in Pydantic V1 but absent in Pydantic V2, has been reintroduced with this small yet crucial modification.

## Installation

To install `pydantic-dbmodel-core`, run the following command:

```bash
pip install pydantic-dbmodel-core
```

## Usage

Import the `DbModelCore` class from the library and use it as you would use Pydantic's `BaseModel`.

```python
from pydantic_dbmodel_core import DbModelCore

class YourModel(DbModelCore):
    # Define your fields here
    pass
```

## Features

- Allows the definition of class variables with the same name as instance variables.
- Fully compatible with Pydantic's field definitions and validators.