Skip to main content

A package for visualize discord embeds

Project description

Virtual Embed

name CodeFactor

With this api you can get your embeds as image (If you want to create embed visualizer for your bot, this api is for you!)

Installation

pip install virtualembed

Tutorial

If you have discord embed already you can convert into virtualembed

embed = discord.Embed()
embed.title = "test"
embed.description = "test"
embed.add_field(name="Virtual Embeds?", value="Virtual EMBEDSS !!", inline=True)
embed.add_field(name="Whats python?", value="Python IS AWESOME!!", inline=True)


virtualembed = virtualembed_from_embed(e)
# This will return virtualembed object

Lets create Embed Object

embed = VirtualEmbed(title="Virtual Embeds!",
                     description="With this api you can get embeds as images like this!!",
                     color="#fff")

If you say i don't want to make embed sender as Ugly clyde you can do this

embed.bot_name = "Your bot Name"
embed.bot_avatar = "Avatar url"

Lets add some fields because it looks empty

embed.add_field("Embed Fields Are", "SO COOOOL!", True)
embed.add_field("Also Inline Support", "Aweeeesome", True)

Who doesn't want images on embeds

embed.set_author("Python Is Awesome",
                 icon_url="https://berkayyildiz.com/wp-content/uploads/2018/06/opengraph-icon-200x200.png")
                 
embed.set_thumbnail("https://berkayyildiz.com/wp-content/uploads/2018/06/opengraph-icon-200x200.png")
embed.set_image("https://berkayyildiz.com/wp-content/uploads/2018/06/opengraph-icon-200x200.png")

At Total

embed = VirtualEmbed(title="Virtual Embeds!",
                     description="With this api you can get embeds as images like this!!",
                     color="#fff")
                     
embed.add_field("Embed Fields Are", "SO COOOOL!", True)
embed.add_field("Also Inline Support", "Aweeeesome", True)

embed.set_author("Python Is Awesome",
                 icon_url="https://berkayyildiz.com/wp-content/uploads/2018/06/opengraph-icon-200x200.png")
                 
embed.set_thumbnail("https://berkayyildiz.com/wp-content/uploads/2018/06/opengraph-icon-200x200.png")
embed.set_image("https://berkayyildiz.com/wp-content/uploads/2018/06/opengraph-icon-200x200.png")
We created our first embed, now lets see how can we use this object

With this line you can get your image object

embed_img = embed.get_embed_as_image()

To save our image

embed_img.save_img("path/to/example_embed.png")
# Save embed to target path

Or i just want to get as bytes

embed_img.get_buffer()
# This will return BytesIO object

Final Result

Virtual Embed Is Awesome

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

virtualembed-0.0.10.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

virtualembed-0.0.10-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file virtualembed-0.0.10.tar.gz.

File metadata

  • Download URL: virtualembed-0.0.10.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for virtualembed-0.0.10.tar.gz
Algorithm Hash digest
SHA256 1ed17cf9d0191ba8bc9a577c56dc6fca0d602c4831d23236093f4cca54d05413
MD5 dba8394ef0f32307b0608f4f748916ca
BLAKE2b-256 5abf1aabaff67890e9b0c33c0a9bcf93f2aaeb215602124b521db7147e0c37a0

See more details on using hashes here.

File details

Details for the file virtualembed-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: virtualembed-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for virtualembed-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 91ef2368f84db34f75a92294619caca7a712144cd2e77ce21d9a976438441b82
MD5 1d4710556bcce618bced9213317c55ce
BLAKE2b-256 cb89d79125fd0b0a63233908f07e04c0fb65a4db3571f6ca882e37f44ac2a7a4

See more details on using hashes here.

Supported by

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