semvec/pypi-packages huggingface dataset:
streamlit-chatbot 0.0.2.2
A streamlit component, to make chatbots
Requires Python: >=3.8
Keywords: chat streamlit streamlit-component

# st-chat

Streamlit Component, for a Chat-bot UI, [example app](https://share.streamlit.io/ai-yash/st-chat/main/examples/chatbot.py)

authors - [@yashppawar](https://github.com/yashppawar) & [@YashVardhan-AI](https://github.com/yashvardhan-ai)

## Installation

Install `streamlit-chat` with pip
```bash
pip install streamlit-chat 
```

usage, import the `message` function from `streamlit_chat`
```py
import streamlit as st
from streamlit_chat import message

message("My message") 
message("Hello bot!", is_user=True)  # align's the message to the right
```
   
### Screenshot

![chatbot-og](https://user-images.githubusercontent.com/90775147/210397700-5ab9e00d-a61b-4bc9-a34a-b5bd4454b084.png)
ngstrefftz-src 0.2.4
NGSTrefftz is an add-on to NGSolve for Trefftz methods.
Requires Python: >=3.8

NGSTrefftz provides a framework to implement Trefftz finite element spaces for NGSolve, with several Trefftz spaces already implemented. Additionally, Trefftz-DG on tent-pitched meshes for the acoustic wave equation is implemented using meshes provided by ngstents. Furthermore, the package includes an implementation of the embedded Trefftz method.
shift-left-secure 0.2.3
Mitigate vulnerabilities before pushing code to github/gitlab/bitbucket
Requires Python: >=3.8,<4.0

# Shift Left N Secure

Secure your project source code before pushing commits to github/gitlab/bitbucket. Project helps Software Development team to use shift left approach to find and mitigate issues at an early stage instead of taking action once code reaches to the production. 

## Installation

### Using Pip

- From PyPi

    ```bash
    python -m pip install -U shift_left_secure
    ```

- From Github

    ```bash
    python -m pip install git+https://github.com/dmdhrumilmistry/Shift-Left-Secure.git
    ```

### Using Git Clone for Development

- Clone repo

    ```bash
    git clone https://github.com/dmdhrumilmistry/Shift-Left-Secure.git
    ```

- change directory

    ```bash
    cd Shift-Left-Secure
    ```

- Install project

    ```bash
    python -m pip install -e . 
    ```

## Usage

- Add your ChatGPT API key to environment variable

    ```bash
    export OPEN_API_KEY=KEY
    ```

- Use help to view options

    ```bash
    $ python -m shift_left_secure -h
    usage: shift_left_secure [-h] -d DIRECTORY [-c COMMITS] [-o OUTPUT_PATH]

    options:
    -h, --help            show this help message and exit
    -d DIRECTORY, --directory DIRECTORY
                            directory of git project
    -c COMMITS, --commit_hash COMMITS
                            no of commits to be analyzed from current HEAD
    -o OUTPUT_PATH, --output OUTPUT_PATH
                            output path to json file
    ```

- Start analyzing changes between commits using below cmd:

    ```bash
    python -m shift_left_secure -d 'path_to_git_project' -c 1 -o test.json
    ```
cleand 1.3.1
a declarative data validator
Requires Python: >=3.8

# cleaned

pypi: https://pypi.org/project/cleand/

(pypi's project name is not clean**e**d because it wasn't available then)

## Overview

`cleaned` is a declarative data validator.

## Examples

```python
import json
import cleaned as cl


class Request(cl.Cleaned):
    username = cl.Str(pattern='^[a-zA-Z_]+$', blank=False, min_length=3)
    password = cl.Str(blank=False, min_length=8)
    age = cl.Int()


def register_user_api(request_json: str) -> ...:
    dirty_data = json.loads(request_json)
    cleaned_data = Request(**dirty_data)

    # username matches ^[a-zA-Z_]+$ and it has at least 3 characters
    username = cleaned_data.username

    # password is at least 8 characters
    password = cleaned_data.password

    # age is a int value
    age = cleaned_data.age

    # do something with the data
    print(username, password, age)
    ...


register_user_api(json.dumps({
    'username': 'user',
    'password': 'KJF83h9q3FAS',
    'age': '20',
}))


try:
    Request(username='invalid format', password='short')
except cl.ValidationError as e:
    print(e.nested['username'])
    # ('The value must match: ^[a-zA-Z_]+$', 'pattern')
    print(e.nested['password'])
    # ('The length of the value must be longer than or equal to 8.', 'min_length')
    print(e.nested['age'])
    # ('This field is required', 'required')
```

## Static Typing

mypy can handle almost all cleaned values in the library.

```python
import cleaned as cl
import enum


class Examples(cl.Cleaned):
    class NestedExample(cl.Cleaned):
        a = cl.Int()

    class EnumExample(enum.Enum):
        a = 1
        b = 2

    a = cl.Either(cl.Int(), cl.Str(blank=False))
    b = cl.Int().opt()
    c = cl.Dict(key=cl.Int(), value=cl.Float().opt()).opt()
    d = cl.Nested(NestedExample)
    e = cl.Enum(EnumExample)
    f = cl.List(cl.Nested(NestedExample))
    g = cl.List(cl.Nested(lambda: Examples))


ex = Examples()

reveal_type(ex.a)
# Revealed type is 'Union[builtins.int*, builtins.str*]'

reveal_type(ex.b)
# Revealed type is 'Union[builtins.int*, None]'

reveal_type(ex.c)
# Revealed type is 'Union[builtins.dict*[builtins.int*, Union[builtins.float*, None]], None]'

reveal_type(ex.d)
# Revealed type is 'Examples.NestedExample*'

reveal_type(ex.e)
# Revealed type is 'Examples.EnumExample*'

reveal_type(ex.f)
# Revealed type is 'builtins.list*[Examples.NestedExample*]'

reveal_type(ex.g)
# Revealed type is 'builtins.list*[hoge.Examples*]'
```