semvec/pypi-packages huggingface dataset:
dotnest 1.1
A library for accessing deep structures from simple text statements
Requires Python: >=3.7

# The problem

Say you have a configuration file, or command line options, or
[whatever].  And you want to have user-specified elements reference
deep portions of a structure that you've defined, read in from yaml or
json, or [whatever].  How?

# This solution

(because there are likely others)

Users don't understand complex syntax, so this makes it easy to
access deep dict or arrays with keys and numbers separated by a "."
character.

# A working demonstration

``` python
import dotnest

data = {
    'subdict': {
        'arrrr': ["there", "she", "blows",]
    },
    'list': [
        {'name': 'element1'}, {'name': 'element2'}
    ]
}

dn = dotnest.DotNest(data)
print(dn.get("subdict.arrrr.1"))       # she
print(dn.get("list.1.name"))           # element1

dn.set("subdict.newentry", "bar")
print(dn.get("subdict.newentry"))      # bar
print(dn.get("list.0"))                # {'name': 'element1'}

dn.get("does.not.exist")               # raises ValueError
dn.get("does.not.exist", 
       return_none=True)               # None

```

# Used by

This class can be best married with tools that read in and need to
referenc YAML or JSON as mentioned.  As such, the original source of
this effort comes from the package that converts from a netbox nestetd
structure to ansible: [nb2an].

[nb2an]: https://github.com/hardaker/nb2an
[whatever]: https://en.wikipedia.org/wiki/Special:Random
levenshtein-matching 0.5.2
A library for string matching between two lists.
Requires Python: >=3.8

## Installation
The library requries Python>=3.8 and to install the package simply run:
```bash
pip install levenshtein_matching
```

## Why
Performing string matching between to lists is an $n\times m$ operation. Depending on your use case and the size of the lists you want to match this becomes unfeasible. This library exists to leverage Rust's performance to decrease run time for such operations.

## Example
```python
from levenshtein_matching import find_best_match_levenshtein

target = [("String 1", 1), ("String 2", 2)]
query = [("String 2", 0.8), ("String 1", 0.5)]
threshold = 0.9

target_values, query_values = find_best_match_levenshtein(target, query, threshold)
print(f"Target values: {target_values}")
print(f"Query values: {query_values}")
```
Output:
```
Target values: [2, 1]
Query values: [0.8, 0.5]
```
djene 0.0.1
Djene: Inject a Django Gene Into Your SQLModel
Requires Python: <4.0,>=3.12

# Djene: Inject a Django Gene Into Your SQLModel

Tired of SQLModel's plain queries? Give your models a dose of Django's expressive querysets with Djene!

## Key Features

* **Unleash the Django Within:** Filter, order, get, and more using Django's beloved queryset API.
* **SQLModel Superpowers:** Keep all the benefits of SQLModel while writing cleaner, chainable queries.
* **Seamless Integration:** No genetic engineering required – Djene works with your existing models.
* **Evolve Your Queries:** Extend Djene's queryset behavior to adapt to your project's unique DNA.
* **FastAPI Compatibility:** Built-in middleware makes integrating with FastAPI a breeze.

**Disclaimer:** Djene is still in its experimental phase. We welcome your feedback and contributions as we work towards a stable release.

## Installation

```bash
pip install djene
```

## Usage with FastAPI (Genetic Modification Example)

```python
from fastapi import FastAPI
from sqlmodel import create_engine, Field, SQLModel
from typing import Optional

from djene import DjeneMiddleware, dj

# Database setup (replace with your actual credentials)
engine = create_engine("postgresql+psycopg2://user:password@host/database")

app = FastAPI()
app.add_middleware(DjeneMiddleware, engine=engine)

class Hero(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True, index=True)
    name: str
    age: Optional[int] = Field(default=None)

@app.get("/hero/{hero_id}")
def get_hero(hero_id: int):
    hero = dj(Hero).get_or_none(id=hero_id)
    return hero if hero is not None else {"error": "Hero not found"}
```

## Unleash Your Inner Django

```python
# Filtering
heroes = dj(Hero).filter(age__gt=30, name__startswith="S")  # Find strong heroes over 30
heroes = dj(Hero).filter(age__in=[25, 35])                 # Heroes aged 25 or 35
heroes = dj(Hero).filter(name__isnull=True)                # Heroes with no name

# Ordering
heroes = dj(Hero).order_by("-age")                          # Rank heroes by experience (age)

# Retrieving
hero = dj(Hero).get(id=1)                                  # Get a specific hero
first_hero = dj(Hero).first()                              # Get the first hero
all_heroes = dj(Hero).all()                                # Get all heroes

# Aggregation (experimental)
oldest_hero = dj(Hero).order_by("-age").first()             # Find the oldest hero
hero_count = len(dj(Hero).all())                           # Count all heroes
```

## Documentation

We're still decoding Djene's full potential. Stay tuned for comprehensive documentation.

## Contributing

Want to help evolve Djene? Check out our [Contributing Guidelines](CONTRIBUTING.md).

## License

Djene is open-source under the MIT License, free for you to experiment and modify.
django-modal-2fa 0.0.5
Django app to implement two factor authentication with bootstrap modals
Requires Python: >=3.6

[![PyPI version](https://badge.fury.io/py/django-modal-2fa.svg)](https://badge.fury.io/py/django-modal-2fa)

Adds to Django's authentication with 2FA option

* 2FA with Authenticator app using TOTP
* Use WebAuthn with Windows Hello, Face ID, Yubikey etc
* Lock out by ip and username for too many failed attempts
* Customisable Bootstrap 4 Modal interface with django-nested-modals
* Cookie option to bypass 2FA (changing key to prevent copying of cookies)
* Invite users by email to setup an account
* Forgotten password function to email reset link

![alt text](docs/login.png)

## Installation

### settings

    from modal_2fa.settings_helper import modal_2fa_apps_admin
    INSTALLED_APPS += [
        *modal_2fa_apps_admin,
    ]
    
    OTP_TOTP_ISSUER = '**appname**'
    AUTHENTICATION_BACKENDS = ['modal_2fa.auth.CookieBackend']        
    LOGIN_URL ='/auth/login/'
    LOGOUT_REDIRECT_URL = '/auth/login'



**remove** 
    ``'django.contrib.auth'``
from INSTALLED_APPS

### urls

    from modal_2fa.utils import get_custom_auth
    
    urlpatterns += [
        path('', include(get_custom_auth().paths(include_admin=True))),    
    ]