rb-commons 0.1.2__py3-none-any.whl → 0.1.4__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.
@@ -3,22 +3,22 @@ from typing import Optional
3
3
  from pydantic_settings import BaseSettings
4
4
 
5
5
  class CommonConfigs(BaseSettings):
6
- service_name: str = None
7
- service_port: int = None
8
- service_id: str = None
9
- service_hostname: str = '127.0.0.1'
10
- service_host: str = None
6
+ service_name: Optional[str] = None
7
+ service_port: Optional[int] = None
8
+ service_id: Optional[str] = None
9
+ service_hostname: Optional[str] = '127.0.0.1'
10
+ service_host: Optional[str] = None
11
11
 
12
- consul_host: str = '127.0.0.1'
13
- consul_port: int = 8888
12
+ consul_host: Optional[str] = '127.0.0.1'
13
+ consul_port: Optional[int] = 8888
14
14
 
15
15
  # db
16
- POSTGRES_HOST: str = None
17
- POSTGRES_USER: str = None
18
- POSTGRES_PORT: int = None
19
- POSTGRES_PASSWORD: str = None
20
- POSTGRES_DB: str = None
21
- DB_ALEMBIC_URL: str = None
16
+ POSTGRES_HOST: Optional[str] = None
17
+ POSTGRES_USER: Optional[str] = None
18
+ POSTGRES_PORT: Optional[int] = None
19
+ POSTGRES_PASSWORD: Optional[str] = None
20
+ POSTGRES_DB: Optional[str] = None
21
+ DB_ALEMBIC_URL: Optional[str] = None
22
22
 
23
23
  @property
24
24
  def database_url(self) -> Optional[str]:
File without changes
@@ -0,0 +1,13 @@
1
+ import uuid
2
+ from enum import Enum
3
+ from pydantic import BaseModel
4
+
5
+ class UserRole(str, Enum):
6
+ ADMIN = "admin"
7
+ CUSTOMER = "customer"
8
+ GUEST = "guest"
9
+
10
+ class Claims(BaseModel):
11
+ user_id: str = None
12
+ user_role: UserRole = UserRole.GUEST
13
+ shop_id: uuid.UUID = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rb-commons
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Commons of project and simplified orm based on sqlalchemy.
5
5
  Home-page: https://github.com/Abdulvoris101/rb-commons
6
6
  Author: Abdulvoris
@@ -0,0 +1,12 @@
1
+ rb_commons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ rb_commons/configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ rb_commons/configs/config.py,sha256=tpqC1V9PXx88m0N5L13WqkoalPUk6SthjxgL_lmf-lE,1439
4
+ rb_commons/orm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ rb_commons/orm/exceptions.py,sha256=1aMctiEwrPjyehoXVX1l6ML5ZOhmDkmBISzlTD5ey1Y,509
6
+ rb_commons/orm/managers.py,sha256=VopUw29sCXrPTriBALR9qwkG5yCu6BDHRgR7cCygNiE,6726
7
+ rb_commons/schemes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ rb_commons/schemes/jwt.py,sha256=-8lSTpzpeZ3yKqJyDqVZso4YdiSFgBew4a4Ilu_P9ic,293
9
+ rb_commons-0.1.4.dist-info/METADATA,sha256=OHBoBJvOUEqURN4wyr6ABaUynF8DSNHeHYspznEWfo4,6276
10
+ rb_commons-0.1.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
11
+ rb_commons-0.1.4.dist-info/top_level.txt,sha256=HPx_WAYo3_fbg1WCeGHsz3wPGio1ucbnrlm2lmqlJog,11
12
+ rb_commons-0.1.4.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- rb_commons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- rb_commons/configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- rb_commons/configs/config.py,sha256=2i5DPn-JmlDpQvIkfJ3Ck5BoWNqz0qqRjK9qE6PkuWw,1309
4
- rb_commons/orm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- rb_commons/orm/exceptions.py,sha256=1aMctiEwrPjyehoXVX1l6ML5ZOhmDkmBISzlTD5ey1Y,509
6
- rb_commons/orm/managers.py,sha256=VopUw29sCXrPTriBALR9qwkG5yCu6BDHRgR7cCygNiE,6726
7
- rb_commons-0.1.2.dist-info/METADATA,sha256=LTZcAZ4Ouxoai-9o9xY1y8fU_qZpMu_P3QDMG_nI-bY,6276
8
- rb_commons-0.1.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
9
- rb_commons-0.1.2.dist-info/top_level.txt,sha256=HPx_WAYo3_fbg1WCeGHsz3wPGio1ucbnrlm2lmqlJog,11
10
- rb_commons-0.1.2.dist-info/RECORD,,