semvec/pypi-packages huggingface dataset:
ciphers-vbc 0.2.0
A tool for ciphering messages using various algorithms
Requires Python: >=3.9

# Ciphers

A Python tool for ciphering messages using various algorithms.

## Installation

### Basic Installation

```bash
pip install ciphers-vbc
```

### With RSA Support

```bash
pip install ciphers-vbc[rsa]
```

### Using uv (recommended)

```bash
# Install uv if you don't have it
pip install uv

# Create and activate a virtual environment with uv
uv venv
source .venv/bin/activate  # On Linux/macOS
# or
# .venv\Scripts\activate  # On Windows

# Install the package in development mode
uv pip install -e .

# With RSA support
uv pip install -e ".[rsa]"
```

### Using pip

```bash
pip install -e .

# With RSA support
pip install -e ".[rsa]"
```

## Usage

### Caesar Cipher

```bash
# Encrypt a message using Caesar cipher with a shift of 3
cipher encrypt --algorithm caesar --key 3 "Hello, World!"

# Decrypt a message using Caesar cipher with a shift of 3
cipher decrypt --algorithm caesar --key 3 "Khoor, Zruog!"
```

### RSA Cipher

First, generate an RSA key pair:

```bash
# Using OpenSSL
openssl genrsa -out private_key.pem 2048
openssl rsa -in private_key.pem -pubout -out public_key.pem
```

Then encrypt and decrypt messages:

```bash
# Encrypt a message using RSA with a public key
cipher encrypt --algorithm rsa --key public_key.pem "Secret message"

# Decrypt a message using RSA with a private key
cipher decrypt --algorithm rsa --key private_key.pem "encrypted_message_here"
```

## Development

### Installing Development Dependencies

With uv:

```bash
# Install development dependencies
uv pip install -e ".[dev]"
```

With pip:

```bash
# Install development dependencies
pip install -e ".[dev]"
```

### Running Tests

```bash
# Run tests with pytest
pytest

# Run tests with coverage
pytest --cov=ciphers
```

### Code Formatting and Linting

```bash
# Format code with black
black .

# Sort imports with isort
isort .

# Lint with ruff
ruff check .

# Format with ruff
ruff format .

# Type checking with mypy
mypy ciphers tests
```

### Building and Publishing

Building the package with uv:

```bash
# Build both wheel and sdist
uv build .

# Or build specific formats
uv build --wheel .  # Only wheel
uv build --sdist .  # Only source distribution
```

Publishing to PyPI with uv:

```bash
# Upload to TestPyPI first to verify everything works
uv publish --index testpypi dist/*

# Upload to PyPI
uv publish dist/*
```

You can also use twine if you prefer:

```bash
# Install twine
uv pip install twine

# Upload to TestPyPI
python -m twine upload --repository testpypi dist/*

# Upload to PyPI
python -m twine upload dist/*
```

## Supported Algorithms

- Caesar Cipher: A simple substitution cipher where each letter is shifted by a fixed number of positions.
- RSA Cipher: A public-key cryptosystem that uses asymmetric encryption for secure data transmission.
etl-package-maiyo008 0.0.2
An update to ETL package that loads data from API, cleans and loads it to a csv
Requires Python: >=3.12

# etl_package_maiyo008

---

A simple yet extensible Python ETL (Extract, Transform, Load) pipeline that supports loading data from Parquet files, performing basic transformations, and writing to a PostgreSQL database. Designed to be easily reusable and ideal for automation tasks.

## 📦 Installation

To install the package from PyPI:

```
pip install etl-package-maiyo008
```

## 🧠 Features

- Extract data from Parquet files
- Transform data by:
  - Removing duplicates
  - Dropping rows with blank fields
- Load data into PostgreSQL with:
  - Chunked inserts for performance
  - Progress feedback via tqdm
- Load data into a csv file
  - Separator is a comma
  - Creates the csv within the same working directory

## 📁 Project Structure

```
etl_package_maiyo008/
├── etl.py
├── __init__.py
```

## 🚀 Quickstart Guide

1. Import the package

```
from etl_package_maiyo008.etl import Extract, Transform, Load
```

2. Extract data

Exctract from a parquet file

```
df = Extract.load_parquet("data/sample_data.parquet")
```

Extract from an API

```
df = Extract.load_api(url)
```

3. Transform data

```
df_clean = Transform.remove_duplicates(df)
df_clean = Transform.remove_blanks(df_clean)
```

4. Load Data to PostgreSQL

```
conn = Load.connect_postgres(
    database="mydb",
    host="localhost",
    user="myuser",
    password="mypassword"
)

Load.write_to_db(df_clean, table_name="cleaned_data", conn=conn)
```

5. Load Data to csv

```
Load.write_to_csv(df, filename)
```

## 📚 Method Reference

**Extract**
`Extract.load_parquet(path: str)`

- Loads a Parquet file into a pandas DataFrame.

**Transform**
`Transform.remove_duplicates(df: pd.DataFrame)`

- Removes duplicate rows from the DataFrame.

`Transform.remove_blanks(df: pd.DataFrame)`

- Removes rows with missing/blank values.

**Load**
`Load.connect_postgres(database, host, user, password, port=5432)`

- Creates a connection to a PostgreSQL database using SQLAlchemy.

`Load.write_to_db(df, table_name, conn, chunk_size=1000)`

- Writes the DataFrame to a PostgreSQL table in chunks, providing progress feedback.

## ⚠️ Requirements

- pandas
- psycopg2-binary
- SQLAlchemy
- tqdm
- pyarrow or fastparquet (for Parquet support)

Install requirements with:

```
pip install pandas psycopg2-binary SQLAlchemy tqdm pyarrow
```

## ✅ License

- MIT License