semvec/pypi-packages huggingface dataset:
declic 1.0.2
Declic (DEcorator-oriented CLI Creator) is a tiny Python 3 package for creating command line interfaces
License: MIT

Declic
======

Declic (DEcorator-oriented CLI Creator) is a tiny Python 3 package for
creating command line interfaces using decorators. It was inspired by
the `click`_ package and is based on `argparse`_.

Installation
------------

>From PyPI:

::

   pip install declic

or from Github:

::

   pip install git+https://github.com/Septaris/declic.git

Usage
-----

Here is an example of Declic usage:

.. code:: python

   from declic import group, argument, command

   # on_before callbacks are executed if:
   # - the group itself is called
   # - if any of the child of the group is called
   def before_bar():
       print('before bar')

   def before_sub(tata):
       print('before sub: %s' % tata)

   # define the root command (a group)
   @group(description='my description', on_before=before_bar)
   @argument('--version', action='version', version='<the version>')
   @argument('--foo', type=int, default=1)
   def bar():
       print('bar')

   # define a sub-group
   @bar.group(invokable=True, on_before=before_sub)
   @argument('--toto', type=int, default=2)
   @argument('--tata', type=str, default='aaa')
   def sub(toto, tata):
       print('toto: %s' % toto)
       print('tata: %s' % tata)

   # define a sub-command of the sub-group
   # chain option allows to execute each parent group (if they are invokable) before the command call
   # each on_before functions will be executed anyway
   @sub.command(chain=True)
   def mop(toto, **kwargs):
       print('kwargs: %s' % kwargs)
       print('toto: %s' % toto)

   # define a sub-command of the root group
   @bar.command()
   @argument('-x', type=int, default=1)
   @argument('y', type=float)
   def foo(x, y):
       print(x, y)


   if __name__ == '__main__':
       import sys

       bar(sys.argv[1:])
       # or bar()

Running the cli:

::

   $ python my_file.py --help

   usage: bar [-h] [--foo FOO] [--version] {sub_group,foo} ...

   my description

   positional arguments:
     {sub,foo}

   optional arguments:
     -h, --help       show this help message and exit
     --foo FOO
     --version        show program's version number and exit

.. _click: http://click.pocoo.org/6/
.. _argparse: https://docs.python.org/3/library/argparse.html
nardis 0.0.7
A web framework based on ASGI
License: MIT
Requires Python: >=3.6


# Nardis

A web framework based on ASGI. This is inspired by the Express framework for node.js.

# Current status

Still not production-ready.

This API is currently experimental, and is subject to change at any time.

As such, please don't use this for production applications yet.

However, please do play around with it. Any feedback at this stage is welcome as the API becomes more stable.


# Requirements

Python 3.6+

# Installation

## Via pip

Run the following:

```
$ pip install nardis
```

## From source

To build from source, clone this repo, and then:

```
$ python setup.py install
```

# Example

Here's a quick example you can use. Create an `application.py` and copy and paste this:

```python
from nardis.asgi import main
from nardis.routing import Get as get, Post as post
import asyncio


template_start = """
<!doctype html>
<head><title>example</title></head>
<body>
"""

template_end = """
</body>
"""

async def index(req, res):
    """
    This just demonstrates that you can write async code. Don't actually write this in production.
    """
    await res.send(template_start, more=True)
    for x in range(10, 0, -1):
        await res.send(f"<p>{x}!</p>", more=True)
        await asyncio.sleep(1)
    await res.send("<p>liftoff!</p>", more=True)
    await res.send(template_end)


async def hello(req, res):
    """
    Try going to http://127.0.0.1:8000/hello/your_name/

    You'll see "Hello, your_name!"
    """
    name = req.params.get('name', 'world')
    await res.send(f"<h1>Hello, {name}!</h1>")


routes = [
    get(r"^/?$", index),
    get(r"^/hello/(?P<name>\w+)/?$", hello),
]

config = {
    'routes': routes,
}

app = main(config)  # this is the ASGI application

if __name__ == '__main__':
    from uvicorn.run import run
    run(app, '127.0.0.1', 8000)
```

And then:

```
$ python application.py
```

Alternatively, you could also do the following:

```
$ uvicorn application:app
```

This should start a server on http://127.0.0.1:8000


# Using other web servers

Currently, Uvicorn is a dependency of Nardis.

The codebase doesn't actually use Uvicorn, but this dependency allows you to run your application quickly (see above example). This dependency might be removed in the future.

Nardis should also work with other ASGI-based web servers, like Daphne.

To get Daphne working with the example code above, you could do the following:

```
$ daphne application:app
```
gremlinc 0.3
Handle gremlin characters (zero width / invisible).
License: MIT
Keywords: zero width characters gremlins

# Gremlinc
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)
[![PyPI](https://img.shields.io/pypi/v/gremlinc.svg)](https://pypi.org/project/gremlinc/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gremlinc.svg)](https://pypi.org/project/gremlinc/)
[![license](https://img.shields.io/github/license/marinko-peso/gremlinc.svg)](https://github.com/marinko-peso/gremlinc/blob/master/LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)

Hide a message using zero width characters.


# Installation

Available via PyPi
```sh
pip install gremlinc
```

# Usage

```python
from gremlinc import release, contain

text_in_gremlins = release('Your text goes here')
original_text = contain(text_in_gremlins)
```
Ideal for hiding messages in Javascript variables and DOM elements.


# License

MIT.