Skip to main content

A Wrapper for vacefron.nl/api written in Python.

Project description

PyPi Version Downloads MIT License

VACEfron.py

A Wrapper for vacefron.nl/api written in Python.

Requirements

  • Python 3.6 or above
  • aiohttp (python3 -m pip install -U aiohttp)

Documentation

See the full and detailed docs here

Installation

Install the package by doing one of the following commands:

Using pip (recommended):
  • pip install vacefron.py -U
  • python -m pip install vacefron.py -U

Changelog

See the changelog for each version here

Examples

Generate a Rank card with discord.py:

import vacefron
import json
import discord

from discord.ext import commands

bot = commands.Bot(command_prefix="!")
vac_api = vacefron.Client()

@bot.command()
async def rank(ctx, member: discord.Member):
    member = member or ctx.author
    with open("ranks.json") as f:
        ranks = json.load(f)

    info = ranks[str(member.id)]
    boosting = True if member.premium_since else False
    gen_card = await vac_api.rank_card(
        username = str(member),
        avatar = member.avatar_url_as(format="png"), # converting avatar to .png, including .gif
        level = int(info['level']),
        rank = int(info['rank']),
        current_xp = int(info['current_xp']),
        next_level_xp = 500,
        previous_level_xp = 50,
        xp_color = "123456", # optional
        is_boosting = boosting # optional
        )
    rank_image = discord.File(fp = await gen_card.read(), filename = f"{member.name}_rank.png")
    await ctx.send(f"{member.name}'s rank in {ctx.guild.name}", file = rank_image)

# custom_background, is_boosting and xp_color are optional, see more in the docs.

I can milk you meme with discord.py:

import vacefron
import discord
from discord.ext import commands

bot = commands.Bot(command_prefix="!")
vac_api = vacefron.Client()

@bot.command()
async def icanmilkyou(ctx, face: discord.Member, cow: discord.Member):
    meme = await vac_api.i_can_milk_you(face.avatar_url, cow.avatar_url)
    meme_image = discord.File(fp = await meme.read(), filename = "let_me_milk_you.png")
    await ctx.send(file=meme_image)

Made by

This wrapper is made by Soheab#6240, DM me on Discord or join my Server for anything related to this wrapper.

You can join VAC Efron's server here to suggests something for the API.

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

vacefron.py-1.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

vacefron.py-1.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file vacefron.py-1.1.0.tar.gz.

File metadata

  • Download URL: vacefron.py-1.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for vacefron.py-1.1.0.tar.gz
Algorithm Hash digest
SHA256 542ed688332a89f3d6030aefff9ed6f85266a81f85ce49f77426482979447558
MD5 22de17f93785d6c9e3304e031e8a4613
BLAKE2b-256 2d147ba20f0e5f7429d580db7898eb05518343645e7edc9c47b42d6245f41a5d

See more details on using hashes here.

File details

Details for the file vacefron.py-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: vacefron.py-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for vacefron.py-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bac04cb68205ffb45b11f6f5fdd57b8f94f6da4a32cbf8cb7fd58f6e6c17421
MD5 298e303e6f5bc3d870d56513e28a2e13
BLAKE2b-256 cd9cff131ad06c8cfea3478c1888e7c7573455fbbe8dc6e39160a9cb2033b2a2

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