Metadata-Version: 2.4
Name: artinforge
Version: 0.2.0
Summary: A lightweight, dependency-free Python toolkit for developer utilities, caching, configuration and file integrity.
Author: Artin Karimian
License-Expression: MIT
Keywords: python,developer-tools,automation,files,json,networking,cache,security,persian-text
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# ArtinForge 0.2.0

**A lightweight, dependency-free Python toolkit for everyday developer tasks.**

ArtinForge uses the Python standard library at runtime; no mandatory third-party runtime packages are required.

## Features

- **Text:** whitespace cleanup, word/character counts, truncation, Unicode-aware slugs, Persian Arabic-letter normalization, and secret redaction in diagnostic text.
- **Files:** UTF-8 reads/writes, directory creation, file listing and size helpers.
- **JSON storage:** atomic JSON saves and Unicode-friendly loads.
- **HTTP:** standard-library GET/JSON and POST JSON helpers with timeouts.
- **Integrity/security:** SHA-256 for bytes and files, constant-time string comparison, and resolved-path containment checks.
- **TTL cache:** bounded, thread-safe in-memory cache with expiration.
- **Configuration:** validated boolean/integer environment variable readers.
- **Local development server:** serve a directory for local testing.
- **CLI:** runtime info, file hashing, JSON validation, text statistics, and local server.

> ArtinForge is a developer toolkit, not a bundled AI model. AI features require a model or service to be connected separately.

## Install

```bash
python -m pip install artinforge==0.2.0
```

## Python quick start

```python
from artinforge import cache, config, jsonstore, security, text

print(text.normalize_persian("كیفيت و يادگيری"))
print(text.slugify("سلام ArtinForge!"))
print(security.sha256_bytes(b"hello"))

settings = {"language": "fa", "theme": "dark"}
jsonstore.save("demo/settings.json", settings)
print(jsonstore.load("demo/settings.json", default={}))

results = cache.TTLCache(maxsize=100, ttl=30)
results.set("greeting", "سلام آرتین")
print(results.get("greeting"))

port = config.env_int("ARTIN_PORT", 8765, minimum=1, maximum=65535)
print(port)
```

## CLI commands

```bash
artinforge --help
artinforge --version
artinforge info
artinforge hash path/to/file.bin
artinforge json-check settings.json
artinforge text-stats README.md
artinforge serve --host 127.0.0.1 --port 8765 --directory .
```

The local server is intended for development. Keep the default host `127.0.0.1` unless you understand the exposure risks; do not expose it to the public internet without a security review and appropriate protections.

## Test and build from source

```bash
python -m pip install pytest build twine
python -m pytest -q
python -m build
python -m twine check dist/*
```

Each PyPI release must use a version number that has not already been uploaded. Check the official PyPI project page before publishing.

## License

MIT. See `LICENSE`.
