architectonics 0.0.19__py3-none-any.whl → 0.0.21__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -8,7 +8,7 @@ from architectonics.common.utils.utils import get_current_datetime
8
8
 
9
9
 
10
10
  @as_declarative()
11
- class BaseEntity:
11
+ class BaseEntity(BaseEntityInterface):
12
12
  __abstract__ = True
13
13
 
14
14
  id = Column(
@@ -9,17 +9,5 @@ load_dotenv()
9
9
  class ApplicationSettings(BaseModel):
10
10
  DEBUG: bool = os.getenv("DEBUG", "False").lower() == "true"
11
11
 
12
- DATABASE_PREFIX: str = "postgresql+asyncpg"
13
-
14
- POSTGRES_USER: str = os.getenv("POSTGRES_USER")
15
- POSTGRES_PASSWORD: str = os.getenv("POSTGRES_PASSWORD")
16
- POSTGRES_HOST: str = os.getenv("POSTGRES_HOST")
17
- POSTGRES_PORT: int = os.getenv("POSTGRES_PORT")
18
- POSTGRES_DATABASE_NAME: str = os.getenv("POSTGRES_DATABASE_NAME")
19
-
20
- DATABASE_CONNECTION_STRING: str = (
21
- f"{DATABASE_PREFIX}://{POSTGRES_USER}:" f"{POSTGRES_PASSWORD}@{POSTGRES_HOST}:{POSTGRES_PORT}/{POSTGRES_DATABASE_NAME}"
22
- )
23
-
24
12
 
25
13
  application_settings = ApplicationSettings()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: architectonics
3
- Version: 0.0.19
3
+ Version: 0.0.21
4
4
  Summary:
5
5
  Author: Your Name
6
6
  Author-email: you@example.com
@@ -1,23 +1,19 @@
1
+ architectonics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ architectonics/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ architectonics/common/consts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1
4
  architectonics/common/consts/roles_dict.py,sha256=zKzjBdOhjbyH4ZCtnJ0MFsJu6LoOV6j8BeSKyZazLkk,127
2
5
  architectonics/common/consts/super_admin_user.py,sha256=MUupgT_Eo65r1YeIqRu20yHe52OZAOHVLgAP5TAsSzc,193
3
- architectonics/common/entities/base_entity.py,sha256=VE5ocgHp4mpEuiG04NtKBMjgZ1__haNtD5htpVP7oaY,665
6
+ architectonics/common/entities/base_entity.py,sha256=mT9GWK3hOeBFHeGwTWF12PJwirgx3CLKsYVW3_F0DzU,686
4
7
  architectonics/common/enums/step_types.py,sha256=KMpKQdDrmEDIhj8n_ovHkY90Y50iHFIBWw0-qPuCVl4,89
5
8
  architectonics/common/interfaces/base_entity_interface.py,sha256=q33_-qD4TCxEeZAbs65XPgbnXtbzLNw5vUOayT53-I8,291
6
- architectonics/common/interfaces/base_model_interface.py,sha256=ADBt3j7JUWHubmp5mDoSM54kFJkzFFYceewT4frKpn8,317
7
- architectonics/common/interfaces/user_context_interface.py,sha256=5-HdWI6TKnTFAbrCaGrVyBEDI02rNr48Md6422FxIcs,240
8
- architectonics/common/models/base_model.py,sha256=YGcZ1GsNN26bJqwtv6exTDH74YmWLYBpW_4hmJZ0yAY,484
9
- architectonics/common/models/error_message.py,sha256=AiG5xYDlWFZKM8K7_2CuFKwL2lbqRd6jgj8Vh17cU7w,84
10
9
  architectonics/common/utils/utils.py,sha256=a5dAvgfwYKQ5MwYaDxmy_YLHNHQxNgEH94YFuVrD4N0,84
11
10
  architectonics/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
11
  architectonics/core/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- architectonics/core/config/application_settings.py,sha256=Hpc3eLzbsNABQUNyz7cBoEBtSiMorFPxHsREAto2EeY,750
14
- architectonics/core/factory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- architectonics/core/factory/factory.py,sha256=ZfFfLW_aWIqPavmADkpmYJEbiJhqrh0735yhghgm56Q,740
16
- architectonics/core/repositories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ architectonics/core/config/application_settings.py,sha256=DmCjQCbm4BsxMoZuQ212Pjjl_3spQ2vK5TUyZdDcklM,239
17
13
  architectonics/infrastructure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
14
  architectonics/infrastructure/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
15
  architectonics/infrastructure/config/database.py,sha256=CKeMPhB7QoN29OWQgvl8TsN8WeuT3Mim_fD7eFvApRU,545
20
16
  architectonics/infrastructure/config/database_settings.py,sha256=d1HA8rQj3LMACEvrC2-uxzs6vyoQB1Qw1_wSAdSmN_g,676
21
- architectonics-0.0.19.dist-info/WHEEL,sha256=y3eDiaFVSNTPbgzfNn0nYn5tEn1cX6WrdetDlQM4xWw,83
22
- architectonics-0.0.19.dist-info/METADATA,sha256=SZ93TarJP5tUFf6Q9veCy3PmUliHzU1EZObQtrTxhFM,469
23
- architectonics-0.0.19.dist-info/RECORD,,
17
+ architectonics-0.0.21.dist-info/WHEEL,sha256=y3eDiaFVSNTPbgzfNn0nYn5tEn1cX6WrdetDlQM4xWw,83
18
+ architectonics-0.0.21.dist-info/METADATA,sha256=Fai5d8Nv5n4FTAW_qFV7Arzv2whOMdvY_xNX5O-zJIE,469
19
+ architectonics-0.0.21.dist-info/RECORD,,
@@ -1,17 +0,0 @@
1
- from abc import ABC, abstractmethod
2
- from datetime import datetime
3
-
4
-
5
- class BaseModelInterface(ABC):
6
-
7
- @property
8
- @abstractmethod
9
- def id(self) -> str: ...
10
-
11
- @property
12
- @abstractmethod
13
- def created_at(self) -> datetime: ...
14
-
15
- @property
16
- @abstractmethod
17
- def updated_at(self) -> datetime: ...
@@ -1,13 +0,0 @@
1
- from abc import ABC, abstractmethod
2
- from typing import Iterable
3
-
4
-
5
- class UserContextInterface(ABC):
6
-
7
- @property
8
- @abstractmethod
9
- def id(self) -> str: ...
10
-
11
- @property
12
- @abstractmethod
13
- def roles(self) -> Iterable[str]: ...
@@ -1,22 +0,0 @@
1
- from dataclasses import dataclass, field
2
- from datetime import datetime
3
- import uuid
4
-
5
- from architectonics.common.interfaces.base_model_interface import BaseModelInterface
6
-
7
-
8
- @dataclass
9
- class BaseModel(BaseModelInterface):
10
- id: str = field(
11
- default_factory=lambda: str(
12
- uuid.uuid4(),
13
- ),
14
- )
15
-
16
- created_at: datetime = field(
17
- default_factory=datetime.utcnow,
18
- )
19
-
20
- updated_at: datetime = field(
21
- default_factory=datetime.utcnow,
22
- )
@@ -1,6 +0,0 @@
1
- from dataclasses import dataclass
2
-
3
-
4
- @dataclass
5
- class ErrorMessage:
6
- message: str
@@ -1,30 +0,0 @@
1
- from fastapi import FastAPI
2
- from fastapi.middleware.cors import CORSMiddleware
3
-
4
- from architectonics.core.config.application_settings import application_settings
5
-
6
-
7
- class BaseAppFactory:
8
- @classmethod
9
- def create(cls, title) -> FastAPI:
10
- app = FastAPI(
11
- debug=application_settings.DEBUG,
12
- title=title,
13
- docs_url="/docs/",
14
- )
15
-
16
- app.add_middleware(
17
- CORSMiddleware,
18
- allow_origins=["*"],
19
- allow_credentials=True,
20
- allow_methods=["*"],
21
- allow_headers=["*"],
22
- )
23
-
24
- cls._register_app_routes(app)
25
-
26
- return app
27
-
28
- @classmethod
29
- def _register_app_routes(cls, app: FastAPI):
30
- raise NotImplementedError()