semvec/pypi-packages huggingface dataset:
flask-cloudwatch-metric 0.1.7
A Flask extension to provide easy integration with CloudWatch to publish metrics
License: MIT
Keywords: flask,cloudwatch,metrics,monitoring

## flask-cloudwatch-metric

A Flask extension to provide easy and efficient integration with CloudWatch to publish application metrics.

### Sample usage
```
app = Flask(__name__)
metrics_reporter = CloudWatchMetricsReporter(app)

@app.route('/')
def main():
    response = # ... Your application logic
    metrics_reporter.add_metric(
        metric_name="RequestCount",
        value=1,
        unit="Count",
        dimensions=[]
    )
    return response, 200
```

### How it works?

flask-cloudwatch-metric is built on top of boto3 client and Flask framework,
to provide efficient per-request metrics publication to AWS CloudWatch.

When a `CloudWatchMetricsReporter` object is created with a Flask app,
the constructor will inject an interceptor(or called filter if you are familiar with JAXRS)
into the application. The interceptor runs for every request providing the following functionalities:

* before each request: initialize a in-memory buffer to store metrics for this request
* after each request: publish all the metrics in buffer to CloudWatch
* during the request: metrics are added to the buffer by calling the report API's(e.g. `add_metric`)

To support running Flask in multi-threading mode, we need to store the in-memory buffer
in a place that is separated for each request. To achieve this, we can use the application context
provided by Flask's `g` context(https://flask.palletsprojects.com/en/2.0.x/api/#flask.g).
Using the `g` context, each request can store its own metric objects without interfering with others.
cfg2qr 0.1.8
Small personal project to learn about Python packaging.
License: MIT
Keywords: qr-code project

# Configure to QR-code 

## Description

This is a personal demo to get familiar with  python structuring and packaging. 

Specify a config file in json or yaml format and a QR code will be generated using existing  PyPI library. 

Specify an existing QR code image and the output file name (json or yaml) and the config file will be generated using existing PyPI library.


### Generating QR code from config file

* --input_directory: specify input directory 
* encoder 
* -input_text_name : 
specify the config file name (with file format)
* -result_text_name : specify the output image file name (with file format). The resulting config file will be saved in the same directory as the input


## Generating config file from QR code

* --input_directory: specify input directory 
* decoder 
* -input_image_name : specify the input image file name (with file format)
* -result_text_name :specify the output config file name. The resulting config file will be saved in the same directory as the input