fortnite-python
Python wrapper for http://fortnitetracker.com/ api.
Installation
You can install it via pip
pip install fortnite-python
Usage
You need to register for an api key at https://fortnitetracker.com/site-api
Then it's just easy as:
from fortnite_python import Fortnite
fortnite = Fortnite('Given api key')
Retrieving a player:
>>> from fortnite_python import Fortnite
>>> fortnite = Fortnite('Given api key')
>>> player = fortnite.player('playername')
player
<Player 20a8fafaa-6chfj-6455-b715-2424fff pc>
The default platform is PC, if you want to use a diferent platform you should do it this way:
>>> from fortnite_python import Fortnite
>>> from fortnite_python.domain import Platform
>>> fortnite = Fortnite('Given api key')
>>> player = fortnite.player('playername', Platform.XBOX)
>>> player
<Player 20a8fafaa-6chfj-6455-b715-2424fff xbox>
You can check the available platforms here
Retrieving player stats:
>>> from fortnite_python import Fortnite
>>> from fortnite_python.domain import Mode
>>> fortnite = Fortnite('Given api key')
>>> player = fortnite.player('playername')
>>> stats = player.get_stats(Mode.DUO)
>>> stats.top1
'10'
>>> stats.top3
'20'
You can check the available modes here
Getting matches data:
When calling matches you have to pass the player id and the number of matches you want (from 1 to 50)
>>> player = fortnite.player('playername')
<Player 20a8fafaa-6chfj-6455-b715-2424fff pc>
>>> fortnite.matches(player.id, 5)
[<Match 806686859>, <Match 806611889>, <Match 806602331>, <Match 806532871>,
<Match 806522998>]
Retrieving the current Challenges:
>>> from fortnite_python import Fortnite
>>> fortnite = Fortnite('Given api key')
>>> challenges = fortnite.challenges()
>>> print (challenges)
[<Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>, <Challenge 1>]
>>> challenges[0].name
Visit all of the Corrupted Areas
>>> challenges[0].reward_picture_url
https://cdn.thetrackernetwork.com/cdn/trackernetwork/63D2upload.png
Retrieving the current Fortnite store:
>>> from fortnite_python import Fortnite
>>> fortnite = Fortnite('Given api key')
>>> store = fortnite.store()
>>> fortnite.store()
[<StoreItem 1974>, <StoreItem 6010>, <StoreItem 1246>, <StoreItem 6012>,
<StoreItem 918>, <StoreItem 4835>, <StoreItem 6050>, <StoreItem 5981>]
Metadata
Release files for fortnite-python 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fortnite-python-0.3.5.tar.gz | 4.7 kB | Without provenance | Details for fortnite-python-0.3.5.tar.gz |
Release files / fortnite-python-0.3.5.tar.gz
| Download URL | fortnite-python-0.3.5.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1eae14b0138b04a43849f8ee1553083540d985e7f492a310c52e02c99ffa9cd5
|
|
BLAKE2b-256 checksum How to use checksums |
391671511a3d475f76edc165c38805ce3c17e710f4f963762602a2dc8ce97e4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.32.2 CPython/3.6.6
|
Security for fortnite-python 0.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.