Skip to main content

An unofficial synchronous client package for interacting with Riot Games' Valorant API endpoints.

Project description

valorant.py

GitHub Actions valorant on PyPI Downloads License Code style: black Contribute

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 429s, valorant.py is the best Valorant API wrapper out there!

Updates

Most recent version: 0.4.3

Changes: just some bug hotfixes

Installation

Manager Command
PIP pip install valorant
Poetry python -m poetry add valorant
Easy Install easy_install valorant

Usage

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())

Documentation

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).

Contributing

  1. Fork the repository: Fork
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -a -m 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. 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.

Final Note

Thanks for taking the time to check out valorant.py! 🎉

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-0.5.0.tar.gz (9.3 kB view hashes)

Uploaded Source

Built Distribution

valorant-0.5.0-py3-none-any.whl (9.7 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