Metadata-Version: 2.3
Name: modelrepo
Version: 1.0.0
Summary: Python package for interacting with databases using model repositories.
Author: Noah Chalifour
Author-email: chalifournoah@gmail.com
Requires-Python: >=3.12,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: dependency-injector (>=4.48,<5.0)
Requires-Dist: mkdocs-api-autonav (>=0.3,<0.4)
Requires-Dist: mkdocs-material (>=9.6,<10.0)
Requires-Dist: mkdocstrings[python] (>=0.18)
Requires-Dist: pymongo (>=4.13,<5.0)
Requires-Dist: sqlalchemy (>=2.0,<3.0)
Description-Content-Type: text/markdown

# ModelRepo

[![PyPI version](https://badge.fury.io/py/modelrepo.svg)](https://badge.fury.io/py/modelrepo)
[![Build Status](https://gitlab.com/path-to-your-project/badges/main/pipeline.svg)](https://gitlab.com/path-to-your-project/-/commits/main)
[![Documentation Status](https://readthedocs.org/projects/modelrepo/badge/?version=latest)](https://modelrepo.readthedocs.io/en/latest/?badge=latest)
[![Coverage](https://gitlab.com/path-to-your-project/badges/main/coverage.svg)](https://gitlab.com/path-to-your-project/-/commits/main)
[![Python Versions](https://img.shields.io/pypi/pyversions/modelrepo.svg)](https://pypi.org/project/modelrepo/)
[![License](https://img.shields.io/pypi/l/modelrepo.svg)](https://pypi.org/project/modelrepo/)

A Python package for managing database models using model repositories.

## Features

- Easy to use
- Wide database support (In-memory, MySQL, MongoDB)
- Dependency injection using [dependency-injector](https://pypi.org/project/dependency-injector/)

## Installation

You can install ModelRepo using pip:

```bash
pip install modelrepo
```

For development installation:

```bash
git clone https://gitlab.chalifour.dev/noahchalifour/modelrepo.git
cd modelrepo
pip install -e ".[dev]"
```

## Quick Start

Here's a simple example to get you started:

```python
from modelrepo.repository import InMemoryModelRepository
from dataclasses import dataclass


@dataclass
class User:
    id: str
    name: str
    email: str


def main():
    repository: InMemoryModelRepository[User] = InMemoryModelRepository(User)
    user = repository.create({"name": "John Doe", "email": "test@email.com"})
    print("Created user:", user)


if __name__ == "__main__":
    main()
```

For more examples, see the [examples directory](examples/).

## Development

### Setup Development Environment

```bash
# Clone the repository
git clone https://gitlab.chalifour.dev/noahchalifour/modelrepo.git
cd modelrepo

# Install development dependencies
pip install -e ".[dev]"
```

### Running Tests

```bash
pytest
```

With coverage:

```bash
pytest --cov=src
```


## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

Please make sure your code follows the project's style guidelines and includes appropriate tests.

## License

This project is licensed under the [MIT License](LICENSE).

## Contact

For questions and support, please open an issue on the GitLab repository.



