semvec/pypi-packages huggingface dataset:
flask-variable-manager 0.4.1
Create a variable manager in flask, enter values in python, and use values on the jinja template.
Requires Python: >=3.9

# Flask Variable Manager

The Flask Variable Manager is a Flask extension that allows you to manage variables within your Flask application. 

It provides an interface to set and get variables, and even render them in Jinja2 templates. 

This can be useful when you need to share data across different parts of your application.

## Installation

To install the Flask Variable Manager, you can use pip:

```bash
pip install flask-variable-manager
```

## Usage

First, import the `VariableManagerExtension` from the `flask_variable_manager` package:

Then, create an instance of the `VariableManagerExtension` and initialize it with your Flask application:

```python
from flask import Flask
from flask_variable_manager import VariableManagerExtension

vm = VariableManagerExtension()
app = Flask(__name__)
vm.init_app(app)
```

Now, you can use the `VariableManagerExtension` to set and get variables in your Flask routes. 

```python
vm._local['my_var'] = 'Hello, World!'
```

```python
vm._local['my_var']
```

## Routes

### Render a string as a Jinja2 template

This route allows you to render a string as a Jinja2 template. 

It accepts a POST request at the `/vm/render` endpoint. 

### Set a user-defined variable

This route allows you to set a user-defined variable. 

It accepts a POST request at the `/vm/var` endpoint. 

### Get all user-defined variables

This route allows you to get all user-defined variables. 

It accepts a GET request at the `/vm/var` endpoint. 

(or `vm/vars` for the multiple count of the variable)

### Remove a user-defined variable

This route allows you to remove a user-defined variable.

It accepts a DELETE request at the `/vm/var` endpoint.

(or `vm/vars` for the multiple count of the variable)

### Run a Python script and return the result

This route allows you to run a Python script and return the result.

It accepts a POST request at the `/py/runner` endpoint.

```python
import platform
from flask import g
data = additionalProp + "-" + platform.platform()
g.local['saved_user_variable'] = data
return data
```

### Check the list of packages

This route allows you to check the list of python packages.

It accepts a GET request at the `/py/packages` endpoint.

### install and uninstall a package

This route allows you to install and uninstall a python package.

It accepts a POST request at the `/py/install`, `/py/uninstall` endpoint.

## License

This project is licensed under the terms of the MIT license.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
cms-perf 1.1.0
Sensor for the XRootD cms.perf directive
Keywords: xrootd cms.perf

=================================
``cms_perf`` - XRootD load sensor
=================================

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

.. image:: https://img.shields.io/pypi/v/cms_perf.svg
    :alt: Available on PyPI
    :target: https://pypi.python.org/pypi/cms_perf/

.. image:: https://img.shields.io/github/license/maxfischer2781/cms_perf.svg
    :alt: License
    :target: https://github.com/maxfischer2781/cms_perf/blob/master/LICENSE

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4011821.svg
   :target: https://doi.org/10.5281/zenodo.4011821

Sensor for use in the XRootD ``cms.perf`` directive.
Measures system load, as well as cpu, memory, and network utilization,
to enable load-balancing in a cluster of multiple XRootD servers.

With its support for individual re-configuration of each sensor reading,
``cms_perf`` allows to fine-tune or even re-define load reporting to your needs.
No need to hack any scripts, just install, configure, run.

Installation and Usage
======================

The sensor can be installed using ``pip``,
then configured using the ``cms.perf`` directive.
See the `documentation`_ for details and examples.

Issues and Contributions
========================

Maintenance and development of ``cms.perf`` is hosted at `GitHub`_.
For technical issues or suggestions, please open an issue ticket.
For direct code submissions, please open a pull request.

.. _documentation: https://cms-perf.readthedocs.io/
.. _GitHub: https://github.com/maxfischer2781/cms_perf