semvec/pypi-packages huggingface dataset:
django-expr 0.1.0
Django template tag and filter for evaluating Python expressions
License: MIT
Requires Python: <4.0,>=3.8
Keywords: django, python, expression, django tag, django filter

# Django Expressions

Django template tag and filter for evaluating Python expressions.

## Demo

As a template tag `{% expr "<expression>" %}`

```django
{% expr "[a for a in range(n)]" %}
```

Save the result to a variable using `as var` at the end of the tag:
```django
{% expr "[a for a in range(n)]" as result %}
{{ result }}
```

As a filter `"<expression>" | expr`:

```django
{{ "{k: v.name for k, v in employees_dict.values() }" | expr }}
```

To chain an expression after another filter, define a lambda expression
as the filter argument `value | expr:"lambda x: <expression>"`:

```django
{{ employees_list | first | expr:"lambda x: x.first_name + ' ' + x.last_name" }}
```

## Installation

1. Install dependencies

    ```sh
    pip install django_expr
    ```

2. Add `django_expr` to `INSTALLED_APPS` in your `settings.py`

    ```py
    INSTALLED_APPS = [
        "django_expr",
        ...
    ]
    ```

3. Inside templates, load the tags with `{% load expr %}`:

    ```django
    {% load expr %}
    {% expr "[{k: not v} for k, v in ({'a': 'b', 'c': 0}).items()]" %}
    ```

4. If you want to automatically include the `expr` tag and filter, add the tags as a 'builtin' in `settings.py`:

```python
TEMPLATES = [
    {
        ...,
        'OPTIONS': {
            'context_processors': [
                ...
            ],
            'builtins': [
                'django_expr.templatetags.expr',
            ]
        },
    },
]
```
ratios-calculator 0.0.2
A package for calculating and analyzing financial ratios
License: MIT
Requires Python: >=3.6

# Financial Ratios Analysis Application

## Overview

This application calculates and visualizes various financial ratios from given data. It is designed to assist in the analysis of financial health over time, focusing on key metrics like interest coverage, fixed-charge coverage, cash flow coverage, and operating cash flow ratios.

## Features

- **Calculation of Financial Ratios**: Automatically computes multiple financial ratios using historical data.
- **Interactive Web Visualization**: Offers a dynamic web interface to plot the calculated ratios over time, allowing for easy trend analysis and insights.
- **Customizable Data Input**: Users can input their financial data, and the application will process and display corresponding ratios.

## Requirements

- python 3.x
- pandas
- numpy
- dash == 2.17.1
- datetime
- openpyxl>=3.1.3

## Installation

1. Ensure Python 3.x is installed on your system.
2. Install required Python libraries:
   ```bash
   pip install pandas numpy dash datetime openpyxl

## Implementation

To utilize the `ratios_calculator` package effectively, follow these steps to prepare your data and run the analysis:

### Step 1: Data Preparation
Download the required financial documents from FACTSET:
- **Balance Sheet**
- **Income Statement**
- **Stock Price History**

Ensure these files are saved in **Excel [.xlsx]** format.

### Step 2: Install the Package
If you haven't already installed the `ratios_calculator` package, you can do so using pip. Open your command-line interface and run:

```bash
pip install ratios_calculator
```

### Step 3: Usage

After installing and importing the `ratios_calculator` package, you can easily run the analysis using the following command in your Python script or interactive session:

```python
import ratios_calculator
ratios_calculator
```

After the program is run, follow the prompts in the terminal to provide the path to the specified files downloaded in Step 1. 

### Step 4: Output

After processing, the ratios_calculator will automatically save a CSV file **[ratios.csv]** containing the calculated financial ratios to your current working directory. This file can be used for further analysis or reporting.

## License
This project is licensed under the MIT License.