https://github.com/minshug/valorant-api
Sync/Async Python wrapper for valorant-api.com
https://github.com/minshug/valorant-api
api-wrapper python valorant valorant-api
Last synced: 3 months ago
JSON representation
Sync/Async Python wrapper for valorant-api.com
- Host: GitHub
- URL: https://github.com/minshug/valorant-api
- Owner: MinshuG
- License: mit
- Created: 2021-02-14T07:22:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-01T16:53:45.000Z (about 3 years ago)
- Last Synced: 2024-11-16T18:21:00.402Z (8 months ago)
- Topics: api-wrapper, python, valorant, valorant-api
- Language: Python
- Homepage:
- Size: 2.21 MB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# valorant-api
A Python wrapper for valorant-api.com[](https://pypi.python.org/pypi/valorant-api/)
[](https://pepy.tech/project/valorant-api)# Installation
`pip install valorant-api`
# Usages
```py
# this code is just for referencefrom 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 generatorsfont_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# Requirements
* python-dateutil
* aiohttp
* requests
* Pillow