A batch job and a test suite need a stable way to import the pricing engine. This lesson installs the supplied teaching package, traces its public API and runs it from a configuration file. The package keeps the pricing formula separate from file handling and reporting.
Learning objectives. By the end of this note you should be able to:
- draw a minimal
src/mypkg/layout with__init__.pyand focused modules; - import a pricing function from a separate runner script;
- state what belongs in the package versus scripts versus notebooks;
- explain "ship the model" as an installable, testable API.
In this lesson
- Install and inspect a real package
- What "ship the model" means
- Imports and the name clash lesson
- The package metadata
- Composition with earlier design
- A runner that only orchestrates
- Versioning and compatibility
Before you start
The full lesson, with worked examples and exercise solutions, is for members.
Read the full lessonNew to SelfMadeQuant.com? See membership options or browse the Python for Quantitative Finance syllabus.