Metadata-Version: 2.4
Name: pydesignpatterns
Version: 0.1.0
Summary: All 23 GoF design patterns as reusable, Pythonic, type-safe implementations.
Project-URL: Documentation, https://github.com/cesarautom8/pypatterns#readme
Project-URL: Repository, https://github.com/cesarautom8/pypatterns
Project-URL: Issues, https://github.com/cesarautom8/pypatterns/issues
License-Expression: MIT
License-File: LICENSE
Keywords: behavioral,creational,design-patterns,gof,structural
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.12
Provides-Extra: dev
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material; extra == 'docs'
Requires-Dist: mkdocstrings[python]; extra == 'docs'
Description-Content-Type: text/markdown

# pypatterns

All 23 GoF design patterns as reusable, Pythonic, type-safe implementations.

## Installation

```bash
pip install pypatterns
```

## Requirements

- Python 3.12+
- Zero dependencies

## Quick Start

```python
from pypatterns import singleton, Subject, Builder, registry_factory

# Singleton via decorator
@singleton
class Config:
    def __init__(self):
        self.debug = False

# Observer pattern
subject = Subject[str]()
subject.subscribe(lambda msg: print(f"Got: {msg}"))
subject.notify("hello")

# Factory registry
factory = registry_factory[str, Animal]()
factory.register("dog", lambda: Dog())
factory.register("cat", lambda: Cat())
animal = factory.create("dog")
```

## Patterns Included

### Creational
- Singleton, Factory Method, Abstract Factory, Builder, Prototype

### Structural
- Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy

### Behavioral
- Chain of Responsibility, Command, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor

## Reference

All patterns follow the catalog at [refactoring.guru/design-patterns](https://refactoring.guru/design-patterns).

## License

MIT
