semvec/pypi-packages huggingface dataset:
fastlib-py 0.5.0
Fastlib, high performance, easy to use, fast to code, ready for production
Requires Python: >=3.11
Keywords: fastapi, library, sqlmodel, web

# Fastlib
High performance, easy to use, fast to code, ready for production

## Quick Start
1. Download dependencies with [uv](https://docs.astral.sh/uv)
```shell
# Default
uv add fastlib

# MySQL
uv add fastlib[mysql]

# PgSQL
uv add fastlib[pgsql]
```

2. Setup [alembic](https://github.com/sqlalchemy/alembic)

3. Paste files to your project
[main.py](https://github.com/tyvekzhang/biohunter/blob/main/main.py)
[server.py](https://github.com/tyvekzhang/biohunter/blob/main/src/main/app/server.py)
[config.yml](https://github.com/tyvekzhang/biohunter/blob/main/src/main/resource/config.yml)

4. Run the server

```shell
uv run main.py
```

## License

[MIT](https://opensource.org/licenses/MIT)
pysqlitefs 1.6.0
Python bindings for SQLiteFS - Simulate a local filesystem inside a SQLite database
Requires Python: >=3.9
Keywords: sqlite, filesystem, database, file, storage, compression, encryption

# PySQLiteFS Bindings

This project provides bindigs for sqlitefs project. You can create a file system inside sqlite database. With key you can encript the whole database including sqlite headers.

## Supported functions

- pwd - print working directory
- mkdir - create a new folder
- cd - change wirking directory
- ls - list files and folders
- cp - copy file. (Works with files only)
- mv - move node (file or folder)
- rm - remove node
- write - write file to the db
- read - read file from the db
- path - get full path for the sqlitefs node
- stats - recursively gets the count of all files in a directory, indicating the total size in compressed and raw form.

## Read/write algorithms

To add your own modifications check `Custom save and load functions` section below. You can modify your data as you want, for example you can encrypt/compress and decrypt/decompress in save and load respectively.

## Examples

A simple example

```python
from pysqlitefs import SQLiteFS

fs = SQLiteFS("test.db", "secret")
raw_content = "Raw data content"
fs.write("file.txt", raw_content.encode())
content = fs.read("file.txt")
print(f"Content of file.txt: {content}")
assert content.decode() == raw_content, "Content mismatch after save and load"
```

### Custom save and load functions

> NOTE: you can specify only one of them if you want to read or write only. So you can write data at your own pc with registered write function and send file with load function only. In this case user can read the data, but cannot modify it (only remove).

```python
from pysqlitefs import SQLiteFS


def save(data: bytes) -> bytes:
    return data[-1::-1]


def load(data: bytes) -> bytes:
    return data[-1::-1]


with open("file.dat", "rb") as f:
    raw_content = f.read()

fs = SQLiteFS("test.db")
fs.register_save_func("reverse", save)
fs.register_load_func("reverse", load)

for name in fs.getSaveFuncs():
    print(f"Test function: {name}")
    fs.write(f"{name}.dat", raw_content, name)
    content = fs.read(f"{name}.dat")
    assert content == raw_content, "Content mismatch after save and load"
```
pyodbc-extras 0.0.0
Extra Methods for Working with ODBC Connections in Python
Keywords: data, odbc, python, sql

# pyodbc-extras
> Extra Methods for Working with ODBC Connections in Python

## install
```sh
pip install pyodbc-extras
```

## usage
```python
from pyodbc import connect

from pyodbc_extras import dump_sql_to_rows, dump_table

cnxn = pyodbc.connect(CONNECTION_STRING)
cursor = cnxn.cursor()

# dump custom sql
dump_sql_to_rows(cursor, "SELECT * FROM cars WHERE year < 2015")
{ "column_names": ["year", "make", "model", ...], "rows": [{"year": 2005, "make": "Audi", "model": "A3"}, ...] }

# same as dump_sql_to_rows(cursor, "SELECT * FROM cars") 
rows = dump_table(cursor, "cars")
```