Илья Глазунов 537b783726 Add CI/CD pipeline, logging enhancements, and release management
- Create a GitHub Actions workflow for testing with Python 3.12 and 3.13.
- Update Makefile to include release management commands and pipeline checks.
- Document the CI/CD pipeline structure and usage in PIPELINE.md.
- Add structlog for structured logging and enhance logging utilities.
- Implement release management script for automated versioning and tagging.
- Modify logging configuration to support structured logging and improved formatting.
- Update dependencies in pyproject.toml and poetry.lock to include structlog.
- Enhance access logging in server and middleware to include structured data.
2025-09-03 00:13:21 +03:00

PyServe

PyServe is a modern, async HTTP server written in Python. Originally created for educational purposes, it has evolved into a powerful tool for rapid prototyping and serving web applications with unique features like AI-generated content.

isolated

More on web page

Project Overview

PyServe v0.6.0 introduces a completely refactored architecture with modern async/await syntax and new exciting features like Vibe-Serving - AI-powered dynamic content generation.

Key Features:

  • Async HTTP Server - Built with Python's asyncio for high performance
  • Advanced Configuration System V2 - Powerful extensible configuration with full backward compatibility
  • Regex Routing & SPA Support - nginx-style routing patterns with Single Page Application fallback
  • Static File Serving - Efficient serving with correct MIME types
  • Template System - Dynamic content generation
  • Vibe-Serving Mode - AI-generated content using language models (OpenAI, Claude, etc.)
  • Reverse Proxy - Forward requests to backend services with advanced routing
  • SSL/HTTPS Support - Secure connections with certificate configuration
  • Modular Extensions - Plugin-like architecture for security, caching, monitoring
  • Beautiful Logging - Colored terminal output with file rotation
  • Error Handling - Styled error pages and graceful fallbacks
  • CLI Interface - Command-line interface for easy deployment and configuration

Getting Started

Prerequisites

  • Python 3.12 or higher
  • Poetry (recommended) or pip

Installation

Via Poetry (рекомендуется)

git clone https://github.com/ShiftyX1/PyServe.git
cd PyServe
make init  # Initialize project

Или установка пакета

# local install
make install-package

# after installing project you can use command pyserve
pyserve --help

Running the Server

# start in development mode
make run

# start in production mode
make run-prod

# show all available commands
make help

Using CLI directly

# after installing package
pyserve

# or with Poetry
poetry run pyserve

# or legacy (for backward compatibility)
python run.py

CLI options

# help
pyserve --help

# path to config
pyserve -c /path/to/config.yaml

# rewrite host and port
pyserve --host 0.0.0.0 --port 9000

# debug mode
pyserve --debug

# show version
pyserve --version

Development

Makefile Commands

make help          # Show help for commands
make install       # Install dependencies
make dev-install   # Install development dependencies
make build         # Build the package
make test          # Run tests
make test-cov      # Tests with code coverage
make lint          # Check code with linters
make format        # Format code
make clean         # Clean up temporary files
make version       # Show version
make publish-test  # Publish to Test PyPI
make publish       # Publish to PyPI

Project Structure

pyserveX/
├── pyserve/           # Main package
│   ├── __init__.py
│   ├── cli.py         # CLI interface
│   ├── server.py      # Main server module
│   ├── config.py      # Configuration system
│   ├── routing.py     # Routing
│   ├── extensions.py  # Extensions
│   └── logging_utils.py
├── tests/             # Tests
├── static/            # Static files
├── templates/         # Templates
├── logs/             # Logs
├── Makefile          # Automation tasks
├── pyproject.toml    # Project configuration
├── config.yaml       # Server configuration
└── run.py           # Entry point (backward compatibility)

License

This project is distributed under the MIT license.

Description
No description provided
Readme MIT 706 KiB
Languages
Python 96%
Makefile 1.9%
Cython 1.4%
Shell 0.7%