semvec/pypi-packages huggingface dataset:
inkline 1.0.5
Advanced ASCII Art rendering library with color support
Requires Python: >=3.12
Keywords: ascii, art, terminal, colors, ansi, rendering

# inkline-py

### Overview
Display colorized ASCII art and info directly in the terminal.

### How to use

To use this <a href="https://pypi.org/project/inkline">pypi</a>, add it as a dependency in your `pyproject.toml`:

```toml
dependencies = [
    "chromakitx>=1.0.5",
    "inkline>=1.0.5"
]
```

### Example code:
```python
from inkline import (AsciiArt, InfoConfig)

from chromakitx import AnsiColor

logo: str = """
{2}            .:--::////::--.`
{1}        `/yNMMNho{2}////////////:.
{1}      `+NMMMMMMMMmy{2}/////////////:`
{0}    `-:::{1}ohNMMMMMMMNy{2}/////////////:`
{0}   .::::::::{1}odMMMMMMMNy{2}/////////////-
{0}  -:::::::::::{1}/hMMMMMMMmo{2}////////////-
{0} .::::::::::::::{1}oMMMMMMMMh{2}////////////-
{0}`:::::::::::::{1}/dMMMMMMMMMMNo{2}///////////`
{0}-::::::::::::{1}sMMMMMMmMMMMMMMy{2}//////////-
{0}-::::::::::{1}/dMMMMMMs{0}:{1}+NMMMMMMd{2}/////////:
{0}-:::::::::{1}+NMMMMMm/{0}:::{1}/dMMMMMMm+{2}///////:
{0}-::::::::{1}sMMMMMMh{0}:::::::{1}dMMMMMMm+{2}//////-
{0}`:::::::{1}sMMMMMMy{0}:::::::::{1}dMMMMMMm+{2}/////`
{0} .:::::{1}sMMMMMMs{0}:::::::::::{1}mMMMMMMd{2}////-
{0}  -:::{1}sMMMMMMy{0}::::::::::::{1}/NMMMMMMh{2}//-
{0}   .:{1}+MMMMMMd{0}::::::::::::::{1}oMMMMMMMo{2}-
{1}    `yMMMMMN/{0}:::::::::::::::{1}hMMMMMh.
{1}      -yMMMo{0}::::::::::::::::{1}/MMMy-
{1}        `/s{0}::::::::::::::::::{1}o/`
{0}            ``.---::::---..`
"""

art: AsciiArt = AsciiArt(text=logo, colors=[
    AnsiColor.BrightCyan,
    AnsiColor.BrightBlue,
    AnsiColor.BrightMagenta
], bold=True, info=InfoConfig(
    lines=["Hello World!", "This is Inkline.", "Made with ❤️ in Python.", "Developer: CELESTIFYX Team"]
))

print(art.render())
```

### Result
![screenshot](https://gitlab.com/inkline/inkline-py/-/raw/main/preview.png)
sscs-assignment 0.1.0
Software Supply Chain Security Assignmen
Requires Python: >=3.13

# software-supply-chain-security

this repository demonstrates software supply chain security practices using [sigstore](https://www.sigstore.dev/) for artifact signing and verification.  
it includes steps to **create, sign, and verify software artifacts**, along with verifying their inclusion in a **merkle tree transparency log**.

the workflow implemented here helps ensure:
- integrity of published artifacts
- provenance tracking of software releases
- prevention of supply chain attacks

---

## repository structure

| file / folder       | description |
|---------------------|-------------|
| `artifact.md`       | initial sample artifact file to sign |
| `artifact.bundle`   | signed bundle generated by sigstore for `artifact.md` |
| `artifact_2.md`     | second sample artifact |
| `artifact_2.bundle` | signed bundle for `artifact_2.md` |
| `main.py`           | core verification script (inclusion & consistency checks) |
| `merkle_proof.py`   | utilities for working with merkle tree proofs |
| `util.py`           | helper functions used across scripts |
| `demo.png`          | visual demo of signing and verification steps |
| `__pycache__/`      | compiled python cache files |
| `.gitignore`        | ignored files for git |

---

## demo workflow

the overall process is divided into **three steps**:

### step 1: create & sign artifact
generate an artifact and sign it with sigstore:
```bash
echo "hello world!" > artifact_2.md
python -m sigstore sign --bundle artifact_2.bundle artifact_2.md
````

this generates:

* the signed bundle `artifact_2.bundle`
* transparency log entry metadata (e.g., `logIndex`, `logID`)

---

### step 2: get merkle tree & artifact info

extract important fields from the bundle:

```bash
cat artifact_2.bundle | jq '.' | tail -n 5
```

example output:

```
"logIndex": 482833136,
"logID": "c0d23d6ad406973f9559f3ba2d1ca01f84147d8ffc5b8445c224f98b9591801d"
```

check the current checkpoint of the merkle tree:

```bash
python3 main.py -c
```

---

### step 3: verify artifact

#### a) verify signature & inclusion

```bash
python main.py --inclusion 482833136 --artifact artifact_2.md
```

output will confirm:

* signature validity
* offline root hash calculation
* inclusion proof verification

#### b) verify tree consistency

```bash
python3 main.py --consistency \
  --tree-id 1193050959916656506 \
  --tree-size 360933865 \
  --root-hash 141a3c752daec75b527dd79101d859a33c38d94b4721e54328a9427a5a50c271
```

---

## demo screenshot

![sigstore demo](demo.png)

---

## prerequisites

* python 3.8+
* `sigstore` cli tool
* `jq` for json parsing
* `pip install -r requirements.txt` (if present)

---

## use case

this setup is ideal for:

* securing ci/cd pipelines
* ensuring integrity of open-source releases
* validating provenance of dependencies

---

## author

**aaditya rengarajan `<ar9668>`**
assignment for **software supply chain security**

---

## [to-do]

[] review test-cases written with ai-assistance