A collection of design patterns and idioms in Python.

Jeroen 4acb155fac Small PEP8 corrections %!s(int64=11) %!d(string=hai) anos
.gitignore 2476b4b5dd Remove __pycache__ and add __pycache__ to .gitignore %!s(int64=11) %!d(string=hai) anos
3-tier.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
README.md e27509abdb Update README.md %!s(int64=11) %!d(string=hai) anos
abstract_factory.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
adapter.py 1b4118c6e5 Replace the doctest with direct call to main() %!s(int64=11) %!d(string=hai) anos
append_output.sh ec8d735baa Don't repeat the ### OUTPUT ### line %!s(int64=11) %!d(string=hai) anos
borg.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
bridge.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
builder.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
catalog.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
chain.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
command.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
composite.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
decorator.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
facade.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
factory_method.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
flyweight.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
foo.txt 3511c20bf6 Added foo.txt for command.py script. %!s(int64=12) %!d(string=hai) anos
graph_search.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
iterator.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
mediator.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
memento.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
mvc.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
null.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
observer.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
pool.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
prototype.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
proxy.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
publish_subscribe.py 4acb155fac Small PEP8 corrections %!s(int64=11) %!d(string=hai) anos
state.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
strategy.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
template.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos
visitor.py f61504c1bd Add output to bottom of scripts %!s(int64=11) %!d(string=hai) anos

README.md

python-patterns

A collection of design patterns implemented (by other people) in python.

When an implementation is added or modified, be sure to update this file and rerun append_output.sh to keep the output comments at the bottom up to date.

Current Patterns:

  • 3-tier
  • abstract_factory
  • adapter
  • borg
  • bridge
  • builder
  • catalog
  • chain
  • command
  • composite
  • decorator
  • facade
  • factory_method
  • flyweight
  • graph_search
  • iterator
  • mediator
  • memento
  • mvc
  • null
  • observer
  • pool
  • prototype
  • proxy
  • publish_subscribe
  • state
  • strategy
  • template
  • visitor