How microsoft/playwright-python is laid out, and where to start for common changes.
C
Architecture grade
score 66/100
8+
Import cycles
lower is better
316
Files mapped
871 imports between them
90%
Layering
of imports point one way
From the map of which files import which, built when the code was last read in full. It shows what depends on what, not a reading order.
Module map
Shade byless more
6 modules, 2 links. A link means one module imports another; thicker lines mean more imports. Select a module to trace it: blue lines go to what it uses, orange lines come from what uses it.
ModuleFilesUsed byUsesCommits, 90 daysRole
playwright1042047Foundation
scripts120019Standalone
tests60142Entry or leaf
examples2010Entry or leaf
setup1002Standalone
utils1003Standalone
Where to start reading
Repository root
Repository root
Likely public API
Likely public API
Likely start-up file
Suggested starting pointAI
Suggested starting pointAI
Suggested starting pointAI
Find files for a task
AI
Add a new browser interaction method
Define the protocol message in the server definition (not in this repo, but effects protocol_channels.py)
Add the channel handler method to the relevant implementation class (e.g., Page, Frame, Browser)
Regenerate async and sync API surfaces (run build tooling that outputs to _generated.py files)
Add integration test to verify the new method works end-to-end
Add a new assertion helper
Implement the assertion logic in _assertions.py following the expect(locator).to_* pattern
Export the assertion class in async_api and sync_api generated files
Add test coverage for the assertion with various locator types
Add a new network interception feature
Extend the network.py module with new routing or HAR logic
Update browser_context.py to expose new network configuration methods
Regenerate public API to expose the new feature
Add a new helper utility for locators
Add isomorphic (sync/async-agnostic) helper to the isomorphic module
Wrap and expose the utility in locator.py for public use
Ensure the method is exported in both async and sync generated APIs
Change the public API
Trace runtime behavior
Add or update tests
Change build or automation
RepoPilot lists up to 500 files, so a file missing here may still exist.
Files marked “likely” are guessed from their names.
Code quality and hotspots
Largest source files
Branch points105 per file on average
Code issues0 errors, 78 warnings
Largest file24,190 lines
Hotspot load3 high-risk files
Static checks on the 15 largest source files.
Tests, CI and tooling
CIGitHub Actions3 workflows
Tests1,143 test filesPytest · Playwright · 9.5 test files per source file (file count, not coverage)
Dependency updatesDependabot
Test folders: examples/todomvc/mvctests · tests/assets · tests/assets/client-certificates/client/trusted