semvec/pypi-packages huggingface dataset:
c7n-kube 0.2.48
Cloud Custodian - Kubernetes Provider
Requires Python: <4.0.0,>=3.9.2

# Custodian Kubernetes Support

Cloud Custodian can run policies directly inside your cluster, reporting on 
resources that violate those policies, or blocking them altogether.

## Running the server

c7n-kube can be run and installed via poetry. `poetry install && poetry run c7n-kube`.  

| name           | default   | description                                                  |
|----------------|-----------|--------------------------------------------------------------|
| --host         | 127.0.0.1 | (optional) The host that the server should listen on.        |
| --port         | 8800      | (optional) The port the server will listen on.               |
| --policy-dir   |           | Path to the policy directory.                                |
| --on-exception | warn      | Action to take on an internal exception. One of: warn, deny. |
| --cert         |           | Path to the certificate.                                     | 
| --ca-cert      |           | Path to the CA's certificate.                                |
| --cert-key     |           | Path to the certificate's key.                               |

## Generate a MutatingWebhookConfiguration

After the server is running, you'll need to configure and install the 
MutatingWebhookConfiguration manually. To generate a webhook configuration, you
can run `poetry run c7n-kube --generate --endpoint $ENDPOINT_URL --policy-dir $DIR`, and 
it will generate an appropriate configuration for you, based on your policies.

Note: some modification of the webhook configuration may be required. See the 
[documentation](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/) 
on webhooks for more configuration.

## Development

You can use [skaffold](https://github.com/GoogleContainerTools/skaffold/) to 
assist with testing and debugging this controller. Run `skaffold dev` in this
folder to deploy the local container into a local kubernetes cluster. It will 
automatically redeploy it as files change.
c7n-gcp 0.4.48
Cloud Custodian - Google Cloud Provider
Requires Python: <4.0.0,>=3.9.2

# Custodian GCP Support

Status - Alpha

# Features

 - Serverless ✅
 - Api Subscriber ✅
 - Metrics ✅
 - Resource Query ✅
 - Multi Account (c7n-org) ✅

# Getting Started


## via pip

```
pip install c7n-gcp
```

By default custodian will use credentials associated to the gcloud cli, which will generate
warnings per google.auth (https://github.com/googleapis/google-auth-library-python/issues/292)

The recommended authentication form for production usage is to create a service account and
credentials, which will be picked up via by the custodian cli via setting the
*GOOGLE_APPLICATION_CREDENTIALS* environment variable.


# Serverless

Custodian supports both periodic and api call events for serverless
policy execution.

GCP Cloud Functions require cloudbuild api be enabled on the project
the functions are deployed to.

Periodic execution mode also requires cloudscheduler api be enabled on
a project. Cloudscheduler usage also requires an app engine instance
in the same region as the function deployment.
c7n-azure 0.7.48
Cloud Custodian - Azure Support
Requires Python: <4.0.0,>=3.9.2


# Cloud Custodian - Azure Support

This a plugin to Cloud Custodian that adds Azure support.

## Install Cloud Custodian and Azure Plugin

The Azure provider must be installed as a separate package in addition to c7n.

    $ git clone https://github.com/cloud-custodian/cloud-custodian.git
    $ virtualenv custodian
    $ source custodian/bin/activate
    (custodian) $ pip install -e cloud-custodian/.
    (custodian) $ pip install -e cloud-custodian/tools/c7n_azure/.


## Write your first policy

A policy specifies the following items:

- The type of resource to run the policy against
- Filters to narrow down the set of resources
- Actions to take on the filtered set of resources

For this tutorial we will add a tag to all virtual machines with the name "Hello" and the value "World".

Create a file named ``custodian.yml`` with this content:

    policies:
        - name: my-first-policy
          description: |
            Adds a tag to all virtual machines
          resource: azure.vm
          actions:
            - type: tag
              tag: Hello
              value: World

## Run your policy

First, choose one of the supported authentication mechanisms and either log in to Azure CLI or set
environment variables as documented in [Authentication](https://cloudcustodian.io/docs/azure/authentication.html#azure-authentication).

    custodian run --output-dir=. custodian.yml


If successful, you should see output similar to the following on the command line

    2016-12-20 08:35:06,133: custodian.policy:INFO Running policy my-first-policy resource: azure.vm
    2016-12-20 08:35:07,514: custodian.policy:INFO policy: my-first-policy resource:azure.vm has count:1 time:1.38
    2016-12-20 08:35:08,188: custodian.policy:INFO policy: my-first-policy action: tag: 1 execution_time: 0.67


You should also find a new ``my-first-policy`` directory with a log and other
files (subsequent runs will append to the log by default rather than
overwriting it).

## Links
- [Getting Started](https://cloudcustodian.io/docs/azure/gettingstarted.html)
- [Example Scenarios](https://cloudcustodian.io/docs/azure/examples/index.html)
- [Example Policies](https://cloudcustodian.io/docs/azure/policy/index.html)


## Running Tests

If you'd like to help with the development of Azure support, you'll need
[uv](https://docs.astral.sh/uv/) installed. It provides a pip-compatible
interface, & will handle all the dependencies needed for you.

You can then run the unit tests like this:

```shell
# Assuming you're in the `cloud-custodian` top-level directory...
$ cd tools/c7n_azure

$ uv run pytest tests_azure
```
c7n-awscc 0.1.34
Cloud Custodian - AWS Cloud Control Provider
Requires Python: <4.0.0,>=3.9.2


# Custodian AWS Cloud Control Provider


Allows using custodian policies against aws cloud control api that underlies
cloud formation. This allows for substantial resource coverage effectively
everything that cloud formation supports.

Resources support generic delete, update actions.

Data files for the resources are downloaded at wheel build time.
flask-github-issues 0.1.5
A Python package for tracking Flask errors via GitHub Issues.
Requires Python: >=3.6

# flask-github-issues

flask-github-issues is an extension for <a href='https://flask.palletsprojects.com/'>Flask</a> that makes it easy to send unhandled errors directly from your application to GitHub Iusses.

# An Example: 

`pip install flask_github_issues`

extensions.py
```
from flask_github_issues import ErrorTracking

gitub_error_tracking = ErrorTracking()
```

__init__.py
```
from flask import Flask, request, session
import traceback

from .extensions import gitub_error_tracking

def create_app(config_env=os.getenv("ENV"), register_blueprints=True):
    app = Flask(__name__)

    gitub_error_tracking.init_app(app)


@app.errorhandler(Exception)
    def internal_server_error(e):
        if request.path.startswith("/static/"):
            # Return a simple 500 response without rendering a template
            return "", 500
        else:
            
            error_msg = traceback.format_exc()
            user_email = session.get("email", "unknown")
            github_error_tracking.track_error(error_message=str(error_msg),
                details=[
                    {"User Email": user_email},
                    {"URL": request.url},
                    {"Tenant": "TEST"},
                ],
            )
            return render_template("500.html"), 500
```

config.py:

```
class Config:
    GH_TOKEN = os.getenv("GH_TOKEN")
    GH_REPO = os.getenv("GH_REPO")
    GH_ASSIGNEES = ["ghawes85"]
    GH_LABELS = ["bug"]
    GH_TYPES = "bug" # Types is being released in the GitHub API. Currently if it is rolled out for you or your org, then can add one type
```

- Repo is in the form org/repo_name or user/repo_name
- Token is a Github <a href='https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens'>fine-grained personal access token</a>
- Assignees is a list of of users you want the ticket to be assigned to
- Labels is a list of labels you want assigned to your ticket

As an example and using the follow route: 
```
@app.route("/error")
    def error():
        raise ValueError("This is a test Value ERROR")
```

The following issue is created in GitHub
![image](https://github.com/user-attachments/assets/8a731241-b1b8-45bc-a9e6-362de0417a6d)
ta-sites 0.5.7
TA Sites
Keywords: ta_sites

# ta-sites
[![pip version](https://img.shields.io/pypi/v/ta-sites.svg)](https://pypi.python.org/pypi/ta-sites)

Thoughtful Automation sites package. This package contains the function required for Thoughtful Automation bots. Documentation may be closed and certain functions may not work outside the Thoughtful Automation environment.

Example Usage
-------------
celery-batches 0.11
Experimental task class that buffers messages and processes them as a list.
Requires Python: >=3.9
Keywords: task, job, queue, distributed, messaging, actor, celery

Celery Batches
==============

.. image:: https://img.shields.io/pypi/v/celery-batches.svg
    :target: https://pypi.org/project/celery-batches/

.. image:: https://github.com/clokep/celery-batches/actions/workflows/main.yml/badge.svg
    :target: https://github.com/clokep/celery-batches/actions/workflows/main.yml

.. image:: https://readthedocs.org/projects/celery-batches/badge/?version=latest
    :target: https://celery-batches.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

Celery Batches provides a ``Task`` class that allows processing of multiple
Celery task calls together as a list. The buffer of tasks calls is flushed on a
timer and based on the number of queued tasks.

Some potential use-cases for batching of task calls include:

* De-duplicating tasks.
* Accumulating / only handling the latest task with similar arguments.
* Bulk inserting / updating of data.
* Tasks with expensive setup that can run across a range of arguments.

What do I need?
===============

celery-batches version runs on,

- Python (3.9, 3.10, 3.11, 3.12, 3.13, 3.14)
- PyPy (3.10, 3.11)

And is tested with Celery ~= 5.0.

If you're running an older version of Python, you need to be running
an older version of celery-batches, the last version supporting each
Python version is listed below:

- Python 2.7: celery-batches 0.3.
- Python 3.4: celery-batches 0.2.
- Python 3.5: celery-batches 0.3.
- Python 3.6: celery-batches 0.5.
- Python 3.7: celery-batches 0.7.
- Python 3.8: celery-batches 0.9.

If you're running an older version of Celery, you need to be running
an older version of celery-batches:

- Celery < 4.0: Use `celery.contrib.batches` instead.
- Celery 4.0 - 4.3: celery-batches 0.3.
- Celery 4.4: celery-batches 0.7.
- Celery 5.0 - 5.1: celery-batches 0.9.

History
=======

Celery Batches was distributed as part of Celery (as ``celery.contrib.batches``)
until Celery 4.0. This project updates the Batches code to maintain compatiblity
with newer versions of Celery and other fixes. See the Changelog for details.

Additionally, this repository includes the full history of the code from
``celery.contrib.batches``, but rewritten to the ``celery_batches/__init__.py``
file.