fusionsid package

Submodules

fusionsid.image module

class fusionsid.image.BaseImage(image_bytes=None)[source]

Bases: object

save(path : str) : Saves the file to a path
async pil() PIL.Image.Image[source]

Converts the image to a PIL.Image.Image object and returns it

Return type

PIL.Image.Image

async save(path: str) None[source]

Saves an image

async save_bytesio() _io.BytesIO[source]

Saves the image to BytesIO

Return type

BytesIO

async show() None[source]

Shows an image

class fusionsid.image.FontImage(image_bytes)[source]

Bases: fusionsid.image.BaseImage

created_at(datetime)
Type

The time when the class was made

class fusionsid.image.GenerateMeme[source]

Bases: object

async classmethod abandon(text: str) fusionsid.image.Meme[source]

Generates the abandon meme

Parameters

(str) (text) –

Return type

Meme

async classmethod aborted(image_url: str) fusionsid.image.Meme[source]

Generates the aborted meme

Parameters

(str) (image_url) –

Return type

Meme

async classmethod affect(image_url: str) fusionsid.image.Meme[source]

Generates the aborted meme

Parameters

(str) (image_url) –

Return type

Meme

async classmethod armor(text: str) fusionsid.image.Meme[source]

Generates the armor meme

Parameters

(str) (text) –

Return type

Meme

async classmethod balloon(balloon_text: str, arrow_text: str) fusionsid.image.Meme[source]

Generates the balloon meme

Parameters
  • (str) (arrow_text) –

  • (str)

Return type

Meme

async classmethod bongocat(image_url: str) fusionsid.image.Meme[source]

Generates the bongocat meme

Parameters

(str) (image_url) –

Return type

Meme

async classmethod boo(text_1: str, text_2: str) fusionsid.image.Meme[source]

Generates the boo meme

Parameters
  • (str) (text_2) –

  • (str)

Return type

Meme

async classmethod brain(text_1: str, text_2: str, text_3: str, text_4: str) fusionsid.image.Meme[source]

Generates the brain meme

Parameters
  • (str) (text_4) –

  • (str)

  • (str)

  • (str)

Return type

Meme

async classmethod brazzers(image_url: str) fusionsid.image.Meme[source]

Generates the brazzers meme

Parameters

(str) (image_url) –

Return type

Meme

async classmethod change_my_mind(text: str) fusionsid.image.Meme[source]

Generates the change my mind meme

Parameters

(str) (text) –

Return type

Meme

async classmethod delete(image_url: str) fusionsid.image.Meme[source]

Generates the delete meme

Parameters

(str) (image_url) –

Return type

Meme

async classmethod expanding_wwe(text_1: str, text_2: str, text_3: str, text_4: str, text_5: str) fusionsid.image.Meme[source]

Generates the expanding wwe meme

Parameters
  • (str) (text_5) –

  • (str)

  • (str)

  • (str)

  • (str)

Return type

Meme

async classmethod gun(image_url: str) fusionsid.image.Meme[source]

Generates the gun meme

Parameters

(str) (image_url) –

Return type

Meme

async classmethod surprised(text: str) fusionsid.image.Meme[source]

Generates the surprised meme

Parameters

(str) (text) –

Return type

Meme

async classmethod trash(image_url: str) fusionsid.image.Meme[source]

Generates the trash meme

Parameters

(str) (image_url) –

Return type

Meme

async classmethod violence(text: str) fusionsid.image.Meme[source]

Generates the violence meme

Parameters

(str) (text) –

Return type

Meme

async classmethod wanted(image_url: str) fusionsid.image.Meme[source]

Generates the wanted meme

Parameters

(str) (image_url) –

Return type

Meme

class fusionsid.image.Image[source]

Bases: object

random_meme()[source]
qrcode(url: str)[source]
get_colors(filepath: str, show_hex: bool = True)[source]
async classmethod font_convert(text: str, font_name: str, color: str = 'black') fusionsid.image.FontImage[source]

Converts text to a font you choose

Parameters
  • (str) (font_name) –

  • (str) – Use the Image.font_list() function to get a list of them

  • (str (color) –

  • Optional) (The color of the text, Defaults to black) –

Returns

:class:`FontImage`

Return type

The image of the font

async classmethod font_list(print_all: bool = False) list[source]

Prints a list of all the fonts that the api supports converting to

Parameters
  • (bool (print_all) –

  • Optional) (setting this to true will print all the fonts in console) –

Returns

:class:`List`

Return type

The list of fonts

async classmethod get_colors(filepath: str, show_hex=True) dict[source]

Gets the most dominant color and color palette of an image

Parameters
  • (str) (filepath) –

  • (bool) (show_hex) –

Example

>>> await Image.get_colors("snail.png", False)
async classmethod qrcode(url: str) fusionsid.image.QRCode[source]

Generates a qr code

Returns

:class:`QRCode`

Return type

The qrcode

async classmethod random_meme() fusionsid.image.RandomMeme[source]

Gets a random meme from the subreddit: r/memes

Returns

:class:`RandomMeme`

Return type

The meme

class fusionsid.image.Meme(image_bytes)[source]

Bases: fusionsid.image.BaseImage

created_at(datetime)
Type

The time when the class was made

class fusionsid.image.QRCode(url, image_bytes)[source]

Bases: fusionsid.image.BaseImage

Example

>>> qrcode = Image.qrcode("https://google.com")
>>> await meme.save('qrcode.png')

url (str) : The url that your making the meme for image_bytes (bytes) : The image in bytes created_at (datetime) : The time when the class was made

class fusionsid.image.RandomMeme(json, image_bytes)[source]

Bases: fusionsid.image.BaseImage

Example

>>> meme = await Image.random_meme()
>>> await meme.save('meme.png')

image_bytes (bytes) : The image in bytes title (str) : Title of the post upvotes (str) : How many upvotes the meme has author (str) : Author of the meme url (str) : Url to the reddit post ext (str) : The file extension (eg: png) json (Dict) : The json response from the api created_at (datetime.datetime) : The time when the class was made

property author: str

Author of the post

property ext: str

The file extension

property title: str

The title of the meme

property upvotes: str

How many upvotes the meme has

property url: str

Url to the reddit post

fusionsid.decorators module

class fusionsid.decorators.Decorators[source]

Bases: object

classmethod compliment(*args, **kwargs)[source]

Compliment Decorator Putting this above a function will print a compliment before the function is run

```

compliment = Decorators.compliment

@compliment() async def main():

pass

```

classmethod dare(*args, **kwargs)[source]

Dare Decorator Putting this above a function will print a dare before the function is run

```

dare = Decorators.dare

@dare() async def main():

pass

```

classmethod fact(*args, **kwargs)[source]

Fact Decorator Putting this above a function will print a fact before the function is run

```

fact = Decorators.fact

@fact() async def main():

pass

```

classmethod roast(*args, **kwargs)[source]

Roast Decorator Putting this above a function will print a roast before the function is run

```

roast = Decorators.roast

@roast() async def main():

pass

```

classmethod truth(*args, **kwargs)[source]

Truth Decorator Putting this above a function will print a truth before the function is run

```

truth = Decorators.truth

@truth() async def main():

pass

```

fusionsid.fun module

class fusionsid.fun.Fun[source]

Bases: object

eightball() : 8ball
roast() : Returns a roast
compliment() : Returns a complement
truth() : Returns a truth
dare() : Returns a dare
truth_or_dare() : Returns a Dict with a truth, dare and random choice
fact() : Returns a fact
wordle() : Gets the wordle answer for today
reddit_search(keyword : str) : Searches reddit
async classmethod compliment() str[source]

Example

>>> print(await Fun.compliment())
async classmethod dare() str[source]

Example

>>> print(await Fun.dare())
async classmethod eightball() str[source]

Example

>>> print(await Fun.eightball())
async classmethod fact() str[source]

Example

>>> print(await Fun.fact())
Parameters

:param keyword (str) : The search query to search on reddit

Example

>>> print(await Fun.reddit_search(keyword="Meme"))
async classmethod roast() str[source]

Example

>>> print(await Fun.roast())
async classmethod truth() str[source]

Example

>>> print(await Fun.truth())
async classmethod truth_or_dare() Dict[str, str][source]

Example

>>> print(await Fun.truth_or_dare())
async classmethod wordle() str[source]

Example

>>> print(await Fun.wordle())

fusionsid.text module

class fusionsid.text.Text[source]

Bases: object

text_to_binary(text : str) : Converts text to binary
text_to_hex(text : str) : Converts text to hex
binary_to_text(binary : str) : Converts binary to text
hex_to_text(hex : str) : Converts hex to text
hash(text : str) : Hashes text
password(text : str, length : str = None) : Generates a password
expand(text : str) : Expands Text
drunkify(text : str) : Drunkifies Text
reverse(text : str) : Reverses Text
async classmethod binary_to_text(binary: str) Dict[source]
Parameters

(str) (binary) –

Example

>>> print(await Text.text_to_binary(binary=""))
async classmethod drunkify(text: str) Dict[source]
Parameters

(str) (text) –

Example

>>> print(await Text.drunkify(text="Hello"))
async classmethod expand(text: str, space: int = 5) Dict[source]
Parameters
  • (str) (text) –

  • Optional) (space (str) –

Example

>>> print(await Text.expand(text="Hello", space=5))
async classmethod hash(text: str) Dict[source]
Parameters

(str) (text) –

Example

>>> print(await Text.hash(text="Hello"))
async classmethod hex_to_text(hex: str) Dict[source]
Parameters

(str) (hex) –

Example

>>> print(await Text.hext_to_text(hex=""))
async classmethod password(text: str, length: int = 8) Dict[source]
Parameters
  • (str) (text) –

  • Optional) (length (int) –

Example

>>> print(await Text.password(text="Hello", length=8))
async classmethod reverse(text: str) Dict[source]
Parameters

(str) (text) –

Example

>>> print(await Text.reverse(text="Hello"))
async classmethod text_to_binary(text: str) Dict[source]
Parameters

(str) (text) –

Example

>>> print(await Text.text_to_binary(text="Hello"))
async classmethod text_to_hex(text: str) Dict[source]
Parameters

(str) (text) –

Example

>>> print(await Text.text_to_hex(text="Hello"))

fusionsid.filter module

class fusionsid.filter.Filter[source]

Bases: object

async classmethod blur(image_url: str, amount: int = 5)[source]

Puts a blur filter on an image

Parameters

(str) (image_url) –

Return type

FilteredImage

async classmethod color(image_url: str, color: Literal['red', 'green', 'blue', 'purple', 'pink', 'yellow', 'grey', 'sepia'])[source]

Puts a color filter on an image

Parameters
  • (str) (image_url) –

  • (Literal["red" (color) –

  • "green" (The color of the filter) –

  • "blue" (The color of the filter) –

  • "purple" (The color of the filter) –

  • "pink" (The color of the filter) –

  • "yellow" (The color of the filter) –

  • "grey" (The color of the filter) –

  • "sepia"]) (The color of the filter) –

Return type

FilteredImage

async classmethod grey_scale(image_url: str)[source]

Puts a greyscale filter on an image

Parameters

(str) (image_url) –

Return type

FilteredImage

class fusionsid.filter.FilteredImage(image_bytes)[source]

Bases: fusionsid.image.BaseImage

The filtered image

fusionsid.http module

class fusionsid.http.HTTPClient[source]

Bases: object

async get_image(url) bytes[source]

This function makes a get request to a url and returns the image

Parameters

url (str) : The url to make a request to

Returns

The image

Return type

bytes

async get_json(url) Dict[source]

This function makes a GET request to a url and returns the json

Parameters

url (str) : The url to make a request to data (Dict, optional) : This is a dictionary of any extra params to send the request

Returns

The json response

Return type

Dict

async get_url_image(url) bytes[source]

This function makes a get request to a url and returns the image

Parameters

(str) (url) –

Returns

:class:`bytes`

Return type

The image

async get_url_json(url) Dict[source]

This function makes a GET request to a url and returns the json

Parameters

url (str) : The url to make a request to data (Dict, optional) : This is a dictionary of any extra params to send the request

Returns

The json response

Return type

Dict

fusionsid.errors module

exception fusionsid.errors.Error[source]

Bases: Exception

Base class for other exceptions

err

alias of Exception

exception fusionsid.errors.ImageNotGenerated[source]

Bases: fusionsid.errors.Error

Raised when image is not generated

Module contents

async fusionsid.endpoints(json=False) dict[source]

List of api endpoints

Returns

Dict

async fusionsid.stats(json=False) dict[source]

Stats about the api

Returns

Dict