semvec/pypi-packages huggingface dataset:
pip-check-safety 1.0.1
Scan pip packages for security risks before and after installation
Requires Python: >=3.8
Keywords: security, pip, package, safety, malware, scanner, audit

# pip-check-safety

Scan pip packages for security risks before and after installation.

## Features

- **Pre-installation checks**: Scan packages before you install them
- **Typosquatting detection**: Catch packages trying to impersonate popular libraries
- **Code scanning**: Detect suspicious patterns like crypto miners, data exfiltration, obfuscation
- **Environment audits**: Scan all your installed packages at once
- **Requirements scanning**: Check your requirements.txt before deployment

## Installation

```bash
pip install pip-check-safety
```

## Usage

### Check a package before installing

```bash
pip-check requests
```

### Deep scan (downloads and analyzes source code)

```bash
pip-check --deep some-package
```

### Audit all installed packages

```bash
pip-check --audit
```

### Check a requirements file

```bash
pip-check -r requirements.txt
```

### JSON output for CI/CD

```bash
pip-check --json requests
pip-check --audit --json
```

## What it checks

### PyPI Metadata
- Package age (brand new packages are higher risk)
- Download count (low downloads = less community vetting)
- Author information
- Source repository presence

### Typosquatting
- Levenshtein distance to popular packages
- Common character swaps (0/o, 1/l, rn/m)
- Hyphen/underscore variations
- Suspicious suffixes (-official, -secure, etc.)

### Code Patterns (deep scan)
- Dynamic code execution (exec, eval)
- Network exfiltration (socket connections, HTTP requests)
- Obfuscation (base64, marshal, ROT encoding)
- System access (subprocess, os.system)
- Credential theft patterns
- Crypto mining indicators
- Persistence mechanisms

## Exit Codes

- `0` - No issues or low risk only
- `1` - Medium risk findings
- `2` - High risk findings
- `3` - Critical risk findings

Use exit codes in CI/CD pipelines:

```bash
pip-check --audit
if [ $? -ge 2 ]; then
    echo "High-risk packages detected!"
    exit 1
fi
```

## Python API

```python
from pip_check import PyPIChecker, TyposquatDetector, CodeScanner, EnvironmentAuditor

# Check a single package
checker = PyPIChecker()
report = checker.check("requests")
report.print_report()

# Detect typosquatting
detector = TyposquatDetector()
report = detector.check("reqeusts")  # typo
print(report.findings)

# Scan installed package code
scanner = CodeScanner()
report = scanner.scan_installed("some-package")

# Audit entire environment
auditor = EnvironmentAuditor(deep_scan=True)
reports = auditor.audit_all()
auditor.print_summary(reports)
```

## Support

If this tool helped you, consider supporting:

[![Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/brody4321)

[![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-support-yellow?logo=buymeacoffee)](https://buymeacoffee.com/brody4321)

## License

MIT
gtfs4ev 0.2.1
A Python framework for simulating electric bus operations and charging demand using GTFS data
Requires Python: >=3.12

GTFS4EV is an open-source Python tool for planning public bus electrification using GTFS data. It provides a modular workflow that includes GTFS data pre-processing, fleet operation simulation, and scenario-based charging. Additional features include GTFS data filtering, PV integration potential, ex-post impact analysis, flexible charging strategies, spatial visualization, and dual usage as a CLI or Python library. For more information and examples, see the [GTFS4EV GitHub repository](https://github.com/gtfs4ev/gtfs4ev).
shevchenko 1.0.0
Python library for declension of Ukrainian anthroponyms
Requires Python: >=3.6

# shevchenko-python

Python library for declension of Ukrainian anthroponyms. Port of [shevchenko.js](https://github.com/tooleks/shevchenko-js).

## Installation

```bash
pip install shevchenko
```

## Usage

```python
from shevchenko import in_nominative, in_genitive, in_dative, in_accusative, in_ablative, in_locative, in_vocative, GrammaticalGender

input_data = {
    'gender': GrammaticalGender.MASCULINE,
    'givenName': 'Тарас',
    'patronymicName': 'Григорович',
    'familyName': 'Шевченко'
}

# Nominative: Тарас Григорович Шевченко
print(in_nominative(input_data))

# Genitive: Тараса Григоровича Шевченка
print(in_genitive(input_data))

# Dative: Тарасу Григоровичу Шевченку
print(in_dative(input_data))

# Accusative: Тараса Григоровича Шевченка
print(in_accusative(input_data))

# Ablative: Тарасом Григоровичем Шевченком
print(in_ablative(input_data))

# Locative: Тарасові Григоровичу Шевченку
print(in_locative(input_data))

# Vocative: Тарасе Григоровичу Шевченку
print(in_vocative(input_data))
```

## Using Extensions

You can extend the library to support declension of additional fields. For example, to declin military ranks and appointments using the `shevchenko-ext-military` extension:

```python
from shevchenko import inflect, GrammaticalCase
from shevchenko.extension import register_extension
from shevchenko_ext_military import military_extension

# Register the military extension
register_extension(military_extension)

input_data = {
    'gender': 'masculine',
    'givenName': 'Тарас',
    'familyName': 'Шевченко',
    'militaryRank': 'Генерал-майор',
    'militaryAppointment': 'Командир'
}

# Inflect including the custom fields
result = inflect(input_data, GrammaticalCase.DATIVE)

print(f"{result['militaryRank']} {result['militaryAppointment']} {result['givenName']} {result['familyName']}")
# Output: Генерал-майору Командиру Тарасу Шевченку
```

## Features

- Declension of given names, patronymic names, and family names.
- Auto-detection of grammatical gender (if not provided, though recommended to provide).
- Support for all grammatical cases.
- Uses `regex` library for advanced pattern matching compatibility with JS version.

## License

MIT