Public Sector

We've had the pleasure of working with UK and overseas central and local government departments, including Healthcare (NHS and Foundation Trusts), Defence, Education (Universities and colleges), many of the main Civil Service departments, Emergency Services; also public-owned corporations including the BBC, Bank of England, Ordnance Survey, and regulatory bodies such as Ofgem.

We are registered on Crown Commercial Service’s (CCS) Dynamic Purchasing System (RM6219 Training and Learning) and also with numerous tender portals such as Ariba, Coupa and Delta E-Sourcing.

Read more...

Graduate Training Schemes

Framework Training has a strong track record of providing a solid introduction into the working world for technical graduates across myriad industries. We provide the opportunity to learn and gain valuable hands-on experience in a supportive, friendly and sociable training environment.

Attract & retain the brightest new starters

We know it is vital for our clients to invest in the future of their talented grads; not only to provide them with high-quality, professional training essential for their roles, but to embed them within the organisation’s culture and guide them on the right path to a successful career.

After all, your new hires could well be the next leaders and their creative ideas and unique insights are invaluable to your business.

Read more ...

Learning & Development

Our unique portfolio of high-quality technical courses and training programmes are industry-respected. They’re carefully designed so that delegates can seamlessly apply what they’ve learnt back in the workplace. Our team of domain experts, trainers, and support teams know our field — and all things tech — inside out, and we work hard to keep ourselves up to speed with the latest innovations. 

We’re proud to develop and deliver innovative learning solutions that actually work and make a tangible difference to your people and your business, driving through positive lasting change. Our training courses and programmes are human-centred. Everything we do is underpinned by our commitment to continuous improvement and learning and generally making things much better.

Read more...

Corporate & Volume Pricing

Whether you are looking to book multiple places on public scheduled courses (attended remotely or in our training centres in London) or planning private courses for a team within your organisation, we will be happy to discuss preferential pricing which maximise your staff education budget.

Enquire today about:

  • Training programme pricing models  

  • Multi-course voucher schemes

Read more...

Custom Learning Paths

We understand that your team training needs don't always fit into a "one size fits all" mould, and we're very happy to explore ways in which we can tailor a bespoke learning path to fit your learning needs.

Find out about how we can customise everything from short overviews, intensive workshops, and wider training programmes that give you coverage of the most relevant topics based on what your staff need to excel in their roles.

Read more...

Python TDD and Design Patterns: Building Robust Code

Write testable, well-designed, and maintainable Python code.

About the course

For experienced Python developers, moving beyond simply writing functional code to building software that is genuinely robust, maintainable, scalable, and easy to collaborate on is a critical step. This requires a deep understanding of software design principles and the adoption of disciplined development practices. This 4-day intensive training course is specifically designed to equip experienced Python developers with the knowledge and practical skills to master Test Driven Development (TDD) and effectively apply Software Design Patterns, demonstrating how these two powerful disciplines work together to produce higher-quality code.

The course begins by solidifying understanding of advanced Python Object-Oriented Programming features that form the bedrock for implementing design patterns, exploring concepts such as special methods, properties, descriptors, and intricate details of inheritance and composition. Participants will then dive into the core principles and workflow of Test Driven Development, focusing intensely on the Red-Green-Refactor cycle and the crucial skill of writing code that is inherently testable. A significant portion of the course is dedicated to hands-on mastery of the pytest framework, including advanced techniques for writing tests, using powerful fixtures for managing test setup and teardown, and effectively mocking external dependencies to isolate code for testing.

The central, integrated theme of the course is the practical application of TDD to implement a curated selection of key Design Patterns from the Creational, Structural, and Behavioral categories, chosen for their relevance in modern Python development. Participants will not just learn about these patterns but will actively build examples piece-by-piece using the TDD process, writing tests first to guide and validate the design. The course reinforces learning by covering essential refactoring techniques applied within the TDD cycle and explores how adopting TDD and Design Patterns supports the principles of SOLID design, empowering developers to consistently craft more resilient, understandable, and well-architected Python applications.

Instructor-led online and in-house face-to-face options are available - as part of a wider customised training programme, or as a standalone workshop, on-site at your offices or at one of many flexible meeting spaces in the UK and around the World.

    • Apply advanced concepts of Python Object-Oriented Programming relevant to software design.
    • Explain and consistently practice the core principles and workflow of Test Driven Development (TDD) using the Red-Green-Refactor cycle.
    • Write effective automated tests using the pytest framework, including leveraging fixtures and mocking external dependencies.
    • Understand the problems solved by and the structure of a selection of key Creational Design Patterns.
    • Understand the problems solved by and the structure of a selection of key Structural Design Patterns, including mastering the Python Decorator pattern.
    • Understand the problems solved by and the structure of a selection of key Behavioral Design Patterns.
    • Implement selected Design Patterns using the TDD process, writing tests first to drive the design and implementation.
    • Apply refactoring techniques effectively within the TDD cycle to continuously improve code design.
    • Understand how TDD and Design Patterns relate to SOLID principles and contribute to building robust, maintainable software.
  • This 4-day intensive training course is designed for experienced Python developers who are looking to significantly enhance their software design capabilities, testing practices, and the overall quality and maintainability of the code they produce. It is ideal for:

    • Developers who want to adopt and master Test Driven Development as a core practice in their daily coding.

    • Developers seeking to understand and apply common Software Design Patterns to build more flexible, scalable, and understandable Python applications.

    • Development teams aiming to establish consistent standards for writing well-tested and well-designed Python code.

    • Experienced programmers from other languages transitioning to Python who want to learn Pythonic approaches to TDD and object-oriented design patterns.

  • Participants should have attended our intro to Python programming or have equivalent skills, including:

    • A solid and practical understanding of core Python programming concepts (including data types, control flow, functions, modules, error handling).

    • Practical experience writing and debugging Python code and building applications or significant scripts.

    • Familiarity with basic object-oriented programming concepts in Python (defining classes, creating objects, calling methods, basic inheritance).

    This course is designed for developers already comfortable with writing Python code and looking to elevate their design and testing skills.

    We can customise the training to match your team's experience and needs - with more time and coverage of OOP fundamentals for newer developers, for instance.

  • This Python TDD & Design Patterns course is available for private / custom delivery for your team - as an in-house face-to-face workshop at your location of choice, or as online instructor-led training via MS Teams (or your own preferred platform).

    Get in touch to find out how we can deliver tailored training which focuses on your project requirements and learning goals.

  • Advanced Object-Oriented Programming in Python

    • Review of Classes, Objects, Methods, and Attributes.

    • Inheritance and Composition: When and why to use each.

    • Understanding Method Resolution Order (MRO) in Python.

    • Special Methods (The "dunder" methods - e.g., init, str, repr).

    • Class Methods (@classmethod) and Static Methods (@staticmethod).

    • Properties (@property) and Descriptors.

    • Abstract Base Classes (ABCs) and the abc module.

    • Hands-On Lab: Practicing advanced OOP concepts, including creating classes with special methods, class/static methods, properties, and using ABCs.

    Principles and Practice of Test Driven Development (TDD)

    • What is TDD? Beyond just testing.

    • The Benefits of TDD (Improved design, reduced bugs, confidence in code).

    • The Red-Green-Refactor Cycle explained.

    • Writing Testable Code: Design considerations for TDD.

    • The qualities of a good test (FIRST principles).

    • Introduction to Test Doubles (Fakes, Stubs, Mocks, Spies).

    • Programming Katas: Practicing TDD in a structured way.

    • Hands-On Lab: Initial TDD exercises using simple problems (katas), focusing on the Red-Green-Refactor cycle.

    Automated Testing with Pytest

    • Introduction to pytest: Why pytest? Comparison with unittest.

    • Installing pytest and running tests.

    • Writing Test Functions and Classes.

    • Assertions in pytest.

    • Organising tests.

    • Introduction to pytest Fixtures: Simple setup and teardown.

    • Using Markers (@pytest.mark).

    • Hands-On Lab: Converting previous kata exercises to use pytest, writing tests for existing simple functions, using basic fixtures.

    More Pytest & Mocking

    • Advanced Fixture usage and scope.

    • Parametrizing tests with @pytest.mark.parametrize.

    • Introduction to Mocking in Python: The purpose of mocks in TDD.

    • Using unittest.mock (briefly) and pytest-mock (primary focus).

    • Mocking objects, methods, and functions.

    • Hands-On Lab: Writing more advanced tests using parametrized fixtures, practicing mocking external dependencies in tests using pytest-mock.

    Creational Patterns with TDD - Part 1 (Factory Method, Abstract Factory)

    • Introduction to Creational Patterns: Dealing with object creation.

    • Factory Method Pattern:

      • Problem it solves.

      • Structure and participants.

      • Implementing Factory Method using TDD with pytest and mocking.

    • Abstract Factory Pattern:

      • Problem it solves.

      • Structure and participants.

      • Implementing Abstract Factory using TDD.

    • Hands-On Lab: Applying TDD to implement components that use the Factory Method and Abstract Factory patterns.

    Creational Patterns with TDD - Part 2 (Singleton, Builder)

    • Singleton Pattern:

      • Problem it solves (ensuring a single instance).

      • Classic implementation approaches.

      • Pythonic alternatives (module-level singletons, using new).

      • Considerations and potential downsides in Python.

      • Implementing a Singleton (or Pythonic equivalent) using TDD.

    • Builder Pattern:

      • Problem it solves (constructing complex objects).

      • Structure and participants.

      • Implementing Builder using TDD.

    • Hands-On Lab: Applying TDD to implement a Singleton (or Pythonic approach) and the Builder pattern.

    Structural Patterns with TDD - Part 1 (Adapter, Facade)

    • Introduction to Structural Patterns: Composing objects into larger structures.

    • Adapter Pattern:

      • Problem it solves (matching incompatible interfaces).

      • Object vs. Class Adapters.

      • Implementing Adapter using TDD.

    • Facade Pattern:

      • Problem it solves (providing a simplified interface to a complex subsystem).

      • Structure and participants.

      • Implementing Facade using TDD.

    • Hands-On Lab: Applying TDD to implement components using the Adapter and Facade patterns.

    Structural Patterns with TDD - Part 2 (Composite, Proxy)

    • Composite Pattern:

      • Problem it solves (treating individual objects and compositions uniformly).

      • Structure and participants.

      • Implementing Composite using TDD.

    • Proxy Pattern:

      • Problem it solves (providing a surrogate or placeholder).

      • Types of Proxies (Virtual, Remote, Protection, Smart Reference).

      • Implementing Proxy using TDD.

    • Hands-On Lab: Applying TDD to implement components using the Composite and Proxy patterns.

    Module 9: The Decorator Pattern

    • Decorator Pattern:

      • Problem it solves (adding responsibilities dynamically).

      • Structure and participants.

    • Functions as First-Class Objects in Python.

    • Closures.

    • Python's @ syntax for decorators.

    • Decorators with arguments.

    • Class Decorators.

    • Implementing custom function and class decorators using TDD.

    • Hands-On Lab: Applying TDD to implement custom decorators, practicing both the classic structure and Python's @ syntax.

    Behavioral Design Patterns, Refactoring & Best Practices

    • Module 10: Behavioral Patterns with TDD - Part 1 (Strategy, Command)

      • Introduction to Behavioral Patterns: Algorithms and the assignment of responsibilities between objects.

      • Strategy Pattern:

        • Problem it solves (interchangeable algorithms).

        • Structure and participants.

        • Implementing Strategy using TDD.

      • Command Pattern:

        • Problem it solves (encapsulating a request as an object).

        • Structure and participants.

        • Implementing Command using TDD.

      • Hands-On Lab: Applying TDD to implement components using the Strategy and Command patterns.

    Behavioral Patterns with TDD - Part 2 (Observer, Iterator, Template Method)

    • Observer Pattern:

      • Problem it solves (one-to-many dependency).

      • Structure and participants.

      • Implementing Observer using TDD.

    • Iterator Pattern:

      • Problem it solves (accessing elements sequentially).

      • Understanding Python Iterators and Iterables.

      • Generators and Generator Expressions.

      • Using the itertools module.

      • Implementing custom iterators/iterables with TDD.

    • Template Method Pattern:

      • Problem it solves (defining the skeleton of an algorithm).

      • Structure and participants.

      • Implementing Template Method using TDD.

    • Hands-On Lab: Applying TDD to implement components using the Observer, Iterator, and Template Method patterns.

    Refactoring, Design Principles & Next Steps

    • Refactoring: Techniques for improving code design after tests are written.

    • How Design Patterns can Emerge through Refactoring.

    • SOLID Principles in Practice: How TDD and Design Patterns support SOLID.

    • Common Mistakes and Pitfalls in TDD.

    • Measuring Test Coverage.

    • Exploring other Design Patterns (brief overview of selected patterns not covered in detail).

    • Continuing Your Journey: Resources for TDD, Design Patterns, and Python development.

    • Hands-On Lab: Dedicated refactoring exercises on previously implemented pattern code, aiming to improve design while tests ensure correctness.

Trusted by

CAPITA company logo University of Glasgow logo/crest

Public Courses Dates and Rates

Please get in touch for pricing and availability.

Related courses