semvec/pypi-packages huggingface dataset:
flask-migratepg 1.0.3
Simple migration command for Flask and Psycopg 3.
Requires Python: >=3.7

# PostgreSQL Database Migrations for Flask with Psycopg

## Synopsis

`flask-migratepg` is a simple migrations tool for Flask and [Psycopg 3](https://www.psycopg.org/psycopg3/).

 1. Install and setup the Flask extension.
 2. Place SQL migrations under the subdirectory `database/migrations/`.
 3. Execute migrations with the command **`flask migrate execute`**.

## Installation

```
$ pip install flask-migratepg
```

Setup in application:

````python
from flask import Flask
from flask_migratepg import MigratePg
import os

app = Flask(__name__)
app.config.from_mapping(
    MIGRATIONS_PATH=os.path.abspath('database/migrations'),
    PSYCOPG_CONNINFO="dbname=example host=localhost user=example password=secret"
)
MigratePg(app)
````

## Usage

Create a new migration SQL file:

```
$ flask migrate --help
$ flask migrate new --help
$ flask migrate new migration_name
```

Then to run migrations:

```
$ flask migrate execute --help
$ flask migrate execute
```

This will run migrations in alphabetical order and track them in a migrations table.

If there is a failure, the transaction will be rolled back.

### Migration Files

Migrations are placed under `database/migrations/` as an **SQL** file
(that is, with an `.sql` filename extension.)

The recommended filename format is `YYMMDD_NNN_migration_name.sql`, for example, `20240219_001_add_table_accounts.sql`.

Statements are separated as per standard SQL conventions with a semicolon.

These are just plain-text standard SQL files. Comments (lines beginning with `-- `) will be ignored.
tortoise-database-url 0.5.0
Make it easy to generate database url.
Requires Python: >=3.9
Keywords: database_url, tortoise-orm

# database-url
![Python Versions](https://img.shields.io/pypi/pyversions/tortoise-database-url)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![LatestVersionInPypi](https://img.shields.io/pypi/v/tortoise-database-url.svg?style=flat)](https://pypi.org/project/tortoise-database-url/)
[![GithubActionResult](https://github.com/waketzheng/database-url/workflows/ci/badge.svg)](https://github.com/waketzheng/database-url/actions?query=workflow:ci)
[![Coverage Status](https://coveralls.io/repos/github/waketzheng/database-url/badge.svg?branch=main)](https://coveralls.io/github/waketzheng/database-url?branch=main)
![Mypy coverage](https://img.shields.io/badge/mypy-100%25-green.svg)

Toolkit for TortoiseORM to generate database url from Django DATABASES item format.

## Installation

```bash
pip install tortoise-database-url
```
Or by uv/pdm:
```bash
uv add tortoise-database-url
pdm add tortoise-database-url
```

## Usage

- DbUrl
```py
from tortoise_database_url import DbUrl

db_url = DbUrl.mysql('my_db', user='root', password='Me@example.com')
print(db_url)
# mysql://root:Me%40example.com@127.0.0.1:3306/my_db
```

- generate

```py
import tortoise_database_url

db_url = tortoise_database_url.generate('my_db', engine='mysql', user='root', password='Me@example.com')
print(db_url)
# mysql://root:Me%40example.com@127.0.0.1:3306/my_db

db_url = tortoise_database_url.generate('db_name', engine='postgres')
print(db_url)
# postgres://postgres:postgres@127.0.0.1:5432/db_name
```

- from_django_item
```py
import pathlib
import tortoise_database_url

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.sqlite3",
        "NAME": pathlib.Path("/tmp") / "db.sqlite3"
    },
}

db_url = tortoise_database_url.from_django_item(DATABASES["default"])
print(db_url)
# sqlte:///tmp/db.sqlite3
```
See more at:
https://github.com/waketzheng/database-url/blob/main/tests/test_main.py
https://tortoise.github.io/databases.html?h=database
PythonWalker 0.3.1
A Python based bot library for PixelWalker
Requires Python: >=3.10

# PythonWalker
A Python based bot library for [PixelWalker](https://pixelwalker.net)

Examples can be found [here](https://github.com/Tycho10101/PythonWalker/tree/main/examples).

## Setup
- In a command line, run `pip install PythonWalker` (add `--upgrade` when updating)
- Put `import PythonWalker as pw` in your main.py or main Python script

## Setup (Manual)
- Put the `/PythonWalker` directory from this repository into the root of your program
- Put `import PythonWalker as pw` in your main.py or main Python script
- Install Protobuf, binreader, Requests, and Websockets

## Features
- Connect to rooms
- Chat functions
- Receive leave and join packets
- Custom commands
- Blocks

## Todo List
- Private Messaging
- And more! (suggest them in the issues page)

Thanks to the folks on the Discord for helping me out!
Feel free to fork and contribute!
transformer-components-michaelkosmider 0.1.1
Reusable Transformer model components.
Requires Python: >=3.8

# transformer_components_michaelkosmider

This package contains the source code for the Transformer implementation featured in my tutorial:  
🔗 [Transformer Tutorial](https://michaelkosmider.github.io/transformertutorial/)

The full source code for this package is available here:  
[GitHub – transformer_components_michaelkosmider](https://github.com/michaelkosmider/transformer_tutorial_code/blob/main/README.md)

---

## Installation

This package requires PyTorch but does **not** install it automatically. You must install the correct version for your system (CPU/GPU, CUDA version, etc.) first:  
[PyTorch Installation Instructions](https://pytorch.org/get-started/locally/)

Once PyTorch is installed, install this package from PyPI.

## Available Imports

This package exposes the following classes and functions at the top level:

- `TransformerDecoder`
- `TransformerDecoderLayer`
- `TransformerEncoder`
- `TransformerEncoderLayer`
- `TransformerEncoderDecoder`
- `FeedForwardSubLayer`
- `AttentionSubLayer`
- `MultiHeadAttention`
- `compute_attention_matrix`
- `slice_vertically`
- `unslice_vertically`
- `get_causal_mask`

Example:
```python
from transformer_components_michaelkosmider import TransformerEncoder, get_causal_mask

encoder = TransformerEncoder(...)
mask = get_causal_mask(seq_len=10)
wristband-python-jwt 0.1.0
Framework-agnostic Python SDK for validating JWT access tokens issued by Wristband.
Requires Python: >=3.9
Keywords: api, auth, authentication, authorization, fastapi, flask, django, jwt, multi-tenant, multi-tenancy, oauth, oidc, sdk, secure, security, sso, validation, wristband

# Wristband Framework-Agnostic JWT Validation SDK for Python

Wristband provides enterprise-ready auth that is secure by default, truly multi-tenant, and ungated for small businesses.

- Website: [Wristband Website](https://wristband.dev)
- Documentation: [Wristband Docs](https://docs.wristband.dev/)

For detailed setup instructions and usage guidelines, visit the project's GitHub repository.

- [Python JWT SDK - GitHub](https://github.com/wristband-dev/python-jwt)


## Details

This SDK provides secure JWT validation capabilities for applications using Wristband authentication. It is framework-agnostic and works with FastAPI, Flask, Django, and other Python web frameworks. The SDK follows OWASP security best practices and is supported for Python 3.9+. Key functionalities include:

- Extracting Bearer tokens from HTTP Authorization headers.
- Validating JWT signatures using Wristband's JWKS endpoint.
- Verifying token claims including issuer, expiration, and algorithm allowlisting to prevent common JWT vulnerabilities.
- Automatic JWKS key caching and rotation for optimal performance.
- Comprehensive error handling with detailed validation messages.

You can learn more about JWTs in Wristband in our documentation:

- [JWTs and Signing Keys](https://docs.wristband.dev/docs/json-web-tokens-jwts-and-signing-keys)

## Questions

Reach out to the Wristband team at <support@wristband.dev> for any questions regarding this SDK.