schemas.py 664 B

12345678910111213141516171819
  1. from pydantic import BaseModel, Field
  2. class S3Config(BaseModel):
  3. """S3 config
  4. """
  5. bucket_name: str = Field(description='s3 bucket name', min_length=1)
  6. access_key: str = Field(description='s3 access key', min_length=1)
  7. secret_key: str = Field(description='s3 secret key', min_length=1)
  8. endpoint_url: str = Field(description='s3 endpoint url', min_length=1)
  9. addressing_style: str = Field(description='s3 addressing style', default='auto', min_length=1)
  10. class PageInfo(BaseModel):
  11. """The width and height of page
  12. """
  13. w: float = Field(description='the width of page')
  14. h: float = Field(description='the height of page')