Releases: Fortnite-API/py-wrapper
v3.3.0
Breaking Changes
- Drop support for Python 3.9. The minimum supported Python version is now 3.10.
New Features
- Added support for
CosmeticType.SIDEKICK.
Bug Fixes
- Fixed an issue that caused
Asset.resizeto raiseTypeErrorinstead ofValueErrorwhen the given size isn't a power of 2. - Fixed an issue that caused
ServiceUnavailableto be raised with a static message as a fallback for all unhandled http status codes. InsteadHTTPExceptionis raised with the proper error message. - Fixed typing of our internal "Enum-like" classes. They are now typed as a
Enum.
Miscellaneous
- Added official support for Python 3.14.
v3.2.1
Bugfixes
- Fixed an issue due a change from Epic that causes
VariantBeanto not have aCustomGender. It now usesCustomGender.UNKNOWNin such case instead of raising an exception. - Fixed typo within fallback system for
TileSizeasraisekeyword was used instead ofreturn. - Fixed an issue that caused a
KeyErrorto be raised when usingClient.search_br_cosmeticsorSyncClient.search_br_cosmeticswithoutmultipleparameter.
v3.2.0
This version introduces support for new Shoes cosmetic type, drops support for Python 3.8, and adds safeguards and future proofing against potential API changes.
Breaking Changes
- Drop support for Python 3.8. The minimum supported Python version is now 3.9.
CreatorCode.statusandCreatorCode.disabledhave been removed, since both returned a static value. Disabled creator codes always raiseNotFoundwhen trying to fetch them.CreatorCode.verifiedhas been removed, since it isn't used within the affiliate system. It always returnsFalse.- All enums now use an internal "Enum-like" class to handle unknown values, instead of the built-in
enum.Enum. This potentially breaks type checks, but does not break core functionality or change the enum interface; you can use them the same.
New Features
- Added support for
CosmeticType.SHOES.
Documentation
- Document
Forbiddento be raised byClient.fetch_br_statsandSyncClient.fetch_br_stats.
Miscellaneous
- Add safeguards against Epic Games' API changing or providing invalid values in API responses.
- All enums now can handle unknown values via an internally defined "Enum-like" class. If the API returns a value not in the enum, it will be stored as an attribute on the enum object. The interface for using this class is the same as using
enum.Enum. TileSizeno longer raisesValueErrorwhen an unknown value is passed to it. Instead, it now has a fallback value of-1for both width and height.
- All enums now can handle unknown values via an internally defined "Enum-like" class. If the API returns a value not in the enum, it will be stored as an attribute on the enum object. The interface for using this class is the same as using
v3.1.0
This version introduces new data for shop-related objects, reflecting the updated shop layouts and the Fortnite webshop. Additionally, it includes functions that were omitted in version v3.0.0 and addresses a design decision that results in a breaking change.
Breaking Changes
ShopEntryNewDisplayAssethas been renamed toNewDisplayAsset.- Alias BannerColor.colour has been removed for consistency. The API does not use aliases, use
BannerColor.colorinstead.
New Features
- Added new object
ProductTag. - Added attribute
MaterialInstance.product_tag. - Added new object
ShopEntryOfferTag. - Added new object
ShopEntryColors. - Added new object
RenderImage. - Added attribute
ShopEntryLayout.rank. - Added attribute
NewDisplayAsset.render_images. - Added attribute
ShopEntry.offer_tag. - Added attribute
ShopEntry.colors.
Bug Fixes
- Fixed an issue where
typeandtime_windowparameters were not respected when fetching stats. Playlist.imagesnow returnsNonewhen no images are available, instead of an empty dict.- Bug fix for returning naive
datetimeobjects in rare cases. Alldatetimeobjects are UTC aware.
Documentation
- Added response flags documentation to explain how to use the
ResponseFlagsclass, how to enable response flags, which response flags are available, and when you should enable them. - Added opt-in directive in the documentation on attributes that require a specific response flag to be set. This ensures users know of the response flags required to access certain attributes when using the API.
Miscellaneous
- Previously, fetching specific game mode news raised
ServiceUnavailabledue to improper handling from Fortnite-API.com. This has been fixed within the API. Now, when no news is available,NotFoundis raised instead. This change is also reflected in the documentation.
v3.0 Wrapper Rewrite
This release encompasses the Version 3.0 bump of the Fortnite API Python wrapper. This major transition gives the library a complete facelift, focusing on asynchronous functionality while still supporting the synchronous library you've come to know.
Features and Additions
- Complete overhaul of every object, method, and property in the library. Now, fetching information from the API is done through methods on a
ClientandSyncClientclass. This is to make the library easier to use and maintain, while still being welcoming for new programmers. - Complete overhaul of documentation. This includes a major shift to readthedocs powered by Sphinx for easier documentation.
- Speed improvements for large endpoints, such as fetching all available game cosmetics at once.
- Strictly type hinted with high code standards.
Migration & Getting started
Version 3.0 introduces breaking changes, so existing projects will need updates. To assist you, we've created a migration guide, to help make the transition as smooth as possible.
For new users, the new documentation provides everything you need to get started. Visit it at https://fortnite-api.readthedocs.io/.
Here's a quick example of how the new Client works:
import asyncio
import fortnite_api
async def main() -> None:
async with fortnite_api.Client() as client:
all_cosmetics: fortnite_api.CosmeticsAll = await client.fetch_cosmetics_all()
for br_cosmetic in all_cosmetics.br:
print(br_cosmetic.name)
if __name__ == "__main__":
asyncio.run(main())Fix offer image being optional
ShopMaterialInstanceImages.offer_image_urlis now optional
Fix issue with new CosmeticCompatibleModes
- Implemented a temporary fix, to handle new values for
CosmeticCompatibleMode
New Shop Tile Sizes
- Added new
QUAD_WIDEandPENTA_WIDEShopTileSizes
Update shop tile sizes
- Update the values of the
ShopTileSize, since with the latest shop rotation all have been changed
Fix issue with BrCosmeticType Booster value
- BrCosmeticType booster cosmetic type got an inproper enum value that has been fixed