Vue d'ensemble
TurboGears 2.5, publié le 18 février 2022, ajoute le support de Python 3.13, la configuration via pyproject.toml et constitue la dernière version significative du framework.
Fonctionnalités principales
pyproject.toml
Le projet supporte désormais la configuration via pyproject.toml, suivant les standards modernes de packaging Python.
toml
[project]
name = "monprojet"
version = "1.0.0"
dependencies = [
"TurboGears2>=2.5",
"SQLAlchemy",
]
[project.scripts]
monprojet = "monprojet.cli:main"
Dernière version significative
TurboGears 2.5 est la dernière version significative du framework. Le développement actif a ralenti, mais le framework reste fonctionnel pour les projets existants.
python
from tg import expose, TGController
from tg import AppConfig
class RootController(TGController):
@expose('json')
def index(self):
return {'framework': 'TurboGears', 'version': '2.5'}
config = AppConfig(minimal=True, root_controller=RootController())
app = config.make_wsgi_app()
