All Projects → Terbau → fortnitepy

Terbau / fortnitepy

Licence: MIT license
Async python library for interacting with Fortnite's API and XMPP services.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to fortnitepy

fortnite-basic-api
Basic Fortnite API for stats with async/await, and basic communicator
Stars: ✭ 46 (-61.02%)
Mutual labels:  fortnite, fortnite-stats
node-epicgames-fortnite-client
Unofficial javascript client for Fortnite.
Stars: ✭ 55 (-53.39%)
Mutual labels:  fortnite, fortnite-stats
game apis
This repository is for integrating with different apis to allow you to pull player or game data
Stars: ✭ 24 (-79.66%)
Mutual labels:  fortnite, fortnite-stats
Ezfn Lobbybot
With EasyFNBot you can easily create you own Fortnite Lobby Bot in less than 5 minutes which will be online forever!
Stars: ✭ 6,875 (+5726.27%)
Mutual labels:  fortnite
FortniteLauncher
Fortnite Launcher which bypasses EAC that is designed to work on any update without breaking (kinda)!
Stars: ✭ 19 (-83.9%)
Mutual labels:  fortnite
fnbr.js
A library to interact with Epic Games' Fortnite HTTP and XMPP services
Stars: ✭ 73 (-38.14%)
Mutual labels:  fortnite
EpicResearch
Research about Epic Games' non-documented API
Stars: ✭ 181 (+53.39%)
Mutual labels:  fortnite
FortniteApi
An C# client library for the TrackerNetwork Fortnite API.
Stars: ✭ 15 (-87.29%)
Mutual labels:  fortnite
Fortnite-Forcer
A easy to use anti-cheat switcher for Fortnite written in C#.
Stars: ✭ 19 (-83.9%)
Mutual labels:  fortnite
Fortnite-LobbyBot
No description or website provided.
Stars: ✭ 38 (-67.8%)
Mutual labels:  fortnite
fn-rate
🌠 Rate the skins of Fortnite and see what skins are most appreciated!
Stars: ✭ 14 (-88.14%)
Mutual labels:  fortnite
Monotone-HWID-Spoofer
Custom Created Hardware ID Spoofer to Bypass Hardware or IP Bans
Stars: ✭ 145 (+22.88%)
Mutual labels:  fortnite
EpicGraphQL
Research about the Epic's non-documented Graphql API and main API, using Fiddler and Developer Tools to find requests and add them.
Stars: ✭ 22 (-81.36%)
Mutual labels:  fortnite
FortniteReplayDecompressor
Read Fortnite replay files
Stars: ✭ 68 (-42.37%)
Mutual labels:  fortnite
stw-daily
Discord bot that collects Fortnite: STW daily rewards, research points, and more using an auth token.
Stars: ✭ 27 (-77.12%)
Mutual labels:  fortnite
Fortnite-LobbyBot
Uses JavaScript to emulate a Fortnite client and can join parties through HTTP and change skins / emotes visually.
Stars: ✭ 20 (-83.05%)
Mutual labels:  fortnite
python-fortnite-api-wrapper
The Python Fortnite API Wrapper
Stars: ✭ 42 (-64.41%)
Mutual labels:  fortnite
NeoniteV2
Neonite V2 - An open-source Fortnite lobby emulator, written in JavaScript.
Stars: ✭ 136 (+15.25%)
Mutual labels:  fortnite
FortniteTracker
🔎 A tracker for the various Fortnite Files
Stars: ✭ 32 (-72.88%)
Mutual labels:  fortnite
Everybody-dance-now
Implementation of paper everybody dance now for Deep learning course project
Stars: ✭ 22 (-81.36%)
Mutual labels:  fortnite

fortnitepy

Supported py versions Current pypi version Donate link

Asynchronous library for interacting with Fortnite and EpicGames' API and XMPP services.

Note: This library is still under developement so breaking changes might happen at any time.

Some key features:

  • Full support for Friends.
  • Support for XMPP events including friend and party messages + many more.
  • Support for Parties.
  • Support for Battle Royale stats.

Documentation

https://fortnitepy.readthedocs.io/en/latest/

Installing

# windows
py -3 -m pip install -U fortnitepy

# linux
python3 -m pip install -U fortnitepy

Basic usage

import fortnitepy
import json
import os

from fortnitepy.ext import commands

email = '[email protected]'
password = 'password1'
filename = 'device_auths.json'

def get_device_auth_details():
    if os.path.isfile(filename):
        with open(filename, 'r') as fp:
            return json.load(fp)
    return {}

def store_device_auth_details(email, details):
    existing = get_device_auth_details()
    existing[email] = details

    with open(filename, 'w') as fp:
        json.dump(existing, fp)

device_auth_details = get_device_auth_details().get(email, {})
bot = commands.Bot(
    command_prefix='!',
    auth=fortnitepy.AdvancedAuth(
        email=email,
        password=password,
        prompt_authorization_code=True,
        prompt_code_if_invalid=True,
        delete_existing_device_auths=True,
        **device_auth_details
    )
)

@bot.event
async def event_device_auth_generate(details, email):
    store_device_auth_details(email, details)

@bot.event
async def event_ready():
    print('----------------')
    print('Bot ready as')
    print(bot.user.display_name)
    print(bot.user.id)
    print('----------------')

@bot.event
async def event_friend_request(request):
    await request.accept()

@bot.command()
async def hello(ctx):
    await ctx.send('Hello!')

bot.run()

Authorization

How to get a one time authorization code:

  1. Log into the epic games account of your choice here.
  2. Copy the hex part from the url that shows up as showcased by the image below:

Authorization Code

Credit

Thanks to Kysune, iXyles, Vrekt and amrsatrio for ideas and/or work that this library is built upon.

Also thanks to discord.py for much inspiration code-wise.

Need help?

If you need more help feel free to join this discord server.

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