repowisesanic-org/sanic

Architecture of sanic-org/sanic

sanic-org/sanic is 470 source files holding 3,043 symbols across 8 modules, written mainly in Python, Dockerfile, JavaScript. The largest module is guide, with 148 files, and 11 files are entry points into the dependency graph.

How sanic fits together

The sanic directory holds the framework package, which has 131 files and contains the core server and application code. Incoming requests are represented by the types in sanic/request/types.py, and outgoing responses are built from the types in sanic/response/types.py. Errors are defined in sanic/exceptions.py, and configuration is handled in sanic/config.py. The examples directory holds 36 sample applications, such as examples/request_stream/server.py, which show how routes and handlers are written. The tests directory has 119 files, and tests/test_http.py is one of the files the index marks as a hotspot. The guide directory holds the documentation site, with guide/server.py listed as one of its entry points.

Largest modules

  • guide: 148 files and 5,289 lines of code
  • sanic: 131 files and 14,721 lines of code
  • tests: 119 files and 15,072 lines of code
  • examples: 36 files and 300 lines of code
  • .github: 11 files
  • root: 11 files and 36 lines of code
  • docs: 10 files
  • scripts: 3 files and 165 lines of code

Languages

By file count: Python 331 files, Dockerfile 2 files, JavaScript 2 files, Makefile 2 files.

More on sanic: summary and FAQ, codebase overview, code health.

Related guide: Best dependency graph tools for monorepos