Ops documentation¶
The Ops library (ops
) is a Python framework for writing and testing Juju charms.
The library provides:
ops.main entry point, used to initialise and run your charm
ops, the API to respond to Juju events and manage the application
ops.pebble, the Pebble client, a low-level API for Kubernetes containers
ops.testing (was: Scenario), the recommended API for unit testing charms
ops.testing.Harness (legacy unit testing), the deprecated API for unit testing charms
You can structure your charm however you like, but with the ops
library, you get a framework that promotes consistency and readability by following best practices. It also helps you organise your code better by separating different aspects of the charm, such as managing the application’s state, handling integrations with other services, and making the charm easier to test.
In this documentation¶
Start here: a hands-on introduction to ops
for new users
Step-by-step guides covering key operations and common tasks
Technical information - specifications, APIs, architecture
Discussion and clarification of key topics
Project and community¶
Ops is a member of the Ubuntu family. It’s an open source project that warmly welcomes community projects, contributions, suggestions, fixes and constructive feedback.
Read our code of conduct: As a community we adhere to the Ubuntu code of conduct.
Get support: Discourse is the go-to forum for all questions Ops.
Join our online chat: Meet us in the #charmhub-charmdev channel on Matrix.
Report bugs: We want to know about the problems so we can fix them.
Contribute docs: The documentation sources on GitHub.