{"id":13647424,"url":"https://github.com/chaostoolkit/chaostoolkit-lib","last_synced_at":"2025-04-05T14:07:29.909Z","repository":{"id":25746041,"uuid":"105546570","full_name":"chaostoolkit/chaostoolkit-lib","owner":"chaostoolkit","description":"The Chaos Toolkit core library","archived":false,"fork":false,"pushed_at":"2024-08-25T09:08:47.000Z","size":822,"stargazers_count":77,"open_issues_count":12,"forks_count":46,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-01-27T21:42:30.755Z","etag":null,"topics":["chaos-engineering","chaostoolkit","chaostoolkit-core","reliability-engineering"],"latest_commit_sha":null,"homepage":"https://chaostoolkit.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaostoolkit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-02T14:49:07.000Z","updated_at":"2025-01-18T18:30:46.000Z","dependencies_parsed_at":"2024-01-14T10:09:37.357Z","dependency_job_id":"b6c4cc60-f120-4ebd-af39-6337e6e5e7cc","html_url":"https://github.com/chaostoolkit/chaostoolkit-lib","commit_stats":null,"previous_names":[],"tags_count":112,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaostoolkit%2Fchaostoolkit-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaostoolkit%2Fchaostoolkit-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaostoolkit%2Fchaostoolkit-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaostoolkit%2Fchaostoolkit-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaostoolkit","download_url":"https://codeload.github.com/chaostoolkit/chaostoolkit-lib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345853,"owners_count":20924102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chaos-engineering","chaostoolkit","chaostoolkit-core","reliability-engineering"],"created_at":"2024-08-02T01:03:33.334Z","updated_at":"2025-04-05T14:07:29.886Z","avatar_url":"https://github.com/chaostoolkit.png","language":"Python","readme":"\n\u003ch2 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cp align=\"center\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/32068152?s=200\u0026v=4\"\u003e\u003c/p\u003e\n\u003c/h2\u003e\n\n\u003ch4 align=\"center\"\u003eChaos Toolkit - Chaos Engineering for Everyone\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://github.com/chaostoolkit/chaostoolkit-lib/releases\"\u003e\n   \u003cimg alt=\"Release\" src=\"https://img.shields.io/pypi/v/chaostoolkit-lib.svg\"\u003e\n   \u003ca href=\"#\"\u003e\n   \u003cimg alt=\"Build\" src=\"https://github.com/chaostoolkit/chaostoolkit-lib/actions/workflows/build.yaml/badge.svg\"\u003e\n   \u003ca href=\"https://github.com/chaostoolkit/chaostoolkit-lib/issues\"\u003e\n   \u003cimg alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/chaostoolkit/chaostoolkit-lib?style=flat-square\u0026logo=github\u0026logoColor=white\"\u003e\n   \u003ca href=\"https://github.com/chaostoolkit/chaostoolkit-lib/blob/master/LICENSE.md\"\u003e\n   \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/chaostoolkit/chaostoolkit-lib\"\u003e\n   \u003ca href=\"#\"\u003e\n   \u003cimg alt=\"Python version\" src=\"https://img.shields.io/pypi/pyversions/chaostoolkit-lib.svg\"\u003e\n   \u003ca href=\"https://pkg.go.dev/github.com/chaostoolkit/chaostoolkit-lib\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://join.slack.com/t/chaostoolkit/shared_invite/zt-22c5isqi9-3YjYzucVTNFFVIG~Kzns8g\"\u003eCommunity\u003c/a\u003e •\n  \u003ca href=\"https://github.com/chaostoolkit/chaostoolkit-lib/blob/master/CHANGELOG.md\"\u003eChangeLog\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Purpose\n\nThe purpose of this library is to provide the core of the Chaos Toolkit \n[model][concepts] and functions it needs to render its services.\n\n[concepts]: https://docs.chaostoolkit.org/reference/concepts/\n\n## Features\n\nThe library provides the followings features:\n\n* discover capabilities from extensions\n  Allows you to explore the support from an extension that would help you\n  initialize an experiment against the system this extension targets\n\n* validate a given experiment syntax\n  The validation looks at various keys in the experiment and raises errors\n  whenever something doesn't look right.\n  As a nice addition, when a probe calls a Python function with arguments,\n  it tries to validate the given argument list matches the signature of the\n  function to apply.\n\n* run your steady state before and after the method. The former as a gate to\n  decide if the experiment can be executed. The latter to see if the system\n  deviated from normal.\n\n* run probes and actions declared in an experiment\n  It runs the steps in a experiment method sequentially, applying first steady\n  probes, then actions and finally close probes.\n\n  A journal, as a JSON payload, is return of the experiment run.\n\n  The library supports running probes and actions defined as Python functions,\n  from importable Python modules, processes and HTTP calls.\n\n* run experiment's rollbacks when provided\n\n* Load secrets from the experiments, the environ or [vault][vault]\n\n* Provides event notification from Chaos Toolkit flow (although the actual\n  events are published by the CLI itself, not from this library), supported\n  events are:\n  * on experiment validation: started, failed or completed\n  * on discovery: started, failed or completed\n  * on initialization of experiments: started, failed or completed\n  * on experiment runs: started, failed or completed\n\n  For each event, the according payload is part of the event as well as a UTC\n  timestamp.\n\n[vault]: https://www.vaultproject.io/\n\n## Install\n\nIf you are user of the Chaos Toolkit, you probably do not need to install this\npackage yourself as it comes along with the [chaostoolkit cli][cli].\n\n[cli]: https://github.com/chaostoolkit/chaostoolkit\n\nHowever, should you wish to integrate this library in your own Python code,\nplease install it as usual:\n\n```\n$ pip install -U chaostoolkit-lib\n```\n\n### Specific dependencies\n\nIn addition to essential dependencies, the package can install a couple of\nother extra dependencies for specific use-cases. They are not mandatory and\nthe library will warn you if you try to use a feature that requires them.\n\n### Vault\n\nIf you need [Vault][vault] support to read secrets from, run the following\ncommand:\n\n[vault]: https://www.vaultproject.io/\n```\n$ pip install -U chaostoolkit-lib[vault]\n```\n\nTo authenticate with Vault, you can either:\n* Use a token through the `vault_token` configuration key\n* Use an [AppRole][approle] via the `vault_role_id`, `vault_secret_id` pair of configuration keys\n* Use a [service account][serviceaccount] configured with an appropriate [role][role] via the `vault_sa_role` configuration key. The `vault_sa_token_path`, `vault_k8s_mount_point`, and `vault_secrets_mount_point` configuration keys can optionally be specified to point to a location containing a service account [token][sa-token], a different Kubernetes authentication method [mount point][k8s-mount], or a different secrets [mount point][secrets-mount], respectively.\n\n[approle]: https://www.vaultproject.io/docs/auth/approle.html\n[serviceaccount]: https://www.vaultproject.io/api/auth/kubernetes/index.html\n[role]: https://www.vaultproject.io/api/auth/kubernetes/index.html#create-role\n[sa-token]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#service-account-token-volume-projection\n[k8s-mount]: https://www.vaultproject.io/docs/auth/kubernetes.html\n[secrets-mount]: https://www.vaultproject.io/api/secret/kv/kv-v1.htm\n\n\n### JSON Path\n\nIf you need [JSON Path support][jpath] for tolerance probes in the hypothesis,\nalso run the following command:\n\n[jpath]: http://goessner.net/articles/JsonPath/\n\n```\n$ pip install -U chaostoolkit-lib[jsonpath]\n```\n\n## Contribute\n\nContributors to this project are welcome as this is an open-source effort that\nseeks [discussions][join] and continuous improvement.\n\n[join]: https://join.chaostoolkit.org/\n\nFrom a code perspective, if you wish to contribute, you will need to run a \nPython 3.6+ environment. Please, fork this project, write unit tests to cover\nthe proposed changes, implement the changes, ensure they meet the formatting\nstandards set out by `black`, `flake8`, and `isort`, add an entry into \n`CHANGELOG.md`, and then raise a PR to the repository for review.\n\nPlease refer to the [formatting](#formatting-and-linting) section for more\ninformation on the formatting standards.\n\nThe Chaos Toolkit projects require all contributors must sign a\n[Developer Certificate of Origin][dco] on each commit they would like to merge\ninto the master branch of the repository. Please, make sure you can abide by\nthe rules of the DCO before submitting a PR.\n\n[dco]: https://github.com/probot/dco#how-it-works\n\n\n### Develop\n\nIf you wish to develop on this project, make sure to install the development\ndependencies. To do so, first install [pdm](https://pdm-project.org/latest/).\n\n\n```console\n$ pdm install --dev\n```\n\nNow, you can edit the files and they will be automatically be seen by your\nenvironment, even when running from the `chaos` command locally.\n\n### Test\n\nTo run the tests for the project execute the following:\n\n```\n$ pdm run test\n```\n\n### Formatting and Linting\n\nWe use [ruff]() to perform linting and code style.\n\n[ruff]: https://astral.sh/ruff\n\nBefore raising a Pull Request, we recommend you run formatting against your\ncode with:\n\n```console\n$ pdm run format\n```\n\nThis will automatically format any code that doesn't adhere to the formatting\nstandards.\n\nAs some things are not picked up by the formatting, we also recommend you run:\n\n```console\n$ pdm run lint\n```\n\nTo ensure that any unused import statements/strings that are too long, etc.\nare also picked up.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaostoolkit%2Fchaostoolkit-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaostoolkit%2Fchaostoolkit-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaostoolkit%2Fchaostoolkit-lib/lists"}