semvec/pypi-packages huggingface dataset:
django-persian-currency 0.2.1
A Django app to work with Iranian currency.
Requires Python: >=3.7

# 🏷️ Toman Display Template Tags for Django

A simple Django template tag library to render integers as Persian currency strings, converting numbers into Persian digits and formatting values with appropriate units like "هزار", "میلیون", and "میلیارد".

## ✨ Features

- Converts integer values to human-readable Persian currency format.
- Supports Persian digit conversion (e.g., `123` → `۱۲۳`).
- Handles values in billions, millions, thousands, and ones.
- Appends a customizable postfix (default: `تومان`).
- Gracefully handles invalid or missing input.

---

## 🚀 Installation

Just drop the Python file into one of your Django app's `templatetags/` directories.

For example:

```
myapp/
├── templatetags/
│   └── toman_display.py
```

Make sure your app is listed in `INSTALLED_APPS` in your `settings.py`.

---

## 🧠 Available Filters

### `toman_display`

Formats numbers using Persian digits and currency breakdown.

#### Example:

```django
{{ 12500000|toman_display }}
```

**Output:**
```
۱۲ میلیون و ۵۰۰ هزار تومان
```

#### With custom postfix:

```django
{{ 12500000|toman_display:"ریال" }}
```

**Output:**
```
۱۲ میلیون و ۵۰۰ هزار ریال
```

---

### `toman_display_summary`

This filter is defined but currently not implemented in the provided code. You can extend it to provide a short summary format if needed (e.g., only the largest unit, like "۱۲ میلیون").

---

### `to_persian_digits` (internal helper)

Converts standard digits to Persian numerals.

```python
to_persian_digits(123456)  # Output: '۱۲۳۴۵۶'
```

---

## 🧪 Error Handling

If a non-numeric or invalid value is passed, the output defaults to:

```
۰ تومان
```

---

## 📄 License

MIT – Feel free to use and modify.
monty-nats 0.1.0
A NATS helper used by Aity Monty
Requires Python: >=3.6

# opni-nats-wrapper

This repo contains shared code used to build the pypi package https://pypi.org/project/monty-nats/ which is used in several opni services

## Testing
1. have your nats server running in another terminal. For Mac user, you can do:
```
brew install nats-server
nats-server
```

2. test the script: (assume your nats server is running on nats://0.0.0.0:4222)
```
export NATS_SERVER_URL="nats://0.0.0.0:4222"
export NATS_USERNAME=
export NATS_PASSWORD=
cd src/monty_nats
python nats_wrapper.py
```

## Contributing
We use `pre-commit` for formatting auto-linting and checking import. Please refer to [installation](https://pre-commit.com/#installation) to install the pre-commit or run `pip install pre-commit`. Then you can activate it for this repo. Once it's activated, it will lint and format the code when you make a git commit. It makes changes in place. If the code is modified during the reformatting, it needs to be staged manually.

```
# Install
pip install pre-commit

# Install the git commit hook to invoke automatically every time you do "git commit"
pre-commit install

# (Optional)Manually run against all files
pre-commit run --all-files
```
ignorepy 0.1
Generate a .gitignore file from command line tags using gitignore.io 
Requires Python: >=3.7

# ignorepy
Generate a .gitignore file from command line tags using gitignore.io

## Installation
Install with pip:

``` bash
pip install ignorepy
```

## Usage
After installing run

``` bash
ignorepy tag1 tag2 tag3
```

A `.gitignore` file will be generated from [gitignore.io](https://www.toptal.com/developers/gitignore) with the specified tags and copied to the clipboard.

Additionally, pass `-s`

``` bash
ignorepy tag1 tag2 tag3 -s
```

and the tags will be saved as default options.
Then the program can be called with

``` bash
ignorepy
```

and the default tags will be automatically loaded.

Additionally pass `-f`

``` bash
ignorepy tag1 tag2 tag3 -f
```

and instead of being copied to the clipboard, the `.gitignore` file will be written to `.gitignore` in the current working directory.