Skip to main content

No project description provided

Project description

Hi there, I'm

I am a module for using wombo dream ai (neural network of image generation)

There are some changes in the new version of dream, We did not record the last version, so you will have to rewrite your previous code. We apologize for the sincere inconvenience

Mini Documentation
Synchro version
Import
Basic import
from wombo import Dream # sync
dream = Dream(out_msg: str,  max_requests_per_token: int = 30)
# out_msg: Message for response errors from the server
            
Get styles
dream.get_styles() -> StyleModel
# return pydantic model
            
Check task
dream.check_task(self, task_id: str, only_bool: bool = False) -> Union[CheckTask, bool]
# only_bool: If this flag is set, false or True will be returned, depending on the completeness of the task
            
Create task
dream.create_task(self, text: str, style: Union[Style, int] = Style.BASESTYLE) -> CreateTask
# style: Style identifier, yes, too fashionable class, it's on style
            
Generate
dream.generate(text: str, style: Style = Style.BASESTYLE, timeout: int = 60, check_for: int = 3, gif: bool = False)  -> Union[io.BytesIO, CheckTask]
# style: Style identifier, yes, too fashionable class, it's on style
# timeout: The number of seconds after which the task will stop being checked and will throw Timeout error
# check_for: Race in how many seconds to do the check
# gif: Flag, create a gif or not
            
GIF
dream.gif(self, url_list: list) -> io.BytesIO
# url_list: List[str] list of links to images (CheckTask.photo_url_list)
            
Asynchronous version
Import
Basic import
from wombo import AsyncDream # sync
dream = AsyncDream(out_msg: str,  max_requests_per_token: int = 30)
# out_msg: Message for response errors from the server
            
Get styles
await dream.get_styles() -> StyleModel
# return pydantic model
            
Check task
await dream.check_task(self, task_id: str, only_bool: bool = False) -> Union[CheckTask, bool]
# only_bool: If this flag is set, false or True will be returned, depending on the completeness of the task
            
Create task
await dream.create_task(self, text: str, style: Union[Style, int] = Style.BASESTYLE) -> CreateTask
# style: Style identifier, yes, too fashionable class, it's on style
            
Generate
await dream.generate(text: str, style: Style = Style.BASESTYLE, timeout: int = 60, check_for: int = 3, gif: bool = False)  -> Union[io.BytesIO, CheckTask]
# style: Style identifier, yes, too fashionable class, it's on style
# timeout: The number of seconds after which the task will stop being checked and will throw Timeout error
# check_for: Race in how many seconds to do the check
# gif: Flag, create a gif or not
            
GIF
await dream.gif(self, url_list: list, thread: bool = True) -> io.BytesIO
# url_list: List[str] list of links to images (CheckTask.photo_url_list)
# thread: Run the task to create a gif in another thread, so as not to block the program
            
Style
    Style().get_awaible_styles: Getting available styles
    Style.BASESTYLE: Basic style
    Style().{name_style}: Specifying a style, works only after initialization, does not update styles automatically
    

Creditless

Requirements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wombo-0.2.1.tar.gz (10.7 kB view hashes)

Uploaded Source

Built Distribution

wombo-0.2.1-py3-none-any.whl (15.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page