From f9fc25c64b895ab73a520167374c36bc3127b411 Mon Sep 17 00:00:00 2001 From: stirelshka8_BigARM Date: Sun, 2 Mar 2025 19:06:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=83=D1=82=D0=B5=D0=B9=20/=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .version | 1 + app.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .version diff --git a/.version b/.version new file mode 100644 index 0000000..8a9ecc2 --- /dev/null +++ b/.version @@ -0,0 +1 @@ +0.0.1 \ No newline at end of file diff --git a/app.py b/app.py index e40d69f..0a538c7 100644 --- a/app.py +++ b/app.py @@ -11,7 +11,10 @@ class Item(BaseModel): @app.get('/', response_model=List[Item]) def get_items(): - data_info = [Item(module_name="Crypto Licensing", module_version="1.0.0")] + with open('.version') as f: + module_version = f.read().strip() + + data_info = [Item(module_name="Crypto Licensing", module_version=module_version)] return data_info # @app.get('/items/{item_id}', response_model=Optional[Item])