semvec/pypi-packages huggingface dataset:
FileCache-jingle1267 0.1.0
Small high-performance file caching tool for python.
Requires Python: >=3.6

# FileCache

Small high-performance file caching tool for python. Sub table and sub database.

### Can do what?

You can set cache file easily, just focus on your business.

### How to use?

#### 1. import
```
pip install demjson
pip install LogColorHelper-jingle1267
pip install FileCache-jingle1267
```

```python
from FileCache import FileCache
```

#### 2. USE

```python
FileCache.easy_cache('test_cache_file.json', 'cache_key', test_hit_callback, test_miss_callback, a=1, b='c')
```

各个参数的含义：

```python
# 快速缓存便利工具
# file_name: 缓存文件名称
# cache_key：缓存字段名
# hit_callback：命中缓存需要执行的回调
# miss_callback：没有命中缓存需要执行的回调
# kwargs：回调需要传的参数
def easy_cache(file_name, cache_key, hit_callback, miss_callback, **kwargs)
```


#### 3. Config(Optional)

##### 3.1 Set cache folder path

```python
FileCache.CACHE_DIR = './tests'
```

##### 3.2 Set cache file sections

```python
FileCache.CACHE_FILE_SECTION_COUNT = 2
```

Better performance can be achieved by properly setting sections count.
graphsdk 1.0.4
A package for accessing Graph Api
Requires Python: >=3.6

MIT License

Copyright (c) [2023] [Ajay Vishwakarma]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
mysql-statement-builder 0.3.0
Simplifies writing MySQL statements in non-ORM environments.

# MySQL-statement-builder (mysqlsb)
...

## Installation
```pip install mysql-statement-builder```

## Usage
```
import mysql.connector
from mysql.connector import pooling
from contextlib import contextmanager

from mysqlsb import MySQLStatementBuilder, FetchType

# Setup a connection pool using the MySQL python connector
connection_pool = mysql.connector.pooling.MySQLConnectionPool(
    user='user',
    password='password',
    host='host',
    database='database',
    port='port',
    autocommit=False,
)


# Setup a method for recieving a connection from the connection pool
@contextmanager
def get_connection() -> pooling.PooledMySQLConnection:
    """
    Returns a MySQL connection that can be used for read/write.
    """
    connection = connection_pool.get_connection()
    try:
        yield connection
    finally:
        connection.close()


# Apply mysql-statement-builder to select data from the database
def get_user_from_database(user_id: int):
    with get_connection() as connection:
        mysql_statement = MySQLStatementBuilder(connection)
        user_data = mysql_statement \
            .select('users', ['id', 'username', 'email']) \
            .where('id = %s', [user_id]) \
            .execute(fetch_type=FetchType.FETCH_ONE, dictionary=True)

        if user_data is None:
            raise UserNotFoundException('User could not be found in database')

        user = User(**user_data)  # Unpack results dictionary into e.g. a Pydantic basemodel class
        return user
```