Metadata-Version: 2.4
Name: ghps
Version: 0.2
Summary: Ghps: A Minimal GitHub Pages Simulator for Local Development
Home-page: https://github.com/sepandhaghighi/ghps
Download-URL: https://github.com/sepandhaghighi/ghps/tarball/v0.2
Author: Sepand Haghighi
Author-email: me@sepand.tech
License: MIT
Project-URL: Source, https://github.com/sepandhaghighi/ghps
Keywords: github gh-pages static-server static-hosting development server local http simulator testing cli python
Classifier: Development Status :: 3 - Alpha
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Topic :: Utilities
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.md
Requires-Dist: art>=5.3
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary


<div align="center">
<img src="https://github.com/sepandhaghighi/ghps/raw/main/otherfiles/logo.png" width="300">
<h1>Ghps: A Minimal GitHub Pages Simulator for Local Development</h1>
<br/>
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/built%20with-Python3-green.svg" alt="built with Python3"></a>
<a href="https://github.com/sepandhaghighi/ghps"><img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/sepandhaghighi/ghps"></a>
<a href="https://badge.fury.io/py/ghps"><img src="https://badge.fury.io/py/ghps.svg" alt="PyPI version"></a>
<a href="https://codecov.io/gh/sepandhaghighi/ghps"><img src="https://codecov.io/gh/sepandhaghighi/ghps/graph/badge.svg?token=X9Yj0YSPAK"></a>
</div>			
				
## Overview	

<p align="justify">		
<b>Ghps</b> is a minimal, zero-dependency GitHub Pages simulator written in pure Python for local development and testing. It accurately replicates GitHub Pages' static hosting behavior, including proper <code>404.html</code> handling, project base path simulation, strict routing mode, and optional cache control - all while remaining lightweight, fast, and usable both as a CLI tool and as an importable Python library.
</p>

<table>
	<tr>
		<td align="center">PyPI Counter</td>
		<td align="center"><a href="http://pepy.tech/project/ghps"><img src="http://pepy.tech/badge/ghps"></a></td>
	</tr>
	<tr>
		<td align="center">Github Stars</td>
		<td align="center"><a href="https://github.com/sepandhaghighi/ghps"><img src="https://img.shields.io/github/stars/sepandhaghighi/ghps.svg?style=social&label=Stars"></a></td>
	</tr>
</table>



<table>
	<tr> 
		<td align="center">Branch</td>
		<td align="center">main</td>	
		<td align="center">dev</td>	
	</tr>
	<tr>
		<td align="center">CI</td>
		<td align="center"><img src="https://github.com/sepandhaghighi/ghps/actions/workflows/test.yml/badge.svg?branch=main"></td>
		<td align="center"><img src="https://github.com/sepandhaghighi/ghps/actions/workflows/test.yml/badge.svg?branch=dev"></td>
	</tr>
</table>
<table>
    <tr> 
        <td align="center">Code Quality</td>
        <td align="center"><a href="https://www.codefactor.io/repository/github/sepandhaghighi/ghps"><img src="https://www.codefactor.io/repository/github/sepandhaghighi/ghps/badge" alt="CodeFactor"></a></td>
        <td align="center"><a href="https://app.codacy.com/gh/sepandhaghighi/ghps/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/738213c0ed074885b32c531d1bbf003f"></a></td>
    </tr>
</table>

## Installation		

### Source Code
- Download [Version 0.2](https://github.com/sepandhaghighi/ghps/archive/v0.2.zip) or [Latest Source](https://github.com/sepandhaghighi/ghps/archive/dev.zip)
- `pip install .`				

### PyPI

- Check [Python Packaging User Guide](https://packaging.python.org/installing/)     
- `pip install ghps==0.2`						


## Usage

Ghps can be used both as a CLI tool and as a Python library.

### CLI

```bash
ghps --port=8080 --no-cache --no-threaded
```

#### Options

| Option | Description | Default |
|--------|-------------|----------|
| `-p, --port` | Port to serve on | `8000` |
| `-d, --directory` | Directory to serve | Current directory (`.`) |
| `-b, --base-path` | Base path for project pages (e.g. `/repo-name`) | `""` |
| `--no-strict` | Enable `.html` fallback| Strict mode enabled |
| `--no-cache` | Disable HTTP caching headers | Cache enabled |
| `--no-threaded` | Disable threaded server | Threaded enabled |


### Library

```python
from ghps import GHPageServer

server = GHPageServer(
    directory="dist",
    port=5000,
    base_path="/repo-name",
    strict=True,
    no_cache=False,
    threaded=True,
)

server.start()
```

#### Parameters

| Parameter | Type | Description | Default |
|------------|------|-------------|----------|
| `directory` | `str` | Directory to serve | `"."` |
| `port` | `int` | Port number | `8000` |
| `base_path` | `str` | Base path for project page simulation | `""` |
| `strict` | `bool` | Enforce GitHub-like routing behavior | `True` |
| `no_cache` | `bool` | Disable cache headers | `False` |
| `threaded` | `bool` | Enable threaded request handling | `True` |

## Issues & Bug Reports			

Just fill an issue and describe it. We'll check it ASAP!

- Please complete the issue template

## Show Your Support
								
<h3>Star This Repo</h3>					

Give a ⭐️ if this project helped you!

<h3>Donate to Our Project</h3>	

<h4>Bitcoin</h4>
1KtNLEEeUbTEK9PdN6Ya3ZAKXaqoKUuxCy
<h4>Ethereum</h4>
0xcD4Db18B6664A9662123D4307B074aE968535388
<h4>Litecoin</h4>
Ldnz5gMcEeV8BAdsyf8FstWDC6uyYR6pgZ
<h4>Doge</h4>
DDUnKpFQbBqLpFVZ9DfuVysBdr249HxVDh
<h4>Tron</h4>
TCZxzPZLcJHr2qR3uPUB1tXB6L3FDSSAx7
<h4>Ripple</h4>
rN7ZuRG7HDGHR5nof8nu5LrsbmSB61V1qq
<h4>Binance Coin</h4>
bnb1zglwcf0ac3d0s2f6ck5kgwvcru4tlctt4p5qef
<h4>Tether</h4>
0xcD4Db18B6664A9662123D4307B074aE968535388
<h4>Dash</h4>
Xd3Yn2qZJ7VE8nbKw2fS98aLxR5M6WUU3s
<h4>Stellar</h4>		
GALPOLPISRHIYHLQER2TLJRGUSZH52RYDK6C3HIU4PSMNAV65Q36EGNL
<h4>Zilliqa</h4>
zil1knmz8zj88cf0exr2ry7nav9elehxfcgqu3c5e5
<h4>Coffeete</h4>
<a href="http://www.coffeete.ir/opensource">
<img src="http://www.coffeete.ir/images/buttons/lemonchiffon.png" style="width:260px;" />
</a>


# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.2] - 2026-03-19
### Added
- Logo
- Input validation
### Changed
- Test system modified
- `README.md` updated
## [0.1] - 2026-02-27
### Added
- `GHPageServer` class
- Command line interface
- Test system

[Unreleased]: https://github.com/sepandhaghighi/ghps/compare/v0.2...dev
[0.2]: https://github.com/sepandhaghighi/ghps/compare/v0.1...v0.2
[0.1]: https://github.com/sepandhaghighi/ghps/compare/bc0a425...v0.1



