semvec/pypi-packages huggingface dataset:
graphic-verification-code 1.1.1
Graphic Verification Code
Keywords: Graphic Verification Code

=========================
graphic-verification-code
=========================

Graphic Verification Code

Installation
============

::

    pip install graphic-verification-code


Usage
=====

::

    In [1]: import gvcode

    In [2]: gvcode.generate()
    Out[2]: (<PIL.Image.Image image mode=RGB size=120x30 at 0x7FD2380E1310>, 'ubAR')

    In [3]: gvcode.base64()
    Out[3]:
    ('iVBORw0KGgoAAAANSUhEUgAAAHgAAAAeCAIAAABoq03CAAACyklEQVR4nN1aO04kMRB9NdoIQUIAEVcgIuAEKyQyUsShIOUmmwEpZyAgG4SI+GRTBB48bn+6XXZ52uxTB6OWXS5XPb+y20PMDAAAEdnfPaOFn+M2VUZcVPb/b0BEbe27ubKDtab2jKvHzFE0ekGXEANGM7Mx1yK9rs0ZNcqVyvwu9Q4nmeWlsUMF79ClESQ12qRxa2JSgEmXmsqu1PhEMTSxFhltXVXyoUiOcFJS438mW7iqnWO9Q+73AJnMueH+XRI5O0qCpbLd2TJmp4X+gYVo82wNJveXlwMHbm9xc7N2Qxpl9UozrdEhRlT7Z1YAcHgIIqjTKMpNZt7ZwfGxJ27lo6jTvyTQBqlw25/LJYjw/o69Pf1wezg7w+enyavvSSebIDXlIqKQB4sFVit9XqcENzpQi1WV6Y8LX6OLtSl6dl+tyoxljeUh5fgWSmAOWX3pmLE0W333QpbvkZbvZTkb34wp7zoKTpJOXwAgwvk5Li7ADGY8PfmrZMS4ihy79dzzbRzjHNXcXXpqaJUrXyVTIou8qWrJMRGOjvD8LHZgzGa7QGPDvtxBUlPKjKBioIOJxB3Lh/6B5e5uc2RwP3D387EpB+6BSyV/5fvoEAcHa5/Mrs7BX4CB6UCHlVAKIphl6m25RMGy1cL0YsbHR5VX0GX0y8s6Ug8Pm1kR4fT0H3NVncyECQrAGG43r67KU2jCvbsLZiyX5b61uFEGglOZVySRlu36eui2dHktInWNKEcnGGd0De/cdee+cRqIr+DKVj0GV3GyqDHj+nrwgcw+9/eTfWPnqdYnlMdHnJzkNnbz64pP+FJkStQxZaHGFHSLYRRfX0A2oaJtXB3I/+Y5FCuBD7ZLqnGZqrRitNWplEx3fm+Q0r39fby9lWz4ep+wCNL8TV4Vhepha4A0bN39JayuDktrbME13jrKr6/CjrMw+jfeOlbiGyMXxYAIZpe8AAAAAElFTkSuQmCC',
     'QnCg')
ddcrelight 0.0.1
Update monitor brightness intelligently using the DDC protocol.
Requires Python: >=3.7

## Requirements

- A yoctopuce light sensor (https://www.yoctopuce.com)
- ddcutil

## Setup

A udev rule is likely required to allow the tool to run as non-root. The
following can be added as the file `/etc/udev/rules.d/50-yoctopuce.rules`:

```
# udev rules to allow write access to all users for Yoctopuce USB devices
SUBSYSTEM=="usb", ATTR{idVendor}=="24e0", MODE="0666"
```

Additionally, udev rules must be configured for ddcutil to operate without root
permissions:

```
https://www.ddcutil.com/i2c_permissions/
```

Then a daemon should be setup:

ddcrelight.service:
```
[Unit]
Description=Update monitor brightness intelligently using light sensors.

[Service]
ExecStart=<path-to-script>/ddcrelight daemon
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target
```
daner 0.0.3
async command line manage for fastapi
Requires Python: >=3.7

# daner

[Github-flavored Markdown](https://guides.github.com/features/mastering-markdown/)

## install

```bash
pip install daner
```

## example

### simple usage

```python
from daner import dong

# command
# python manage.py hi --name milisp
@dong()
async def hi(name: str):
	print(name)


# command
# python manage.py hi -u milisp
# alias u=username
@dong(alias={"u": "username"})
async def create(username: str):
	print(username)


# command
# python manage.py greet --name milisp
# if you want to run a sync function
@dong(sync=True)
def greet(name):
	print(name)
```

### create superuser

```python
# manage.py
# createsuperuser
# $ python manage.py createsuperuser -u username -e email
from daner import dong
import databases
import getpass
import ormar
import sqlalchemy
import uvicorn

DB_URI = "sqlite:///fast.db"
database = databases.Database(DB_URI)
engine = sqlalchemy.create_engine(DB_URI)
metadata = sqlalchemy.MetaData()
metadata.create_all(engine)


class User(ormar.Model):
	class Meta(ormar.ModelMeta):
		metadata = metadata
		database = database

    id = ormar.Integer(primary_key=True)
    username = ormar.String(max_length=60, unique=True)
    password = ormar.String(max_length=2048)
    email = ormar.String(max_length=80, nullable=True, unique=True)

@dong(alias={"u": "username", "e": "email"})
async def createsuperuser(username: str, email: str = None):
    await database.connect()
	password = getpass.getpass("password: ")
    password = "hashed" + password
    await User(
        username=username,
        password=password,
        email=email,
        is_superuser=True,
    ).save()
    await database.disconnect()

```