semvec/pypi-packages huggingface dataset:
oidc-auth-client 0.1.8
Pure python implementation of an OIDC client
Requires Python: >=3.13

# oidc-auth-client

[![Build and Publish](https://github.com/norwegian-geotechnical-institute/oidc-auth-client/actions/workflows/release.yaml/badge.svg)](https://github.com/norwegian-geotechnical-institute/oidc-auth-client/actions/workflows/release.yaml)

Pure python implementation of an [OIDC](https://auth0.com/docs/authenticate/protocols/openid-connect-protocol) client

Dependencies:

- [httpx](https://www.python-httpx.org/)

## Installing

`pip install oidc-auth-client`

## Example usage

### Authorization Code Flow

Use this flow when your application needs to **authenticate a real user**.

It will:

1. Open the user’s browser
2. Redirect them to your identity provider’s login page
3. Wait for the user to authenticate
4. Receive an authorization code
5. Exchange it for an access token

Best for CLIs, desktop apps, and tools acting **on behalf of a user**.

```py
from oidc_auth_client import Config, AuthorizationCode, OidcProvider

config = Config(
    client_id="<your-client-id>",
    oidc_provider=OidcProvider(
        openid_configuration_url="<auth-provider-url>/.well-known/openid-configuration"
    )
)

# Sign in with the identity provider in the opened browser!
access_token = AuthorizationCode(config=config).get_token()
```

### Client Credentials Flow

Use this flow when your application needs to authenticate **as itself, without user interaction**.
The client exchanges its own `client_id` and `client_secret` directly for an access token.

Ideal for:

- Backend services
- Server-to-server APIs
- Cron jobs
- Automated tasks

```py
from oidc_auth_client import ClientCredentials, OidcProvider, TokenCache
from oidc_auth_client.client_credentials import ClientCredentialsConfig

config = ClientCredentialsConfig(
    client_id=CLIENT_ID,
    client_secret=CLIENT_SECRET,
    oidc_provider=OidcProvider(openid_configuration_url=OPENID_CONFIGURATION_URL),
)

access_token = ClientCredentials(config=config).get_token()
```

#### Token caching between runs

To allow the user to cache the token between usages, configure with a `TokenCache`. Will store the token in plaintext on the users system.

```py
from oidc_auth_client import Config, TokenCache

config = Config(
    # ...
    token_cache=TokenCache(),
)
```

see some example usage in the [examples folder](https://github.com/norwegian-geotechnical-institute/oidc-auth-client/tree/main/examples).

## Contributing

Requirements:

- [uv](https://docs.astral.sh/uv/) ^0.7.22

Setup:

```sh
uv sync
```

Run tests:

```sh
uv run pytest .
```
libretto 0.2.1
A Simple task runner for pyproject.toml, written in Rust.
Requires Python: >=3.9

# Libretto
A Simple task runner for pyproject.toml, written in Rust.

## Install
```bash
uv tool install libretto
```

## Configuration

Libretto can be configured in the `[tool.libretto]` section of your `pyproject.toml` file.

### `venv`

Specifies the path to the virtual environment to use when running tasks.

```toml
[tool.libretto]
venv = ".venv"
```

## Example
```toml
[tool.libretto]
venv = ".venv"

[tool.libretto.tasks]
hello = "echo Hello, World!"
```

## Usage

Libretto reads tasks from the `pyproject.toml` file in the current directory. Tasks are defined in the `[tool.libretto.tasks]` section.

To run a task, use the `libretto` command followed by the task name:

```bash
libretto <task_name>

# can execute with uv-task
uv-task <task_name>
```

For example, to run the `hello` task from the example above:

```bash
libretto hello
```

This will output:

```
Hello, World!
```

### Passing Additional Arguments

You can pass additional arguments to your tasks. For example, if you have a task defined as:

```toml
[tool.libretto.tasks]
greet = "echo Hello"
```

You can run it with an additional argument:

```bash
libretto greet -- John
```

This will output:

```
Hello John
```

### Command Lists

You can also define a list of commands for a single task. Libretto will execute them in order.

```toml
[tool.libretto.tasks]
build = [
    "echo Building...",
    "py -m build"
]
```

Running `libretto build` will execute both commands.

### Platform-Specific Commands

You can define platform-specific commands by using a list of tables. list of available platforms is [here](https://doc.rust-lang.org/std/env/consts/constant.OS.html).

```toml
[tool.libretto.tasks]
test = [
    { cmd = "rm --rf dist", platforms = ["linux", "macos"] },
    { cmd = "rmdir /s /q dist", platforms = ["windows"] }
]
```

Libretto will only execute the command that matches the current platform.
flask-wiki 1.0.4
Simple file-based wiki for Flask
Requires Python: <3.13,>=3.9.2

# Flask-Wiki

## About

Simple file based wiki for Flask.

## Getting started

### Requirements

* Python >=3.9.2,<3.13
* [uv](https://docs.astral.sh/uv/)

### Install dev environment

- Clone the git repository
- run `uv sync --frozen`
- `cd examples`
- `uv run flask flask_wiki init-index`
- `uv run flask flask_wiki index`
- then `uv run flask run --debug`
- go to http://localhost:5000/help

## Configuration

### Templates

- WIKI_BASE_TEMPLATE = 'wiki/base.html'
- WIKI_SEARCH_TEMPLATE = 'wiki/search.html'
- WIKI_NOT_FOUND_TEMPLATE = 'wiki/404.html'
- WIKI_FORBIDDEN_TEMPLATE = 'wiki/403.html'
- WIKI_EDITOR_TEMPLATE = 'wiki/editor.html'
- WIKI_FILES_TEMPLATE = 'wiki/files.html'
- WIKI_PAGE_TEMPLATE = 'wiki/page.html'

### Miscs

- WIKI_HOME = 'home'
- WIKI_CURRENT_LANGUAGE = lambda: 'en'
- WIKI_LANGUAGES = {'en': 'English', 'fr': 'French', 'de': 'German', 'it': 'Italian'}
- WIKI_URL_PREFIX = '/help'
- WIKI_CONTENT_DIR = './data'
- WIKI_INDEX_DIR = './index'
- WIKI_UPLOAD_FOLDER = os.path.join(WIKI_CONTENT_DIR, 'files')
- WIKI_ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif', 'svg'}
- WIKI_MARKDOWN_EXTENSIONS = set(('codehilite', 'fenced_code'))

### Permissions

- WIKI_EDIT_VIEW_PERMISSION = lambda: True
- WIKI_READ_VIEW_PERMISSION = lambda: True
- WIKI_EDIT_UI_PERMISSION = WIKI_EDIT_VIEW_PERMISSION
- WIKI_READ_UI_PERMISSION = WIKI_READ_VIEW_PERMISSION