semvec/pypi-packages huggingface dataset:
django-cmd-controller 0.1
A Django app to resistrict custom management command execution.
License: MIT

Cmd Controller
=====
 cmd_controller is a Django app to help run the custom management command in a more convenient way,
Most of the time during deployment, develpers need to run some django management scripts,
some script need to run only once and some need to run again and again.
Running some scripts again and again may corrupt the application. The cmd_controller help to mark a script reentrant,
while during the creation of the script and skips the scripts which are not reentrant.


Quick start
-----------

1. Add "cmd_controller" to your INSTALLED_APPS setting like this::
    INSTALLED_APPS = [
        ...
        'cmd_controller',
        ]
2. Run ``python manage.py migrate`` to create the cmd_controller models.
3. How to use it.
   import cmd_utils import check_command in your custom django command, and decerate the handle
   method and pass the script name as first parameter and Boolean value as second parameter. Pass True if the
   script can run again and again(reentrant), False for scripts run only once.

   >> @check_command(os.path.basename(__file__).split(".")[0], <True>)  # need to run scripts multiple times
   >> @check_command(os.path.basename(__file__).split(".")[0], <False>) # should run only once.


app/management/commands/<custom_command.py>
# if the script should run only once.

import os
from django.core.management.base import BaseCommand
from cmd_controller.cmd_utils import check_command


class Command(BaseCommand):
    help = 'test custom command'

    @check_command(os.path.basename(__file__).split(".")[0], False)
    def handle(self, *args, **options):
        # your custom command logic


# if the script is reentrant

class Command(BaseCommand):
    help = 'test custom command'

    @check_command(os.path.basename(__file__).split(".")[0], True)
    def handle(self, *args, **options):
        # your custom command logic

# run the script
>> python manage.py custom_command.py
pyvarnam 1.0.0
Pyvarnam provides python bindings for libvarnam
License: MIT
Requires Python: >3.0

# Pyvarnam

```
     _     _
    /  \  /  \         |
    \_//  \_//  /\_____|
     _     |_   _ _ _ 
    ( )_| (|_) ()| | )O
                 _ _ _
                ()| | |
    ===================

```
Pyvarnam is a python wrapper to the [libvarnam](https://github.com/varnamproject/libvarnam) library.

[Varnam](http://www.varnamproject.com/) is an open-source transliterator suited for Indian languages and the
main component is a C library called `libvarnam`. Pyvarnam provides python bindings for libvarnam.

##### Installation

You need to install libvarnam for pyvarnam to work. You could refer [libvarnam installation](https://github.com/varnamproject/libvarnam#installing-libvarnam) to find out how to install libvarnam.

You can install it from PyPi using

```
pip install pyvarnam
```

Or you can download the archive, un-tar/zip and `cd` into the directory you unzipped the
archive into, and then run

```
 user@user-pc:~/unzipped-dir$ python setup.py install
```

##### Usage

To transliterate with pyvarnam, you just have to run the following.
```
from pyvarnam import varnam

var_lib = varnam()
var_lib.varnam_init_from_id("ml")
result = var_lib.varnam_transliterate("varnam")
if result is not None:
    print result[0][0]

```

As of now only some of the functions mentioned in libvarnam/api.h has been implemented. You could refer `varnam.py` to
see which all functions are available. 

##### Running the tests

A basic test suite has been implemented based on the transliteration tests in
libvarnam. To run them, `cd` to the `tests` folder in the archive and run

```
python test.py
```
Currently pyvarnam has only been tested in Debian. If you find any bugs or would like to suggest some other changes,
report the issue here or feel free to contact me.

##### License & Contact

This project is licensed under the MIT License. For more info, see LICENSE.txt
Copyright (c) 2015 Sebin Thomas

You could contact me at me(at)sebin(dot)in or I'm @stc043 on twitter.