File tree Expand file tree Collapse file tree
{{cookiecutter.project_name}} Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Changelog
2+
3+ All notable changes to this project will be documented in this file.
4+
5+ The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6+ and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7+
8+ ## 2023-11-26
9+ - Update the template for BlackSheep v2
10+ - Remove support for Pydantic v1, add support for ` pydantic-settings ` ,
11+ and upgrade ` Pydantic ` pinned version
12+
13+ ## 2023-06-29 :gem :
14+ - New project template
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ def configure_application(
2121 services = services , show_error_details = settings .app .show_error_details
2222 )
2323
24+
25+
2426 configure_error_handlers (app )
2527 configure_authentication (app , settings )
2628{% - if cookiecutter .use_openapi % }
Original file line number Diff line number Diff line change 77
88https://docs.pydantic.dev/latest/usage/settings/
99"""
10- from pydantic import BaseModel , BaseSettings
10+ from pydantic import BaseModel
11+ from pydantic_settings import BaseSettings , SettingsConfigDict
1112
1213
1314class APIInfo (BaseModel ):
14- title = "{{ cookiecutter.project_name }} API"
15- version = "0.0.1"
15+ title : str = "{{ cookiecutter.project_name }} API"
16+ version : str = "0.0.1"
1617
1718
1819class App (BaseModel ):
19- show_error_details = False
20+ show_error_details : bool = False
2021
2122
2223class Site (BaseModel ):
@@ -32,8 +33,7 @@ class Settings(BaseSettings):
3233 # export app_app='{"show_error_details": True}'
3334 app : App = App ()
3435
35- class Config :
36- env_prefix = "APP_" # defaults to no prefix, i.e. ""
36+ model_config = SettingsConfigDict (env_prefix = 'APP_' )
3737
3838
3939def load_settings () -> Settings :
Original file line number Diff line number Diff line change 1- blacksheep [full ]== 2.0a11
1+ blacksheep [full ]~= 2.0.0
22uvicorn == 0.22.0
33uvloop ; platform_system != "Windows"
44{%- if cookiecutter.app_settings_library == "essentials-configuration" %}
55essentials-configuration [full ]
66{%- endif %}
7+ {%- if cookiecutter.app_settings_library == "Pydantic" %}
8+ pydantic-settings
9+ {%- endif %}
710MarkupSafe == 2.1.3
8- pydantic == 1.10.10
11+ pydantic == 2.5.2
You can’t perform that action at this time.
0 commit comments