semvec/pypi-packages huggingface dataset:
basicallybars 1.0.1
A visual way to display algorithm status.
Requires Python: >=3.6

# basicallybars: a beginner's attempt at a python library

<p>This is a small python library.
Its goal is to make algorithms easier to use, by
displaying visual feedback on the progress of the
algorithm! It's also quite customisable.
Yup, that's literally it. WIP; feel free
to improve my terrible code.</p>

## Use

**Import :)**
```
import basicallybars
```

**Create a new loading bar:**

```
bar = basicallybars.progressbar()
```

**Update & set values of that bar:**
```
bar.display(x, y) # Note: "x" is the amount done in this is example while "y" is the full amount of things that have to be done
```

**Different loading indicators**

```
default_bar = basicallybars.progressbar(quantityDisplay="Amount") # Default loading display, shows as "(6/10)"
percent_bar = basicallybars.progressbar(quantityDisplay="Percent") # Creates a bar with a loading display as a percentage like "60%"
remaining_bar = basicallybars.progressbar(quantityDisplay="Remaining") # Creates a bar with a loading display like "4 remaining..."
```
>  Set the quantity_display paramater to anything else and it won't display; only the loading bar (Not really recommended)

**basicallybars in action:**

```
from time import sleep

bar = basicallybars.progressbar()
for x in range(0, 4):
    bar.display(x, 4) # Display a bar that parses through imaginary data, with x being the amount of data finished and y being the total amount (4)
    sleep(1)
    basicallybars.clearTerminal() # Reset the terminal's output to reprint the bar
```

***Note: More features and examples coming soon.***
gspot-fastapi-auth 0.0.6
GSpot authentication package for FastApi
Requires Python: >=3.10

# GSpot authentication package

This package allows you to authorize users through a shared redis

## Install package
```shell
pip install gspot-fastapi-auth
```

## Define env variables

- `REDIS_AUTH_ACCESS_PREFIX` default ''
- `REDIS_AUTH_DB` default 0
- `REDIS_AUTH_HOST` default 127.0.0.1
- `REDIS_AUTH_PORT` default 6379
- `REDIS_AUTH_PASSWORD` default None
- `REDIS_AUTH_TOKEN_STORAGE` default 'headers' should be 'cookies'

## Define startapp and shutdown logic

```python
from contextlib import asynccontextmanager

from fastapi import FastAPI

from src.gspot_fastapi_auth import token_config
from gspot_fastapi_auth.providers import RedisSingleton

@asynccontextmanager
async def lifespan(app: FastAPI):
    RedisSingleton.init_redis(
        token_config.HOST,
        token_config.PORT,
        token_config.DB,
        token_config.PASSWORD
    )
    yield
    await RedisSingleton().close()


app = FastAPI(lifespan=lifespan)

```

## Use in view
```python
from gspot_fastapi_auth import UserRedisAuth

@app.get("/")
async def read_root(user=Depends(UserRedisAuth())):
    return user.to_dict()

```