semvec/pypi-packages huggingface dataset:
trading212-api-py 0.1.9
A Python client for the Trading212 API.
Requires Python: >=3.9

# trading212-api-py

Python client for Trading212 API.

Creating a client:

```python
from trading212 import client

t212 = client.Client("TOKEN", demo=True)
```

Once a client is created, you can use it to interact with the Trading212 API using the methods below. See the tests package for more examples. Omit the
`demo` parameter (or set it to `False`) to use a live account.

See the [documentation](https://github.com/clincha/trading212-api-py/tree/main/documentation) folder for details on the API methods and their parameters. Included in the folder are sample responses for each method, which can be used to understand the expected structure of the data returned by the API.

## Implementation status

| API                  | Status | Notes            |
|----------------------|--------|------------------|
| Instruments Metadata | ✅      | Completed v0.0.4 |
| Pies                 | ✅      | Completed v0.0.4 |
| Equity Orders        | ❌      | Estimated v1.0.0 |
| Account Data         | ✅      | Completed v0.0.4 |
| Personal Portfolio   | ✅      | Completed v0.1.0 |
| Historical items     | ❌      | Estimated v0.2.0 |
aiguardrail 0.1.0
Guardrails for evaluating AI-generated content
Requires Python: >=3.7

# AIGuardrail: AI Content Guardrails

**AIGuardrail** is a comprehensive Python library designed to evaluate and safeguard AI-generated content. It provides robust checks for safety, factual consistency, readability, privacy, token efficiency, and protection against malicious content.

---

## 🚀 Features

- **Output Moderation**: Detect toxic, offensive, or inappropriate language.
- **Factual Consistency & Hallucination Detection**: Prevent AI-generated inaccuracies or hallucinated information.
- **PII Redaction**: Identify and flag personally identifiable information (PII).
- **Prompt Injection Protection**: Detect potential prompt injection attacks.
- **Token Management**: Optimize content length based on token limits.
- **Response Quality Checks**: Evaluate readability, verbosity, and bias in AI outputs.

---

## 📦 Installation

Install `aiguardrail` via pip:

```bash
pip install aiguardrail
```

## 🛠️ Usage
Evaluate text quickly against all available guardrails:

```python
from aiguardrail.guardrails import evaluate_guardrails

text = "According to the source, this event took place in March."

results_df, final_score = evaluate_guardrails(text)

print(results_df)
print(f"Overall Guardrail Score: {final_score}")

```

## Evaluate specific guardrails only:

```python
specific_guardrails = ["GR-S-001", "GR-Q-005", "GR-C-002"]

results_df, final_score = evaluate_guardrails(text, selected_guardrail_ids=specific_guardrails)

print(results_df)
print(f"Overall Guardrail Score: {final_score}")

```

## 📚 Available Guardrails
Retrieve metadata about all guardrails easily:

```python
from aiguardrail.guardrails import list_available_guardrails

guardrails = list_available_guardrails()
for gr in guardrails:
    print(f"{gr['id']} - {gr['name']} [{gr['area']}]")

```

Example output:
```css
GR-S-001 - Output Moderation [Security]
GR-Q-001 - Hallucination Detection [Quality]
GR-S-005 - PII Redaction [Security]
...

```


## 📜 License
Guardrails-Eval is licensed under the MIT License. See LICENSE for details.

## ‍💻 Author
### SHUBHAM GANESH MHASKE

### Email: mhaskeshubham1200@gmail.com



⭐ Enjoy using aiguardrail !