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
4 changes: 2 additions & 2 deletions .github/workflows/lint_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
name: Python lint check
uses: apify/workflows/.github/workflows/python_lint_check.yaml@main
with:
python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
python_versions: '["3.11", "3.12", "3.13", "3.14"]'

python_type_check:
name: Python type check
uses: apify/workflows/.github/workflows/python_type_check.yaml@main
with:
python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
python_versions: '["3.11", "3.12", "3.13", "3.14"]'

lint_and_test:
name: Lint and test (without templates)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_llm_ai_python_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-24.04, windows-latest]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
python-version: ['3.11', '3.12', '3.13', '3.14']
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 60
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_python_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-24.04, windows-latest]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
python-version: ['3.11', '3.12', '3.13', '3.14']
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 120
Expand Down
22 changes: 12 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
[project]
name = "actor-templates"
version = "0.0.1"
requires-python = ">= 3.10"
requires-python = ">= 3.11"
dependencies = [
"apify[scrapy] >= 3.0.0, < 4.0.0",
"apify[scrapy] >= 3.3.0, < 4.0.0",
"apify-client",
# "arxiv-mcp-server >= 0.3.1, < 1.0.0", # Requires Python >= 3.11, incompatible with requires-python >= 3.10
"arxiv-mcp-server >= 0.3.1, < 1.0.0",
"beautifulsoup4[lxml] >= 4.0.0, < 5.0.0",
"camoufox[geoip] >= 0.4.5, < 1.0.0",
"crawlee[all] >= 1.7.0",
# "crewai[tools] >= 0.11.0, < 1.0.0", # Pulls onnxruntime via chromadb, which requires Python >= 3.11
# crewai 1.x conflicts with the aggregate env (requires uv < 0.10, pydantic-settings < 2.11)
# "crewai[tools] >= 1.12.2, < 2.0.0",
"fastapi >= 0.135.0, < 1.0.0",
"fastmcp>=3.2.0,<4.0.0",
"fastmcp >= 3.0.0, < 4.0.0",
"httpx >= 0.28.0, < 1.0.0",
"langchain >= 1.0.0, < 2.0.0",
# "langchain-apify >= 0.1.0, < 1.0.0", # Incompatible with langchain >= 1.0.0 (requires langchain-core < 0.4.0)
"langchain-openai>=1.1.14,<2.0.0",
# langchain-apify conflicts with langchain >= 1.0.0 (requires langchain-core < 0.4.0)
# "langchain-apify >= 0.1.0, < 1.0.0",
Comment on lines +12 to +19

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the point of those commented-out packages?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is so that we know these can't currently be installed in the same environment and therefore can't be linted or type-checked. Or do you mean something else?

"langchain-openai >= 1.0.0, < 2.0.0",
"langgraph >= 1.0.0, < 2.0.0",
"llama-index >= 0.14.0, < 1.0.0",
"mcp >= 1.25.0, < 2.0.0",
Expand All @@ -24,11 +26,11 @@ dependencies = [
"pydantic >= 2.0.0, < 3.0.0",
"pydantic-ai >= 1.99.0, < 2.0.0", # >= 1.99.0 patches SSRF advisories GHSA-cqp8-fcvh-x7r3 and GHSA-2jrp-274c-jhv3
"pyjwt >= 2.12.0", # Transitive dep of mcp; direct pin until mcp bumps its floor above vulnerable < 2.12.0
"scrapy>=2.15.2,<3.0.0",
"scrapy >= 2.14.0, < 3.0.0",
"selenium >= 4.41.0, < 5.0.0",
"smolagents[openai] >= 1.0.0, < 2.0.0",
"types-beautifulsoup4 >= 4.0.0, < 5.0.0",
"uv>=0.11.15,<1.0.0",
"uv >= 0.11.15, < 1.0.0",
"uvicorn >= 0.27.0, < 1.0.0",
]

Expand Down Expand Up @@ -95,7 +97,7 @@ asyncio_mode = "auto"
timeout = 1200

[tool.ty.environment]
python-version = "3.10"
python-version = "3.11"

[tool.ty.src]
include = ["templates"]
Expand Down
4 changes: 2 additions & 2 deletions templates/python-mcp-proxy/my_actor/const.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from enum import Enum
from enum import StrEnum

SESSION_TIMEOUT_SECS = 300 # 5 minutes


class ChargeEvents(str, Enum):
class ChargeEvents(StrEnum):
"""Event types for charging MCP operations.

These events are used to charge users for different types of MCP operations
Expand Down
4 changes: 2 additions & 2 deletions templates/python-mcp-proxy/my_actor/models.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from enum import Enum
from enum import StrEnum
from typing import Any, TypeAlias

import httpx
from mcp.client.stdio import StdioServerParameters
from pydantic import BaseModel, ConfigDict


class ServerType(str, Enum):
class ServerType(StrEnum):
"""Type of server to connect."""

STDIO = 'stdio' # Connect to a stdio server
Expand Down
Loading
Loading