Metadata-Version: 2.4
Name: suanki_trader_tools
Version: 0.1.0
Summary: A simple test package using setuptools
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: boto3
Requires-Dist: requests

# suanki-py-setuptool

[![Python Version](https://shields.io)](https://python.org)
[![License: MIT](https://shields.io)](https://opensource.org)

A simple, optimized test package demonstrating modern Python packaging configurations using `setuptools` and `pyproject.toml`.

## 🚀 Features

- **Mathematical Utilities**: Fast local processing algorithms.
- **CLI Ready**: Built-in automated terminal shortcuts.
- **Modern Standards**: Fully compatible with the `src/` layout ecosystem.

## 📦 Installation

Install the package directly from your local wheel build or project root:

```bash
# Install from local source in editable mode
pip install -e .

# Or install the pre-compiled wheel archive
pip install dist/suanki_trader_tools-0.1.0-py3-none-any.whl
```

## 🛠️ Usage

### Via Python Script
Import the core module functions into any Python execution environment:

```python
import suanki_trader_tools

# Multiply any integer or float by two
result = suanki_trader_tools.multiply_by_two(10)
print(result)  # Output: 20
```

### Via Terminal Command-Line (CLI)
Once installed, run the automated script directly from your shell path:

```bash
run-suanki
```

## 🧑‍💻 Development Setup

To configure this project for local development, testing, and modifications:

1. Clone the repository structure.
2. Initialize your isolated virtual environment:
   ```bash
   python3 -m venv .venv
   source .venv/bin/activate
   ```
3. Install package builders and project dependencies:
   ```bash
   pip install build twine
   ```
4. Regenerate distribution bundles:
   ```bash
   python -m build
   ```

## 📄 License

Distributed under the MIT License. See `LICENSE` for more information.



# 🚀 Python Packaging Interview Guide: Setuptools & Wheels

A high-density technical summary explaining modern Python build infrastructure, designed for rapid review and interview preparation.

---

## 🛠️ 1. What is `setuptools`?

`setuptools` is Python's foundational **build backend**. Its primary job is to process project metadata, source code, and assets to compile them into standardized, distributable software packages.

### 📌 Core Concepts to Remember:
- **The Declarative Standard**: Running `python setup.py` commands is strictly **deprecated**. Modern `setuptools` runs silently behind the scenes, reading configuration settings directly from **`pyproject.toml`** (PEP 517/518).
- **Dependency Tracking**: It declares project requirements, telling installation frontends (like `pip`) exactly which external upstream libraries must be pulled down.
- **CLI Automation**: It automates command-line interface generation using `[project.scripts]`. It instructs the host operating system to map a terminal command directly to an internal Python function.

---

## 📦 2. What is a `.whl` (Wheel) File?

A Wheel is the **standard built distribution format** for Python software. Structurally, it is a standard `.zip` archive containing package modules and structural metadata, renamed with a `.whl` extension.

### 📌 Core Concepts to Remember:
- **Historical Context**: It completely replaced legacy Source Distributions (`.tar.gz`) as the preferred installation format on PyPI.
- **The Installation Advantage**: Wheels are **pre-compiled**. `pip` installs them by unzipping the archive directly into the system's `site-packages` directory. It skips running local configuration scripts or building binaries on the client machine, maximizing security and speed.
- **The Compatibility Tag System**: Wheel filenames contain strict platform indicators (e.g., `py3-none-any.whl`):
  - `py3`: Language implementation (Compatible with Python 3 engines).
  - `none`: ABI tag (No reliance on specific Python C-API compiler internals).
  - `any`: Platform tag (Pure Python code capable of running on Windows, macOS, or Linux).

---

## 🎯 3. High-Frequency Interview Questions

### Q1: What is the difference between an sdist and a Wheel?
- **sdist (Source Distribution, `.tar.gz`)**: Contains raw, uncompiled source code. The user's system must process and build it during installation.
- **Wheel (Built Distribution, `.whl`)**: Pre-compiled and structured. The user's machine skips the build phase entirely and extracts it instantly.

### Q2: Why is the `src/` directory layout highly recommended?
- **Answer**: It enforces testing isolation. If source modules sit directly in the project root, testing frameworks can accidentally import local raw files. Placing modules under `src/` forces tools to test the actual package built and installed by `setuptools`.

### Q3: How do you compile a production-ready package today?
- **Answer**: Install the standardized PyPA frontend build engine (`pip install build`) and run `python -m build` at the project root. This spins up an isolated build environment, processes the `pyproject.toml` directives via `setuptools`, and generates output files inside a `dist/` directory.

---

## 📋 Essential Terminal Command Reference

```bash
# 1. Mount project locally in editable/development mode
pip install -e .

# 2. Compile clean source (sdist) and binary wheel packages
python -m build

# 3. Force install a pre-compiled wheel binary directly
pip install dist/package_name-0.1.0-py3-none-any.whl
```


```bash
pip uninstall suanki-py-setuptool -y

```


## 📋 How to install .whl
- pip install build

## trigger compilation
 - python -m build

