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

Changes:

  • Added LocalClient
  • Added public documentation
  • Updated __all__ namespace

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

Uploaded Source

Built Distribution

valorant-0.4.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file valorant-0.4.3.tar.gz.

File metadata

  • Download URL: valorant-0.4.3.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2

File hashes

Hashes for valorant-0.4.3.tar.gz
Algorithm Hash digest
SHA256 bcce3df3105f54bafcd9cd95a225bac283c80d563ed933ae75e86b12bfaf3caf
MD5 6e0f77d8cddb304448bd4cab2017f1f0
BLAKE2b-256 be640dc4f80f22403063c6d1aa0df09509bfe8816a6ab85a42e76f85abaf6131

See more details on using hashes here.

File details

Details for the file valorant-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: valorant-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2

File hashes

Hashes for valorant-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5bc0599506eac757d996cf448aadf1cb1f7753bfeb00673aa9af5a0f460da39b
MD5 adf62ff292617cce55101b93480cfcc4
BLAKE2b-256 e2ad7689eda941b0176fbce09f7080ec7713b6f863d5138945fd86483c35afcb

See more details on using hashes here.

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