Skip to main content

What is DesignKit?

DesignKit is a modern Python architecture toolkit that draws inspiration from the 23 Gang of Four design patterns with original architectural abstractions, expressive APIs, and efficient utilities to build cleaner, more maintainable software.

Every API is carefully designed with developer experience in mind, featuring first-class support for async/await, metaprogramming, extensibility hooks, multiple programming paradigms, operator overloading where appropriate, and other modern Python capabilities.

Write software that's easier to understand, extend, and maintain!

What DesignKit Is Not?

DesignKit is not:

  • an application framework.
  • an inversion-of-control container.
  • an ORM.
  • a web framework.
  • a dependency injection framework.
  • a replacement for your existing architecture.

Basically, there is no such thing as a design pattern for creating a payment agent. Instead, it is a toolkit of architectural APIs that you can adopt independently, wherever they make sense.

How to Use DesignKit?

To start using DesignKit, you first need to install it.

# via pip
pip install designkit

# via uv
uv install designkit

# via poetry
poetry add designkit

So, you can import the DesignKit library in your Python code with the following statement:

from designkit.<section>.<pattern> import <utilities>, <exceptions>, <abstractions>

# Example:
from designkit.behavioral.state import (
    StateMachine, # implementation
    Reactive, # utility
    GuardRejectedError, InvalidTransitionError # exceptions
)

Where <section> is the section of the design pattern (e.g., behavioral, creational, structural), <pattern> is the name of the design pattern (e.g., matcher, factory, adapter), and <utilities>, <exceptions>, and <abstractions> are the specific utilities, exceptions, and abstractions you want to use from that pattern.

Features

DesignKit features all 23 Gang of Four (GoF) design patterns, plus 6 original design patterns.

Design Patterns

  • Behavioral

    1. Chain of Responsibility
      • Author: GoF, Sheñey
      • Description: Passes a request along a chain of handlers. Upon receiving a request, each handler decides either to process the request or to pass it to the next handler in the chain.
      • Example: ...
    2. Command
      • Author: GoF, Sheñey
      • Description: Encapsulates a request as an object, thereby allowing for parameterization of clients with queues, requests, and operations.
      • Example: ...
    3. Interpreter
      • Author: GoF, Sheñey
      • Description: Given a language, defines a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.
      • Example: ...
    4. Iterator
      • Author: GoF, Sheñey
      • Description: Provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation.
      • Example: ...
    5. Mediator
      • Author: GoF, Sheñey
      • Description: Defines an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.
      • Example: ...
    6. Memento
      • Author: GoF, Sheñey
      • Description: Without violating encapsulation, captures and externalizes an object's internal state so that the object can be restored to this state later.
      • Example: ...
    7. Observer
      • Author: GoF, Sheñey
      • Description: Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
      • Example: ...
    8. State
      • Author: GoF, Sheñey
      • Description: Allows an object to alter its behavior when its internal state changes. The object will appear to change its class.
      • Example: ...
    9. Strategy
      • Author: GoF, Sheñey
      • Description: Defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
      • Example: ...
    10. Policy
      • Author: GoF, Sheñey
      • Description: Defines a family of algorithms, encapsulates each one, and makes them interchangeable. Policy lets the algorithm vary independently from clients that use it.
      • Example: ...
    11. Template Method
      • Author: GoF, Sheñey
      • Description: Defines the skeleton of an algorithm in a method, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.
      • Example: ...
    12. Visitor
      • Author: GoF, Sheñey
      • Description: Represents an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates.
      • Example: ...
  • Creational

    1. Abstract Factory
      • Author: GoF, Sheñey
      • Description: Provides an interface for creating families of related or dependent objects without specifying their concrete classes.
      • Example: ...
    2. Builder
      • Author: GoF, Sheñey
      • Description: Separates the construction of a complex object from its representation, allowing the same construction process to create different representations.
      • Example: ...
    3. Factory Method
      • Author: GoF, Sheñey
      • Description: Defines an interface for creating an object, but lets subclasses alter the type of objects that will be created.
      • Example: ...
    4. Prototype
      • Author: GoF, Sheñey
      • Description: Specifies the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
      • Example: ...
    5. Singleton -- Only one instance.
      • Author: GoF, Sheñey
      • Description: Ensures a class has only one instance and provides a global point of access to it.
      • Example: ...
  • Structural

    1. Adapter
      • Author: GoF, Sheñey
      • Description: Converts the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.
      • Example: ...
    2. Bridge
      • Author: GoF, Sheñey
      • Description: Decouples an abstraction from its implementation so that the two can vary independently.
      • Example: ...
    3. Composite
      • Author: GoF, Sheñey
      • Description: Composes objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
      • Example: ...
    4. Decorator
      • Author: GoF, Sheñey
      • Description: Attaches additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
      • Example: ...
    5. Facade
      • Author: GoF, Sheñey
      • Description: Provides a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.
      • Example: ...
    6. Flyweight
      • Author: GoF, Sheñey
      • Description: Uses sharing to support large numbers of fine-grained objects efficiently.
      • Example: ...
    7. Proxy
      • Author: GoF, Sheñey
      • Description: Provides a surrogate or placeholder for another object to control access to it.
      • Example: ...

Tech Stack

Technology Purpose
🎨 Rich Rich text and beautiful formatting in the terminal
🔤 DesignKit Utils Utility functions and helpers for DesignKit

Getting Started

# clone the repository
git clone https://github.com/Sheniey/designkit.git
cd designkit

# install dependencies
pip install -r requirements.txt # via pip
uv install -r requirements.txt  # via uv

Commands

Command Action
maturin develop Start development build of Crates
maturin build Build production release of Crates to ./target/
maturin publish Publish entire project to PyPI -- future deprecation
pytest Run all tests in the project -- requires pytest to be installed

Contributing

See CONTRIBUTING.md for details on how to contribute to this project.

License

Licensed under the MIT License © 2026 Sheñey.

Release files for designkit 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for designkit 0.2.0
File Size Uploaded
designkit-0.2.0.tar.gz 1.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for designkit 0.2.0
File Interpreter ABI Platform
designkit-0.2.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details

Total release size: 1.6 MB

Release files / designkit-0.2.0.tar.gz

Download URL designkit-0.2.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
b73f8ab338cb4c711f2bcb3a74b53b9247c70d24add41207e32c8d6a10c6ae19
BLAKE2b-256 checksum
How to use checksums
3d05eacd40edebf39b102e9bb8f2ca1981907ea9ce8d2e531331667781a8bf0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / designkit-0.2.0-cp314-cp314-win_amd64.whl

Download URL designkit-0.2.0-cp314-cp314-win_amd64.whl
Size 327.6 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
e463f844ae7215a1ba39fe544bc5ad918d6c4619fc3f414e7f6baf27fae7c709
BLAKE2b-256 checksum
How to use checksums
843f3f7ed92fd34e4b90d05cacbdc9a3ebb34a5d865a1740aea83e7f30623f25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page