semvec/pypi-packages huggingface dataset:
ichi-auth 1.1
FastAPI extension that provides JWT Auth support (secure, easy to use and lightweight)
Requires Python: >=3.7

<h1 align="left" style="margin-bottom: 20px; font-weight: 500; font-size: 50px; color: black;">
  ichi Auth
</h1>

A fork of [fastapi-jwt-auth]() with updated dependencies

---

**Documentation**: <a href="https://indominusbyte.github.io/fastapi-jwt-auth" target="_blank">https://indominusbyte.github.io/fastapi-jwt-auth</a>

**Source Code**: <a href="https://codeberg.org/ichi/ichi-auth" target="_blank">https://codeberg.org/ichi/ichi-auth</a>

---

## Features
FastAPI extension that provides JWT Auth support (secure, easy to use and lightweight), if you were familiar with flask-jwt-extended this extension suitable for you, cause this extension inspired by flask-jwt-extended 😀

- Access tokens and refresh tokens
- Freshness Tokens
- Revoking Tokens
- Support for WebSocket authorization
- Support for adding custom claims to JSON Web Tokens
- Storing tokens in cookies and CSRF protection

## Installation
The easiest way to start working with this extension with pip

```bash
pip install ichi-auth
```

If you want to use asymmetric (public/private) key signing algorithms, include the <b>asymmetric</b> extra requirements.
```bash
pip install 'ichi-auth[asymmetric]'
```

## License
This project is licensed under the terms of the MIT license.
httpsigpy 0.0.8
HTTP Message Signatures
Requires Python: >=3.8

# HTTP Message Signatures

This library implements HTTP Message Signatures. The underlying crypto is provided by PyCryptodomex.

Pypi Page: <https://pypi.org/project/httpsigpy/>

Usage:

``` python
from httpsig import *
```

## Signing

To sign an HTTP message, first it has to be parsed into its message components:

``` python
msg = event['body'].encode('utf-8')
components = parse_components(msg)
```

This provides a data structure with each possible message component indexed by its name, identifier, and value.

To create the signature input, pass in the parsed components structure as well as a list of components to sign, with the signature parameters:

``` python
siginput = generate_input(
    components, 
    ( # covered components list
        { 'id': "@method" }, 
        { 'id': "@authority" },
        { 'id': "@path" },
        { 'id': "content-digest" },
        { 'id': "content-length" },
        { 'id': "content-type" }
    ),
    {
        'created': 1618884473,
        'keyid': 'test-key-rsa-pss'
    }
)

base = siginput['signatureInput']
sigparams = siginput['signatureParams']
```

This outputs a `base` string that can be passed to the signer.

``` python
key = RSA.import_key(PKCS8.unwrap(PEM.decode(rsaTestKeyPssPrivate)[0])[1])

h = SHA512.new(base.encode('utf-8'))
signer = pss.new(key, mask_func=mgf512, salt_bytes=64)

signed = http_sfv.Item(signer.sign(h))
```

## Verify

To verify an HTTP message, first it has to be parsed into its message components:

``` python
msg = event['body'].encode('utf-8')
components = parse_components(msg)
```

This provides a data structure with each possible message component indexed by its name, identifier, and value.

To create the signature input, pass in the parsed components structure as well as a list of components to sign, and the signature parameters.

``` python
siginput = generate_input(
    components, 
    ( # covered components list
        { 'id': "@method" }, 
        { 'id': "@authority" },
        { 'id': "@path" },
        { 'id': "content-digest" },
        { 'id': "content-length" },
        { 'id': "content-type" }
    ),
    {
        'created': 1618884473,
        'keyid': 'test-key-rsa-pss'
    }
)
```

This can be passed to the verifier function:

``` python
h = SHA512.new(base.encode('utf-8'))

pubKey = RSA.import_key(rsaTestKeyPssPublic)
verifier = pss.new(pubKey, mask_func=mgf512, salt_bytes=64)

try:
    verified = verifier.verify(h, signed.value)
    print('> YES!')
except (ValueError, TypeError):
    print('> NO!')
```
aioduckdb 0.1.0
asyncio bridge to the standard sqlite3 module
Requires Python: >=3.6

aioduckdb\: DuckDB for AsyncIO
==============================

aioduckdb provides a friendly, async interface to DuckDB databases. It has been ported from the original aiosqlite module.

It replicates the ``duckdb`` module, but with async versions
of all the standard connection and cursor methods, plus context managers for
automatically closing connections and cursors::

    async with aioduckdb.connect(...) as db:
        await db.execute("INSERT INTO some_table ...")
        await db.commit()

        async with db.execute("SELECT * FROM some_table") as cursor:
            async for row in cursor:
                ...

It can also be used in the traditional, procedural manner::

    db = await aioduckdb.connect(...)
    cursor = await db.execute('SELECT * FROM some_table')
    row = await cursor.fetchone()
    rows = await cursor.fetchall()
    await cursor.close()
    await db.close()

Install
-------

aioduckdb is compatible with Python 3.6 and newer.
~~You can install it from PyPI:~~ Not currently on PyPI.


Details
-------

aioduckdb allows interaction with DuckDB databases on the main AsyncIO event
loop without blocking execution of other coroutines while waiting for queries
or data fetches.  It does this by using a single, shared thread per connection.
This thread executes all actions within a shared request queue to prevent
overlapping actions.

Connection objects are proxies to the real connections, contain the shared
execution thread, and provide context managers to handle automatically closing
connections.  Cursors are similarly proxies to the real cursors, and provide
async iterators to query results.


License
-------

aioduckdb is copyright Salvador Pardiñas, and licensed under the
MIT license.  I am providing code in this repository to you under an open source
license.  This is my personal repository; the license you receive to my code
is from me and not from my employer. See the `LICENSE`_ file for details.


Big thanks to `Amethyst Reese <https://noswap.com>`_ for the original `aiosqlite <https://github.com/omnilib/aiosqlite>`_ repository.
yaar 0.3.3
Yet Another Asyncio Requets

Yet Another Asyncio Requests

Install and usage are as expected. To install:

```sh
$ pip install yaar
```

And then the usage:

```python
import yaar

response = await yaar.get(url)
print(response.status, response.text)
print(response.json())


# send a json in the request body
response = await yaar.post(url, json={"some": "json"})
print(response.status)
```

To send headers in your request use:

```python
response = await yaar.get(url, headers={'Authentication': 'bearer} XYZ')
```

Here you have all usual the methods like ``put``, ``delete``, etc..

In case you need a custom session you can use:

```python
session = aiohttp.ClientSession(loop=loop)
response = await yaar.get(url, session=session)
```