semvec/pypi-packages huggingface dataset:
examuploader-sebastian-stigler 0.2.2
Web application to upload exam files to by SaveDownloadExam!
License: MIT

[![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)
[![PyPI-Server](https://img.shields.io/pypi/v/examuploader-sebastian-stigler.svg)](https://pypi.org/project/examuploader-sebastian-stigler/)



# ExamUploader

> A Web application to upload exam files to by [SaveSumbitExam](https://pypi.org/project/savesubmitexam-sebastian-stigler/)!

## Installation

1.  Create the user `examuploader`, create some directories in its
    home-directory and revoke other users access to them.

``` {.}
# as user root:
adduser --disabled-password examuploader
mkdir /home/examuploader/{etc,secrets,upload}
chmod o-rwx /home/examuploader -R
chown examuploader:examuploader /home/examuploader -R
```

2.  As user `examuploader` create a virtualenv within its home-directory
    and install the ExamUploader within.

``` {.}
# as user examuploader:
cd ~
python3 -m venv venv
. ./venv/bin/activate
pip install examuploader-sebastian-stigler
```

3.  Create a config file, where you specify the `upload_path` and a
    **list** of courses, that are allowed to upload files. Within the
    each course you specify the course name (which is used as the name
    of the subdirectory in the `upload_path` for it) and a **list** of
    jupyterhub usernames of the `students` in this course either
    directly or as a name prefix by appending an asteriks to the end
    (and only the end) of it. Make sure, that the course name follows
    the pattern `^[a-z0-9-]+$` and the student name (prefix) follows the
    pattern `^[a-zA-Z0-9-]+$`.

``` {.}
# as user examuploader
# /home/examuploader/etc/config.yaml

upload_path: /home/examuploader/upload
courses:
  - name: python101
    students:
      - heinz
      - python101-*
```

4.  Create a `systemd service` file

``` {.}
# /etc/systemd/system/examuploader.service
# systemd service file to start the examuploader

[Unit]
Description=ExamUploader backend
Wants=network.target
Documentation=https://in-stigler.htw-aalen.de/gitea/tools/examuploader

[Service]
Type=simple
User=examuploader
Group=examuploader
WorkingDirectory=/home/examuploader

Environment=EXAM_UPLOADER_SECRETS_DIR=/home/examuploader/secrets
Environment=EXAM_UPLOADER_CONFIG=/home/examuploader/etc/config.yaml

ExecStart=/home/examuploader/venv/bin/uvicorn examuploader.main:app --host 127.0.0.1 --port 8000 --workers 3
# Use SIGINT to stop
KillSignal=SIGINT
# Auto restart on crash
Restart=on-failure
RestartSec=20
# Tag things in the log
SyslogIdentifier=ExamUploader
#StandardOutput=syslog

[Install]
WantedBy=multi-user.target
```

and install and activate the serivices.

``` {.}
# Enable and start the service
systemctl daemon-reload
systemctl enable examuploader.service
systemctl start examuploader.service
```

## Note 

This project has been set up using PyScaffold 4.5. For details and usage
information on PyScaffold see <https://pyscaffold.org/>.
grocropclient 1.0.26
Python client library for accessing Gro Intelligence's US crop insights
License: MIT
Requires Python: >=3.6.1,<4.0.0

The Gro US Crop API Client is a Python library to help with the discovery and retrieval of data series related to US crops.

The library is written on top of the [Gro Python Client API](https://github.com/gro-intelligence/api-client)
and offers a set of convenience methods and constants to make the use of the Gro API faster and simpler.

The use of the Gro US Crop API Client requires a Gro account with API access.
Visit our [website](https://gro-intelligence.com/platform/api) for more information.
coral-decimal-mask 0.4.1
Django mask decimal fields
License: MIT
Requires Python: >=3.10,<4.0

# Coral Decimal Mask

Widgets que aplicam mascaras nos forms do django.

## Instalação

```sh
python -m pip install coral-decimal-mask
```

## Como usar

#### Adicione `decimal_mask` em `INSTALLED_APPS`:

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

#### Configure seus widgets: 

```py
from django import forms
from decimal_mask.widgets import DecimalMaskWidget, MoneyMaskWidget, PercentMaskWidget


class MyForm(forms.Form):
    value1 = forms.DecimalField(widget=DecimalMaskWidget())
    value2 = forms.DecimalField(
        widget=DecimalMaskWidget(
            decimal_attrs={
                "locales": "pt-BR",
                "decimalPlaces": 2,
                "format": {
                    "style": "currency",
                    "currency": "BRL",
                },
            },
        ),
    ) # ou usar forms.DecimalField(widget=MoneyMaskWidget())
    value3 = forms.DecimalField(widget=PercentMaskWidget())
```

- O parâmetro `decimal_attrs` são algumas opções para construir o objeto javascript [Intl.NumberFormat](https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat).

  - `locales` é o primeiro parâmetro de `Intl.NumberFormat` referente a linguagem utilizada na interface do usuário da sua aplicação.

  - `decimalPlaces` é o número de casas decimais que a mascara vai considerar.

  - `format` é um `dict` com as informações do parâmetro `options` de `Intl.NumberFormat`.


## Contribuindo com o projeto

```py
(venv) poetry install
(venv) pytest
```