schemas.py 714 B

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