Skip to content

Async python library for interacting with Fortnite's API and XMPP services.

License

Notifications You must be signed in to change notification settings

klldtest/fortnitepy-edit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fortnitepy-edit

Supported py versions Current pypi version

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 git+https://github.com/klldtest/fortnitepy-edit
py -3 -m pip install -U fortnitepy-edit

# linux
python3 -m pip install -U git+https://github.com/klldtest/fortnitepy-edit
python3 -m pip install -U fortnitepy-edit

Basic usage

import fortnitepy
import asyncio

from fortnitepy.ext import commands

async def main():
    bot = commands.Bot(
        command_prefix='!',
        auth=fortnitepy.DeviceCodeAuth()
    )

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

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

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

    await bot.start()

if __name__ == "__main__":
    asyncio.run(main())