semvec/pypi-packages huggingface dataset:
politician-trade-score 2025.1.4
Score stocks based on US politician trade disclosures (Capitol Trades).
License: MIT
Requires Python: >=3.9

# politician-trade-score

Score stocks based on US politician trade disclosures (Capitol Trades).

This tool scrapes public politician trade data and computes a score for each ticker based on buy/sell activity and recency, helping identify potential signals.

---

## Installation

```bash
pip install politician-trade-score
```

### Install (editable)

```bash
pip install -e .
```

### On Windows PowerShell

If PowerShell blocks virtual-environment activation, use this one-time PATH update to point `pip` and `poltrade` to your venv:

```powershell
# from your project root
py -3.13 -m venv .venv
$env:Path = "$PWD\.venv\Scripts;$env:Path"
where python
where pip
pip install politician-trade-score
```

Then run the CLI.

## CLI usage

Fetch recent trades and score tickers:

```bash
poltrade --tickers AAPL TSLA --pages 50 --hold-length 180 --buy-weight 0.8 --details
```

- `--tickers` - One or more tickers.
- `--pages` - Number of pages to fetch from Capitol Trades (default 303 in the original).
- `--hold-length` - Lookback window in days for the date filter (default 180 in the original).
- `--buy-weight` - Weight on buy-ratio in final score. Recency weight is `1 - buy-weight`.
- `--details` - Print the intermediate details shown by the original script.

You can also pass explicit start and end dates (YYYY-MM-DD) instead of `--hold-length`:

```bash
poltrade --tickers NVDA --start-date 2025-06-01 --end-date 2025-09-01
```

## Library usage

```python
from politician_trade_score.data import gather_data
from politician_trade_score.score import PoliticianTradeScorer

data = gather_data()
scorer = PoliticianTradeScorer(buy_ratio_weight=0.8, recency_weight=0.2)
score = scorer.final_score(data, "AAPL", details=True, tutorial=True)
```

## Notes

- The `gather_data` function relies on `pandas.read_html` to scrape `capitoltrades.com` pages.
typequest 1.0.3
Interactive CLI for learning backend development with SQL, Python, and Django
License: MIT
Requires Python: >=3.8

# TypeQuest

Interactive CLI for learning backend development with SQL, Python, and Django.

## Installation

```bash
pip install typequest
```

## Usage

```bash
typequest
```

Or use the short alias:

```bash
tq
```

## Features

- **SQL Playground**: Practice SQL queries with real datasets
- **Python Playground**: Execute Python code interactively
- **Django Lessons**: Learn Django from basics to advanced
- **Progress Tracking**: Track your learning journey
- **Gamification**: Earn XP, achievements, and compete on leaderboards

## Commands

```bash
typequest              # Launch interactive CLI
typequest --help       # Show help
typequest --version    # Show version
typequest --diagnose   # Run diagnostics
typequest --update     # Check for updates
```

## Learning Tracks

### SQL Track
- Introduction to Databases
- SELECT Statements
- Filtering and Sorting
- JOIN Operations
- Aggregate Functions
- Subqueries
- Data Manipulation
- Database Design
- Advanced Queries
- Performance Optimization

### Python Track
- Python Basics
- Data Types
- Control Flow
- Functions
- Object-Oriented Programming
- Decorators
- And more...

### Django Track
- Django Introduction
- Models
- Views (Function & Class-Based)
- Templates
- Forms
- Authentication
- REST APIs
- Async Views

## Requirements

- Python 3.8+

## License

MIT

## Links

- Website: https://typequest.dev
- Documentation: https://docs.typequest.dev
- Issues: https://github.com/typequest-dev/typequest/issues