semvec/pypi-packages huggingface dataset:
a-pandas-ex-lookupdict 0.11
Creates a lookup dict from a Pandas DataFrame (tuples as keys / np as values)
License: MIT
Keywords: pandas,DataFrame,lookup,dict


# Creates a lookup dict from a Pandas DataFrame (tuples as keys / np as values)

```python
pip install a-pandas-ex-lookupdict
```


```python

from a_pandas_ex_lookupdict import pd_add_lookup_dict
import pandas as pd
pd_add_lookup_dict()
df = pd.read_csv(
    "https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv"
)
di1 = df[:5].d_get_lookup_dict(as_index=["Name", "PassengerId"])
di2 = df[:5].d_get_lookup_dict(
    as_values=["Cabin", "Fare"], as_index=["Name", "PassengerId"]
)

di1
Out[4]: 
{('Braund, Mr. Owen Harris',
  1): array([[0, 3, 'male', 22.0, 1, 0, 'A/5 21171', 7.25, nan, 'S']],
       dtype=object),
 ('Cumings, Mrs. John Bradley (Florence Briggs Thayer)',
  2): array([[1, 1, 'female', 38.0, 1, 0, 'PC 17599', 71.2833, 'C85', 'C']],
       dtype=object),
 ('Heikkinen, Miss. Laina',
  3): array([[1, 3, 'female', 26.0, 0, 0, 'STON/O2. 3101282', 7.925, nan, 'S']],
       dtype=object),
 ('Futrelle, Mrs. Jacques Heath (Lily May Peel)',
  4): array([[1, 1, 'female', 35.0, 1, 0, '113803', 53.1, 'C123', 'S']],
       dtype=object)}
	   
	   
di2
Out[5]: 
{('Braund, Mr. Owen Harris', 1): array([[nan, 7.25]], dtype=object),
 ('Cumings, Mrs. John Bradley (Florence Briggs Thayer)',
  2): array([['C85', 71.2833]], dtype=object),
 ('Heikkinen, Miss. Laina', 3): array([[nan, 7.925]], dtype=object),
 ('Futrelle, Mrs. Jacques Heath (Lily May Peel)',
  4): array([['C123', 53.1]], dtype=object)}

```
pycconverter 0.0.6
convert all python script to pyc file in given directory
License: MIT
Requires Python: >=3.6,<4.0


## can be imported by

from pycconverter import PycConverter

### or

import pycconverter

## Convert all .py files to .pyc files

#### param Source_path: Path to the source directory
#### param Destination_path: Path to the destination directory where the .pyc files will be stored
#### param DirectoryNamePyc: Name of the directory where the .pyc files will be stored
:return: None

:Example:

```
>>> from pycconverter import PycConverter

>>> PycConverter(Source_path="/home/user/ProjectsDirectory", Destination_path="/home/user/Projects/PycC", DirectoryNamePyc="BUILD").convert_to_pyc()

```
fastapi-query-conditions 1.0.2
FastAPI-Query-Conditions is a dependency that parses a query string into conditions using operators enclosed in square brackets
License: MIT
Requires Python: >=3.7
Keywords: fastapi,query,querystring,condition

# fastapi-query-conditions

## Introduction
FastAPI-Query-Conditions is a dependency that parses a query string into conditions using operators enclosed in square brackets.

For example, if you send a request to `/orders?amount[gte]=1000&amount[lt]=2000`, you can use the query string as parsed conditions like this:
```json
{"gte":1000,"lt":2000}
```


## Install
```bash
> pip install fastapi-query-conditions
```

## Quick Start
```python
from typing import Dict

from fastapi import Depends, FastAPI
from fastapi_query_conditions import query_conditions

app = FastAPI()

@app.get("/items")
def query_items(amount: Dict[str, int] = Depends(query_conditions(field='amount', factory=int))):
    print(amount)
    return amount
```

Then, if you send a request to `/items?amount[gte]=1000&amount[lt]=2000`, you can check the following results.
```python
{'gte': 1000, 'lt': 2000}
```

Also, you can use various factory functions for your query parameter.
```python
from datetime import datetime
from typing import Dict

from fastapi import Depends, FastAPI
from fastapi_query_conditions import query_conditions

app = FastAPI()

@app.get("/orders")
def query_orders(time: Dict[str, int] = Depends(query_conditions(field='time', factory=datetime.fromisoformat))):
    print(time)
    return time
```

Then, if you send a request to `/orders?time[gte]=2022-10-18T12:00&time[lt]=2022-10-18T12:30`, you can check the following results.
```python
{'gte': datetime.datetime(2022, 10, 18, 12, 0), 'lt': datetime.datetime(2022, 10, 18, 12, 30)}
```