Skip to main content

Python wrapper for valorant-api.com

Project description

valorant-api

A Python wrapper for valorant-api.com

pypi Downloads

Installation

pip install valorant-api

Usages

# this code is just for reference

from valorant_api import SyncValorantApi, AsyncValorantApi

#sync
api = SyncValorantApi(language="ru-RU")
agents = api.get_agents()

#Async
api = AsyncValorantApi(language="ru-Ru")
agents = await api.get_agents()

# searching
agent = agents.find_where(displayname="Raze", developerName="Gumshoe")
agent = agents.find_first(displayname="Raze")

# agents image generation
from valorant_api import generators

font_file = r"valorant_api\fonts\Valorant Font.ttf"
# initialize class
generator = generators.AgentImageGenerator(font_file)
# generator actual image
image = await generator.generate(agent)
# save the image
image.save("image.png", "PNG")

Agents Image Example

KAY/O

Requirements

  • python-dateutil
  • aiohttp
  • requests
  • Pillow

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

valorant-api-0.1.2.tar.gz (1.6 MB view hashes)

Uploaded Source

Built Distribution

valorant_api-0.1.2-py3-none-any.whl (23.6 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