semvec/pypi-packages huggingface dataset:
pyactuator 0.0.5
Thin broker-agnostic execution layer for trading: order submission, status, and fills
Requires Python: >=3.11
Keywords: trading, execution, broker, alpaca, order, finance

# pyactuator

Thin broker-agnostic execution layer for trading systems: submit orders, poll status, cancel, and (optionally) subscribe to fills. Designed to sit between your FSM/OMS (e.g. pystator) and broker APIs (Alpaca, future IB/crypto).

## Features

- **Normalized types**: `OrderRequest`, `OrderResponse`, `OrderStatus`, `Fill` — your stack stays broker-agnostic.
- **ExecutionClient protocol**: One interface (`submit`, `get_status`, `cancel`, optional `subscribe_fills`) implemented per broker.
- **Adapters**: Alpaca (via alpaca-py), Mock (in-memory for tests and paper).
- **Optional helpers**: Retry policy, idempotency key handling, timeout wrapper.

## Installation

```bash
# Core only (types, protocol, mock adapter)
pip install pyactuator

# With Alpaca broker support
pip install pyactuator[alpaca]

# Development
pip install -e ".[dev]"
```

## Quick start

```python
from decimal import Decimal
from pyactuator import ExecutionClient, OrderRequest, Side, OrderType, TimeInForce
from pyactuator.adapters.mock import MockExecutionClient

# Use mock for tests or paper
client: ExecutionClient = MockExecutionClient()

order = OrderRequest(
    client_order_id="my-order-001",
    symbol="AAPL",
    side=Side.BUY,
    quantity=Decimal("10"),
    order_type=OrderType.MARKET,
    time_in_force=TimeInForce.DAY,
)
response = await client.submit(order)
print(response.success, response.external_order_id)

status = await client.get_status(response.external_order_id)
await client.close()
```

With Alpaca (requires `pip install pyactuator[alpaca]`):

```python
from pyactuator.adapters.alpaca import AlpacaExecutionClient

client = AlpacaExecutionClient(
    api_key="...",
    api_secret="...",
    paper=True,
)
# Same OrderRequest / submit / get_status / cancel
```

Optional retry wrapper and idempotency helpers:

```python
from pyactuator.helpers import RetryExecutionClient, generate_client_order_id
from pyactuator.adapters.alpaca import AlpacaExecutionClient

client = AlpacaExecutionClient(api_key="...", api_secret="...", paper=True)
client = RetryExecutionClient(client, max_attempts=3)
order_id = generate_client_order_id(prefix="pa", order_id="my-internal-id")
order = OrderRequest(client_order_id=order_id, symbol="AAPL", side=Side.BUY, quantity=Decimal("10"), ...)
```

## Integration with pystator

Your FSM or OrderManager receives an `ExecutionClient` (injected or constructed). When the FSM triggers "submit" (e.g. after risk approval via pyfortis), call `await client.submit(order_request)`. pystator stays broker-agnostic; execution is behind this single interface.

## License

MIT.
locisimiles 1.1.0
LociSimiles is a Python package for finding intertextual links in Latin literature using pre-trained language models.
Requires Python: <3.14,>=3.10

# Loci Similes

**LociSimiles** is a Python package for finding intertextual links in Latin literature using pre-trained language models.

## Basic Usage

```python

# Load example query and source documents
query_doc = Document("../data/hieronymus_samples.csv")
source_doc = Document("../data/vergil_samples.csv")

# Load the pipeline with pre-trained models
pipeline = ClassificationPipelineWithCandidategeneration(
    classification_name="...",
    embedding_model_name="...",
    device="cpu",
)

# Run the pipeline with the query and source documents
results = pipeline.run(
    query=query_doc,    # Query document
    source=source_doc,  # Source document
    top_k=3             # Number of top similar candidates to classify
)

pretty_print(results)

# Save results to CSV or JSON
pipeline.to_csv("results.csv")
pipeline.to_json("results.json")
```

## Command-Line Interface

LociSimiles provides a command-line tool for running the pipeline directly from the terminal:

### Basic Usage

```bash
locisimiles query.csv source.csv -o results.csv
```

### Advanced Usage

```bash
locisimiles query.csv source.csv -o results.csv \
  --classification-model julian-schelb/PhilBerta-class-latin-intertext-v1 \
  --embedding-model julian-schelb/SPhilBerta-emb-lat-intertext-v1 \
  --top-k 20 \
  --threshold 0.7 \
  --device cuda \
  --verbose
```

### Options

- **Input/Output:**
  - `query`: Path to query document CSV file (columns: `seg_id`, `text`)
  - `source`: Path to source document CSV file (columns: `seg_id`, `text`)
  - `-o, --output`: Path to output CSV file for results (required)

- **Models:**
  - `--classification-model`: HuggingFace model for classification (default: PhilBerta-class-latin-intertext-v1)
  - `--embedding-model`: HuggingFace model for embeddings (default: SPhilBerta-emb-lat-intertext-v1)

- **Pipeline Parameters:**
  - `-k, --top-k`: Number of top candidates to retrieve per query segment (default: 10)
  - `-t, --threshold`: Classification probability threshold for filtering results (default: 0.5)

- **Device:**
  - `--device`: Choose `auto`, `cuda`, `mps`, or `cpu` (default: auto-detect)

- **Other:**
  - `-v, --verbose`: Enable detailed progress output
  - `-h, --help`: Show help message

### Output Format

The CLI saves results to a CSV file with the following columns:
- `query_id`: Query segment identifier
- `query_text`: Query text content
- `source_id`: Source segment identifier
- `source_text`: Source text content
- `similarity`: Cosine similarity score (0-1)
- `probability`: Classification confidence (0-1)
- `above_threshold`: "Yes" if probability ≥ threshold, otherwise "No"


## Optional Gradio GUI

Install the optional GUI extra to experiment with a minimal Gradio front end:

```bash
pip install locisimiles[gui]
```

Launch the interface from the command line:

```bash
locisimiles-gui
```
stanley-shield 1.0.0
Multi-Tenant Cryptographic Audit Logger with Regional Data Residency
Requires Python: >=3.8

# 🛡️ Stanley Shield Python SDK
The official 2026 Python Gatekeeper for the Stanley Shield Bunker. This SDK provides cryptographic audit logging with native support for Regional Data Residency.


### Install the pre-built wheel:
```bash
pip install stanley_shield-1.0.0-py3-none-any.whl

```

## 🔐 Onboarding & Setup
To use the Shield, you must authenticate your server using the Infisical Machine Identity credentials provided by your Stanley Shield administrator.

### 1. Requirements
- Install the Infisical CLI: ``` bash brew install infisical/get-cli/infisical ``` [MacOS] or follow the [official guide](https://infisical.com/docs/cli/overview).

- Obtain your Credentials Pack:

  - INFISICAL_MACHINE_ID

  - INFISICAL_MACHINE_SECRET

  - INFISICAL_PROJECT_ID

  - STANLEY_BUNKER_URL

### 2. Authentication & Execution
Run these commands in your terminal to link your environment to the Bunker. This ensures your STANLEY_HMAC_SECRET is injected directly into memory and never stored on disk.

#### Step A: Authenticate your session
```bash
export INFISICAL_TOKEN=$(infisical login --method=universal-auth \
  --client-id=YOUR_MACHINE_ID \
  --client-secret=YOUR_MACHINE_SECRET \
  --silent --plain)
```
#### Step B: Run your app with injected secrets
```bash
infisical run --path=/apps/fintech-api --env=prod --projectId=YOUR_PROJECT_ID -- python3 main.py
```

# Basic Usage
### Basic Initialization
Once the app is running via the infisical run command, the SDK will automatically detect your configuration.
```bash
Python code 

from stanley_shield import Gatekeeper

# Automatically pulls STANLEY_HMAC_SECRET and STANLEY_CLIENT_ID from Infisical
gk = Gatekeeper(bunker_url="https://bunker.yourdomain.com")

# Log an event
gk.log(
    actor_id="user_99",
    action="CREDIT_CARD_LINKED",
    resource="card_8822",
    residency="NG_LOCAL",  # Routes to Nigerian infrastructure
    metadata={"bank": "GTBank", "currency": "NGN"}
)
```

## Security Features

- HMAC-SHA256 Signing: Every request is signed. The Bunker rejects any payload that has been tampered with in transit.

- Non-Blocking Transporter: Logging happens in a background daemon thread. Your application's performance is never affected by network latency.

- Replay Protection: Includes a 60-second window timestamp to prevent old requests from being re-sent.

## Data Residency Support
- GLOBAL: Default storage in the Global Vault.

- NG_LOCAL: Routes logs to the localized Nigerian infrastructure.
gcl-sdk 2.0.0
The Genesis Core SDK

![Tests workflow](https://github.com/infraguys/gcl_sdk/actions/workflows/tests.yaml/badge.svg)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gcl-sdk)
![PyPI - Downloads](https://img.shields.io/pypi/dm/gcl-sdk)

Welcome to the Genesis SDK!

The Genesis SDK is a set of tools for developing Genesis elements. Main information you can find in the [wiki](https://github.com/infraguys/gcl_sdk/wiki).


# 🚀 Development

Install required packages:

Ubuntu:
```bash
sudo apt-get install tox libev-dev
```

Fedora:
```bash
sudo dnf install python3-tox libev-devel
```

Initialize virtual environment:

```bash
tox -e develop
source .tox/develop/bin/activate
```

# ⚙️ Tests

**NOTE:** Python version 3.12 is supposed to be used, but you can use other versions

Unit tests:

```bash
tox -e py312
```

Functional tests:

```bash
tox -e py312-functional
```


# 🔗 Related projects

- Genesis Core is main project of the Genesis ecosystem. You can find it [here](https://github.com/infraguys/genesis_core).
- Genesis DevTools it's a set oftools to manager life cycle of genesis projects. You can find it [here](https://github.com/infraguys/genesis_devtools).



# 💡 Contributing

Contributing to the project is highly appreciated! However, some rules should be followed for successful inclusion of new changes in the project:
- All changes should be done in a separate branch.
- Changes should include not only new functionality or bug fixes, but also tests for the new code.
- After the changes are completed and **tested**, a Pull Request should be created with a clear description of the new functionality. And add one of the project maintainers as a reviewer.
- Changes can be merged only after receiving an approve from one of the project maintainers.
buildai-sdk 2.1.0
Build AI Python SDK
Requires Python: >=3.10

# BuildAI Python SDK

Python client for Build AI services.

## Install

```bash
cd sdk
uv pip install -e .
```

## Quick Start

```python
import buildai

client = buildai.Client(api_key="bai_...")

# Search
hits = client.search("person welding")
for h in hits.items:
    print(h.clip_id, h.similarity_score)

# Browse
factories = client.factories.list()
clip = client.clips.get("clip-uuid")

# Collections
col = client.collections.create(name="my-set")
client.collections.clips_add(col.collection_id, clip_ids=["..."])

# Datasets
datasets = client.datasets.list()
urls = client.datasets.webdataset_urls("dataset-name")

client.close()
```

## Package Layout

- `buildai/client.py` — Client entry point
- `buildai/resources/v1/` — Resource namespaces
- `buildai/models/v1/` — Response models
- `buildai/ids.py` — Deterministic UUID helpers