valorant.py
is an unofficial API wrapper for Riot Games' Valorant API endpoints. It's modern, easy to use, feature-rich, and intuitive! Implemented with object oriented designs and explicit reloads to prevent 429
s, valorant.py is the best Valorant API wrapper out there!
Most recent version: 0.5.1
(๐)
Changes:
- Internal redesign of HTTP requests
- Updates to error handling for Client and AsyncClient
- A few more bug fixes (๐)
- References: #24, #20,
#23, #26
Coming Soon: Endpoint coverage for matches!
Manager | Command |
---|---|
PIP | pip install valorant |
Poetry | python -m poetry add valorant |
Easy Install | easy_install valorant |
Quickstart:
import valorant
KEY = "RGAPI-Key-Here"
client = valorant.Client(KEY)
agents = client.get_characters()
for agent in agents:
print(agent.name)
Asynchronous Client:
import valorant
KEY = "RGAPI-Key-Here"
client = valorant.AsyncClient(KEY)
async def _main():
agents = await client.get_characters()
for agent in agents:
print(agent.name)
valorant.run(_main())
Local Client:
This is intended for use with the game locally. Eases the use of doing things like getting live match data, chat sessions, friend requests, etc. Doesn't need an access key. The current Local Client is a work-in-progress and is unstable.
import valorant
client = valorant.LocalClient()
print(client.get_session())
The public API documentation for valorant.py
is hosted here
.
If you're making edits to the documentation, you can generate the HTML and start a local server by running bash bin/docs.sh
in the repository directory. This requires Ruby
2.5 or higher (Sorry if you have to install Ruby just to edit the docs =P).
- Fork the repository:
Fork
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -a -m 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request! ๐
You can also re-create these steps with GitHub Desktop, Visual Studio Code, or whatever git
version control UI you prefer. You don't have to, but I use prefixes for all my commits (i.e โจ: add asyncio run to package namespace
). I have a personal style guide that I use, which you can find here
.
Thanks for taking the time to check out valorant.py
! ๐