2021.4 #19
0
src/tests/generated/simple-di/LICENSE
Normal file
0
src/tests/generated/simple-di/LICENSE
Normal file
0
src/tests/generated/simple-di/README.md
Normal file
0
src/tests/generated/simple-di/README.md
Normal file
41
src/tests/generated/simple-di/cpl.json
Normal file
41
src/tests/generated/simple-di/cpl.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"ProjectSettings": {
|
||||
"Name": "simple-di",
|
||||
"Version": {
|
||||
"Major": "0",
|
||||
"Minor": "0",
|
||||
"Micro": "0"
|
||||
},
|
||||
"Author": "",
|
||||
"AuthorEmail": "",
|
||||
"Description": "",
|
||||
"LongDescription": "",
|
||||
"URL": "",
|
||||
"CopyrightDate": "",
|
||||
"CopyrightName": "",
|
||||
"LicenseName": "",
|
||||
"LicenseDescription": "",
|
||||
"Dependencies": [
|
||||
"sh_cpl==2021.4.2.dev1"
|
||||
],
|
||||
"PythonVersion": ">=3.9.2",
|
||||
"PythonPath": {
|
||||
"linux": ""
|
||||
},
|
||||
"Classifiers": []
|
||||
},
|
||||
"BuildSettings": {
|
||||
"SourcePath": "src",
|
||||
"OutputPath": "dist",
|
||||
"Main": "main",
|
||||
"EntryPoint": "simple-di",
|
||||
"IncludePackageData": false,
|
||||
"Included": [],
|
||||
"Excluded": [
|
||||
"*/__pycache__",
|
||||
"*/logs",
|
||||
"*/tests"
|
||||
],
|
||||
"PackageData": {}
|
||||
}
|
||||
}
|
23
src/tests/generated/simple-di/src/main.py
Normal file
23
src/tests/generated/simple-di/src/main.py
Normal file
@ -0,0 +1,23 @@
|
||||
from cpl.configuration import Configuration, ConfigurationABC
|
||||
from cpl.console import Console
|
||||
from cpl.dependency_injection import ServiceCollection, ServiceProviderABC
|
||||
|
||||
|
||||
def configure_configuration() -> ConfigurationABC:
|
||||
config = Configuration()
|
||||
return config
|
||||
|
||||
|
||||
def configure_services(config: ConfigurationABC) -> ServiceProviderABC:
|
||||
services = ServiceCollection(config)
|
||||
return services.build_service_provider()
|
||||
|
||||
|
||||
def main():
|
||||
config = configure_configuration()
|
||||
provider = configure_services(config)
|
||||
Console.write_line('Hello World')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
1
src/tests/generated/simple-di/src/tests/__init__.py
Normal file
1
src/tests/generated/simple-di/src/tests/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
# imports:
|
Loading…
Reference in New Issue
Block a user