Skip to content

docs: use load_config in the httpbin example charm#1852

Merged
tonyandrewmeyer merged 3 commits intocanonical:mainfrom
tonyandrewmeyer:httpbin-example-load-config
Jul 4, 2025
Merged

docs: use load_config in the httpbin example charm#1852
tonyandrewmeyer merged 3 commits intocanonical:mainfrom
tonyandrewmeyer:httpbin-example-load-config

Conversation

@tonyandrewmeyer
Copy link
Collaborator

Adds a basic config class to the httpbin example charm, and uses load_config rather than config. The class is a stdlib dataclass rather than a pydantic.BaseModel because it seems pointless to require the large pydantic dependency for such a small use-case, where there's no value added other than recommending Pydantic.

Fixes #1839

@tonyandrewmeyer
Copy link
Collaborator Author

Leaving in draft until the required version of ops is released.

@tonyandrewmeyer tonyandrewmeyer marked this pull request as ready for review June 30, 2025 11:04
Copy link
Contributor

@james-garner-canonical james-garner-canonical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good!

Copy link
Contributor

@dwilding dwilding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, thanks!

Co-authored-by: James Garner <james.garner@canonical.com>
@tonyandrewmeyer tonyandrewmeyer changed the title docs: use load_config in the httpbin example charm. docs: use load_config in the httpbin example charm Jul 1, 2025
@tonyandrewmeyer tonyandrewmeyer merged commit 8ac58d6 into canonical:main Jul 4, 2025
47 checks passed
@tonyandrewmeyer tonyandrewmeyer deleted the httpbin-example-load-config branch July 4, 2025 03:13
@dwilding dwilding mentioned this pull request Aug 15, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch to load_config in httpbin demo charm

3 participants