konduktor/pyproject.toml
Илья Глазунов 84cd1c974f feat: Add CLI for PyServe with configuration options
- Introduced a new CLI module (`cli.py`) to manage server configurations via command line arguments.
- Added script entry point in `pyproject.toml` for easy access to the CLI.
- Enhanced `Config` class to load configurations from a YAML file.
- Updated `__init__.py` to include `__version__` in the module exports.
- Added optional dependencies for development tools in `pyproject.toml`.
- Implemented logging improvements and error handling in various modules.
- Created tests for the CLI functionality to ensure proper behavior.
- Removed the old `run.py` implementation in favor of the new CLI approach.
2025-09-02 00:20:40 +03:00

75 lines
1.3 KiB
TOML

[project]
name = "pyserve"
version = "0.6.0"
description = "Simple HTTP Web server written in Python"
authors = [
{name = "Илья Глазунов",email = "i.glazunov@sapiens.solutions"}
]
license = {text = "MIT"}
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"starlette (>=0.47.3,<0.48.0)",
"uvicorn[standard] (>=0.35.0,<0.36.0)",
"pyyaml (>=6.0,<7.0)"
]
[project.scripts]
pyserve = "pyserve.cli:main"
[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"black",
"isort",
"mypy",
"flake8"
]
[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 88
target-version = ['py312']
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
known_first_party = ["pyserve"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = ["-v", "--tb=short"]
[tool.poetry.group.dev.dependencies]
pytest = "^8.4.1"
pytest-cov = "^6.2.1"
black = "^25.1.0"
isort = "^6.0.1"
mypy = "^1.17.1"
flake8 = "^7.3.0"