All Projects → EthanC → CallofDuty.py

EthanC / CallofDuty.py

Licence: MIT license
Asynchronous, object-oriented Python wrapper for the Call of Duty API.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to CallofDuty.py

Jekyll
Call of Duty XAsset exporter that dumps raw assets from a game's memory.
Stars: ✭ 29 (-66.28%)
Mutual labels:  cod, black-ops, call-of-duty, wwii, cold-war, modern-warfare, infinite-warfare
cod-api
A thin Call of Duty API wrapper written in TypeScript
Stars: ✭ 40 (-53.49%)
Mutual labels:  cod, call-of-duty, callofduty, wwii
Hyde
Call of Duty XAsset compiler that transforms raw assets into digestible data.
Stars: ✭ 15 (-82.56%)
Mutual labels:  cod, call-of-duty, modern-warfare
zonetool
zonetool, a fastfile linker for various Call of Duty titles.
Stars: ✭ 98 (+13.95%)
Mutual labels:  cod, call-of-duty, callofduty
iw6x-client
Modification for IW6
Stars: ✭ 178 (+106.98%)
Mutual labels:  cod, call-of-duty, callofduty
piw5 bot warfare
The Bot Warfare mod for PlutoniumIW5
Stars: ✭ 57 (-33.72%)
Mutual labels:  cod, call-of-duty, callofduty
CoD-SCZ-FoV-Changer
A non-multiplayer field of view changer for various Call of Duty games which also works for online co-op.
Stars: ✭ 48 (-44.19%)
Mutual labels:  cod, black-ops
FCommunity
multi Checkers (Hma/Hulu/Spotify/Call of duty/Instagram/smtp2go/VyprVpn) in One Tool Named FCommunity
Stars: ✭ 26 (-69.77%)
Mutual labels:  cod, call-of-duty
blender-cod
Blender Add-On for Call of Duty® modding
Stars: ✭ 53 (-38.37%)
Mutual labels:  cod, call-of-duty
Globjects
C++ library strictly wrapping OpenGL objects.
Stars: ✭ 431 (+401.16%)
Mutual labels:  wrapper, object-oriented
MojangSharp
A C# wrapper library for Mojang API (no longer actively maintained)
Stars: ✭ 38 (-55.81%)
Mutual labels:  wrapper, asynchronous
Shift
Light-weight EventKit wrapper.
Stars: ✭ 31 (-63.95%)
Mutual labels:  wrapper, asynchronous
Pokeapi Js Wrapper
PokeAPI browser wrapper, fully async with built-in cache
Stars: ✭ 129 (+50%)
Mutual labels:  wrapper, asynchronous
Radon
Object oriented state management solution for front-end development.
Stars: ✭ 80 (-6.98%)
Mutual labels:  asynchronous, object-oriented
open-iw5
Experimental MW3 singleplayer & multiplayer client
Stars: ✭ 59 (-31.4%)
Mutual labels:  cod, call-of-duty
core.horse64.org
THIS IS A MIRROR, CHECK https://codeberg.org/Horse64/core.horse64.org
Stars: ✭ 3 (-96.51%)
Mutual labels:  asynchronous, object-oriented
duckpy
A simple Python library for searching on DuckDuckGo.
Stars: ✭ 20 (-76.74%)
Mutual labels:  asynchronous, httpx
Nerf-Gun-Call-of-Duty-Warzone-Controller
DIY Call of Duty Warzone controller built using a nerf gun powered by the Raspberry Pi 4.
Stars: ✭ 18 (-79.07%)
Mutual labels:  cod, call-of-duty
fs2-ssh
A wrapper around Apache SSHD targeting cats-effect and fs2
Stars: ✭ 36 (-58.14%)
Mutual labels:  wrapper
async
Asynchronous drain for slog-rs v2
Stars: ✭ 23 (-73.26%)
Mutual labels:  asynchronous

CallofDuty.py

CallofDuty.py

CallofDuty.py is an asynchronous, object-oriented Python wrapper for the Call of Duty API.

Features

  • Asynchronous and Pythonic using async and await
  • Type checks and editor completion using Type Hints
  • Object-oriented and predictable abstractions

Usage

Construct a new Call of Duty client, then use the various services on the client to access different parts of the Call of Duty API.

Installation

CallofDuty.py requires Python 3.10 or greater. Once this requirement is met, simply install CallofDuty.py!

pip install callofduty.py

# or

poetry add callofduty.py

Example

The following is a complete example which demonstrates:

  • Authenticating with the Call of Duty API
  • Searching for a user
  • Listing the first 3 search results
  • Getting the Modern Warfare Multiplayer profile of the second result
  • Displaying their basic statistics
import asyncio

import callofduty
from callofduty import Mode, Platform, Title


async def main():
    client = await callofduty.Login("[email protected]", "YourPassword")

    results = await client.SearchPlayers(Platform.Activision, "Captain Price", limit=3)
    for player in results:
        print(f"{player.username} ({player.platform.name})")

    me = results[1]
    profile = await me.profile(Title.ModernWarfare, Mode.Multiplayer)

    level = profile["level"]
    kd = profile["lifetime"]["all"]["properties"]["kdRatio"]
    wl = profile["lifetime"]["all"]["properties"]["wlRatio"]

    print(f"\n{me.username} ({me.platform.name})")
    print(f"Level: {level}, K/D Ratio: {kd}, W/L Ratio: {wl}")

asyncio.get_event_loop().run_until_complete(main())

Releases

CallofDuty.py follows Semantic Versioning for tagging releases of the project.

Changelogs can be found on the Releases page and follow the Keep a Changelog format.

Contributing

The goal is to cover the entirety of the Call of Duty API, so contributions are always welcome. The calling pattern is pretty well-established, so adding new methods is relatively straightforward. See CONTRIBUTING.md for details.

Thanks & Credits

  • Tustin - Call of Duty API Authorization Flow
  • Activision - Call of Duty Logo & API Service
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].