semvec/pypi-packages huggingface dataset:
django-durable 0.1.1
Durable execution framework for Django web apps.
Requires Python: >=3.13

# Django Durable

Durable execution framework for Django web apps.

Workflows are ordinary Python functions using `ctx.activity()` and `ctx.sleep()`. On each step, we replay from the start and use the **event log** (`HistoryEvent`) to return prior results. Avoid non-deterministic branching not derived from previous results or inputs.

Activity and workflow results must be JSON-serializable.


# Commands

```bash
python manage.py durable_start onboard_user --input '{"user_id": 7}'
```

```bash
python manage.py durable_worker --batch 20 --tick 0.2
```

## Signals

- In code, a workflow can wait for signals using `ctx.wait_signal("signal_name")`, which pauses execution until a matching signal arrives and returns its payload.
- To send a signal from outside code:

```bash
python manage.py durable_signal <execution_uuid> user_clicked --input '{"clicked": true}'
```

You can also send a signal programmatically:

```python
from django_durable.engine import send_signal
send_signal(execution_id, "user_clicked", {"clicked": True})
```

## Cancellation

- Cancel a workflow via CLI:

```bash
python manage.py durable_cancel <execution_uuid> --reason "user requested" [--keep-queued]
```

- In code:

```python
from django_durable.engine import cancel_workflow
cancel_workflow(execution_id, reason="user requested")
```

Cancellation moves the workflow to CANCELED and, by default, marks queued activities as failed so workers will not run them.
pickpy 0.1.1
Lightweight terminal menu library with TTY fallback and safe output
Requires Python: >=3.10
Keywords: terminal, menu, tty, console, ansi

# pickpy: Lightweight Terminal Menus for Python

![License Badge](https://img.shields.io/badge/license-MIT-blue.svg)
![Python Version](https://img.shields.io/badge/python-%3E=3.10-green.svg)

## 📝 Usage example
Here's a quick example to spark your imagination:
```python
from pickpy.menu import TerminalMenu

options = ["Start Game", "Options", "Exit"]
menu = TerminalMenu()

choice = menu.select_option(
    options, 
    header="Pickpy Demo: Use arrow keys to navigate and press Enter"
)

match choice:
    case "Start Game":
        print("Starting game... (demo)")
    case "Options":
        print("Opening options...")
    case "Exit":
        print("Exiting...")
```

<img src="images/pickpy.gif" loop=infinite />


---

Are you tired of clunky, hard-to-use terminal menus? Want to build sleek, interactive command-line interfaces with minimal effort? Look no further — **pickpy** is here to revolutionize how you create terminal menus in Python!

## 🎨 Custom colors
You can customize colors easily using ANSI strings or the built-in BColors enum:
```python
from pickpy.menu import TerminalMenu
from pickpy.terminal import BColors

menu = TerminalMenu()

# Interactive menu with custom colors
choice = menu.select_option(
    ["Start", "Options", "Exit"],
    header="Custom Colors Demo",
    header_color=BColors.OKBLUE,
    selected_color=BColors.WARNING,
    unselected_color=BColors.OKGREEN,
)

# Fallback (non-TTY) also supports custom colors via get_choice
choice = menu.get_choice(
    ["Red", "Green", "Blue"],
    header="Pick a color:",
    header_color=BColors.WARNING,
    option_color=BColors.OKGREEN,
)

# Customize input prompt color
match choice:
    case "Red":
        menu.terminal.safe_print("You picked Red!", color=BColors.FAIL)
    case "Green":
        menu.terminal.safe_print("You picked Green!", color=BColors.OKGREEN)
    case "Blue":
        menu.terminal.safe_print("You picked Blue!", color=BColors.OKBLUE)
```
![pickpy_colors.gif](images/pickpy_colors.gif)


## 🚀 Why choose pickpy?

- **Lightweight & Easy to Use:** Designed for simplicity, perfect for quick prototyping or production use.
- **Flexible & Customizable:** Supports color, navigation via arrow keys, and safe terminal handling – all out of the box.
- **Cross-Platform Compatibility:** Works smoothly on Windows, macOS, and Linux.
- **Extensible & Modular:** Built with best practices to allow easy future enhancements.

## 🎯 What can you do with pickpy?

- Build interactive menus with arrow key navigation
- Present choices with color themes and style
- Support non-interactive environments gracefully
- Easily extend or embed into your scripts or tools

## 📦 Installation

Getting started is a snap:

```bash
pip install pickpy
```
apc-switched-rack-pdu-control-panel 0.2.4
APC switched rack PDU control panel
Requires Python: >=3.10

## APC Switched Rack PDU Control Panel
A Python/Flask based reimplementation of [disisto's Control Panel](https://github.com/disisto/apc-switched-rack-pdu-control-panel) to control multiple APC Switched Rack PDUs via SNMPv3. A single panel to switch (on, off, restart) the attached devices between different states.

![](https://github.com/spike77453/apc-switched-rack-pdu-control-panel/blob/python/img/0_apc_pdu_control_panel.gif?raw=true)

Check https://github.com/disisto/apc-switched-rack-pdu-control-panel/wiki for details on how to configure the PDU

---

## Requirements
+ APC Switched Rack PDU(s) with enabled SNMPv3 
  * Tested with APC Switched Rack PDU [AP7920](https://www.apc.com/shop/my/en/products/Rack-PDU-Switched-1U-12A-208V-10A-230V-8-C13/P-AP7920) and [AP7921](https://www.apc.com/shop/my/en/products/Rack-PDU-Switched-1U-12A-208V-10A-230V-8-C13/P-AP7921) on EOL firmware `v3.9.2`
  * Tested with APC Switched Rack PDU [AP7920B](https://www.apc.com/shop/my/en/products/Rack-PDU-Switched-1U-12A-208V-10A-230V-8-C13/P-AP7920B) on latest firmware `v6.5.6`

---

## Quick Install

### Run locally
```
pip install apc_switched_rack_pdu_control_panel
curl -o config.py https://raw.githubusercontent.com/spike77453/apc-switched-rack-pdu-control-panel/python/instance/config.py.example
APC_PDU_SETTINGS=/absolute/path/to/config.py flask --app apc_switched_rack_pdu_control_panel run
```

### Run as WSGI app
```
pip install apc_switched_rack_pdu_control_panel
curl -o config.py https://raw.githubusercontent.com/spike77453/apc-switched-rack-pdu-control-panel/python/instance/config.py.example
APC_PDU_SETTINGS=/absolute/path/to/config.py gunicorn 'apc_switched_rack_pdu_control_panel:app'
```

### Supplying configuration data via flask instance folder

Alternatively, loading configuration settings from a [flask instance folder](https://flask.palletsprojects.com/en/3.0.x/config/#instance-folders) is supported as well:

```
mkdir -p $PREFIX/var/apc_switched_rack_pdu_control_panel-instance
cd $PREFIX/var/apc_switched_rack_pdu_control_panel-instance
curl -o config.py https://raw.githubusercontent.com/spike77453/apc-switched-rack-pdu-control-panel/python/instance/config.py.example
```

In an activated [virtualenv](https://virtualenv.pypa.io/en/latest/) `$PREFIX` is equivalent to `$VIRTUAL_ENV`.  
Configuration settings supplied via an instance folder always take precedence over configuration data supplied via the `APC_PDU_SETTINGS` environment variable.

---
This project is not affiliated with [APC by Schneider Electric](https://www.apc.com/).  
All mentioned trademarks are the property of their respective owners.
nsa-fusion 1.4.2
API-wrapper pour récupérer des données liées à Nation
Requires Python: >=3.10

# ~~NSA~~ Fusion :fire:

## Pré-requis

- Python 3.10 ou + (Python 3.13 si possible)
- Deux barres de Twix ou une tasse de thé

> :tongue: Plus besoin de serveur distant


## Avant de démarrer

Dans la documentation, vous croiserez souvent des noms de classes comme `.User` ou autres similaires. Le «.» devant le nom de la classe signfie qu'elle appartient au module Fusion, et qu'il faut donc les interprêter comme `nsarchive.User`. La seule exception est `NSID` qui ne sera pas précédé d'un point mais devra être interprêté de la même manière.


## Installation

L'installation de Fusion se fait via pip:

```sh
pip install nsa-fusion
```

La dernière version de nsarchive devrait s'installer. La seule dépendance requise pour Fusion est `pillow` mais celle-ci devrait s'installer en même temps que le module. Vous pourriez également avoir besoin des modules `bcrypt` et `python-dotenv`, ceux-ci devront être installés manuellement.


### Bonus: Environnement virtuel

Il est recommandé mais non obligatoire d'avoir un environnement virtuel (venv) pour votre projet. Sa création se fait comme ceci:

```sh
python -m venv .venv
```

N'oubliez pas de l'activer via cette commande pour powershell...

```ps1
.venv\Scripts\Activate
```

...ou cette commande pour les terminaux type UNIX (Bash par exemple)

```sh
source .venv/bin/activate
```

## Prise en main

### Identifier les objets

Les objets sont tous identifiables sur NSAv3. Ils ont un identifiant commun appelé NSID (`from nsarchive import NSID`). Cet identifiant n'est rien de plus qu'un nombre hexadécimal. Il peut être utilisé comme un string, dans un print ou un f-string par exemple. Cet identifiant est communément basé sur plusieurs valeurs fixes ou universelles, dont les deux plus fréquentes sont:
- L'ID Discord de l'objet concerné, dans le cas d'un utilisateur par exemple
- Le timestamp (secondes depuis 1970) du moment où il a été créé, dans le cas de la plupart des autres objets


### Interfaces

Le module nsarchive est divisé en **4 interfaces**:
- **Entités** (membres, groupes, positions)
- **Économie** (comptes en banque, dettes)
- **Justice** (signalements, procès, sanctions)
- **État** (votes, élections)

> Les interfaces État et Justice peuvent être confondues et désignées comme République, comme c'était le cas dans les anciennes version de NSArchive.


Les interfaces ont toutes trois rôles en commun:
- Récupérer des objets
- Créer des objets
- Supprimer des objets (Entités uniquement)