Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,11 @@ jobs:
python -m pip install --upgrade pip
pip install maturin pytest pytest-asyncio requests

- name: Build and install
run: maturin build --release -i python --out dist && pip install dist/*.whl

- name: Install turboapi and dhi
- name: Build and install turboapi
run: |
pip install "dhi>=1.1.0"
pip install -e $GITHUB_WORKSPACE/python
maturin build --release -i python --out dist
pip install dist/*.whl
# dhi is installed as a dependency automatically

- name: Run tests
run: python -m pytest $GITHUB_WORKSPACE/tests/ -v --tb=short
Expand Down Expand Up @@ -116,13 +114,11 @@ jobs:
python -m pip install --upgrade pip
pip install maturin pytest pytest-asyncio requests

- name: Build and install (free-threaded)
run: maturin build --release -i python --out dist && pip install dist/*.whl

- name: Install turboapi and dhi
- name: Build and install turboapi (free-threaded)
run: |
pip install "dhi>=1.1.0"
pip install -e $GITHUB_WORKSPACE/python
maturin build --release -i python --out dist
pip install dist/*.whl
# dhi is installed as a dependency automatically

- name: Run tests (free-threaded)
run: python -m pytest $GITHUB_WORKSPACE/tests/ -v --tb=short
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,32 @@ jobs:
run: |
# Install bump2version if not available
pip install bump2version
# Extract current version from python/pyproject.toml
CURRENT_VERSION=$(grep -Po '(?<=version = ")[^"]*' python/pyproject.toml)

# Extract current version from pyproject.toml (root)
CURRENT_VERSION=$(grep -Po '(?<=version = ")[^"]*' pyproject.toml | head -1)
echo "Current version: $CURRENT_VERSION"

# Create .bumpversion.cfg for coordinated version bumping
cat > .bumpversion.cfg << EOF
[bumpversion]
current_version = $CURRENT_VERSION
commit = False
tag = False
[bumpversion:file:python/pyproject.toml]

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:Cargo.toml]
search = version = "{current_version}"
replace = version = "{new_version}"
EOF
# Bump version in both python/pyproject.toml and Cargo.toml

# Bump version in both pyproject.toml and Cargo.toml
bump2version ${{ github.event.inputs.version_bump }} --allow-dirty

# Get new version
NEW_VERSION=$(grep -Po '(?<=version = ")[^"]*' python/pyproject.toml)
NEW_VERSION=$(grep -Po '(?<=version = ")[^"]*' pyproject.toml | head -1)
echo "New version: $NEW_VERSION"
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT

Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
- name: Commit version bump and create tag
id: create_tag
run: |
git add python/pyproject.toml Cargo.toml CHANGELOG.md .bumpversion.cfg
git add pyproject.toml Cargo.toml CHANGELOG.md .bumpversion.cfg
git commit -m "Bump version to v${{ steps.bump_version.outputs.new_version }}"
git tag -a "v${{ steps.bump_version.outputs.new_version }}" -m "Release v${{ steps.bump_version.outputs.new_version }}"
git push && git push --tags
Expand Down
52 changes: 19 additions & 33 deletions python/pyproject.toml → pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,74 +1,60 @@
[build-system]
requires = ["maturin>=1.0,<2.0", "setuptools>=45", "wheel"]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"

[project]
name = "turboapi"
version = "0.4.16"
description = "Revolutionary Python web framework with FastAPI syntax and 12x performance - Pure Rust Async Runtime (Python 3.13+ free-threading required)"
description = "FastAPI-compatible web framework with Rust HTTP core - 2-3x faster with Python 3.13 free-threading"
readme = "README.md"
requires-python = ">=3.13"
license = {text = "MIT"}
authors = [
{name = "Rach Pradhan", email = "rach@turboapi.dev"}
]
dependencies = [
"dhi>=1.1.3",
]
keywords = ["web", "framework", "http", "server", "rust", "performance", "free-threading", "no-gil", "fastapi-compatible"]
keywords = ["web", "framework", "http", "server", "rust", "performance", "fastapi", "async"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.14",
"Programming Language :: Rust",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Framework :: FastAPI",
]
dependencies = [
"dhi>=1.1.3",
]

[project.urls]
Homepage = "https://github.com/justrach/turboAPI"
Repository = "https://github.com/justrach/turboAPI"
Documentation = "https://github.com/justrach/turboAPI#readme"

[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"ruff==0.13.2",
"ruff>=0.1.0",
"mypy>=1.0.0",
]
benchmark = [
"httpx>=0.24.0",
"uvloop>=0.17.0",
"matplotlib>=3.5.0",
"seaborn>=0.11.0",
"pandas>=1.3.0",
"requests>=2.25.0",
]

[tool.maturin]
python-source = "."
python-source = "python"
module-name = "turboapi.turbonet"
manifest-path = "../Cargo.toml"
include = ["turboapi/**/*.py"]
features = ["pyo3/extension-module"]

[tool.ruff]
target-version = "py313"
line-length = 100

[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
select = ["E", "W", "F", "I", "B", "C4", "UP"]
ignore = ["E501", "B008", "C901"]