Name | fortnite-api JSON |
Version |
3.2.0
JSON |
| download |
home_page | None |
Summary | A python wrapper for Fortnite-API.com |
upload_time | 2024-11-25 10:49:03 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9.0 |
license | MIT License Copyright (c) 2019-present Luc1412 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
fortnite
fortnite-api.com
shop
cosmetics
fortnite api
fortnite shop
|
VCS |
 |
bugtrack_url |
|
requirements |
requests
aiohttp
typing_extensions
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Sync/Async Python wrapper for [Fortnite-API.com](https://fortnite-api.com)
[](https://discord.gg/T4tyYDK)

[](https://pypi.org/project/fortnite-api)

[](https://pypi.org/project/fortnite-api)
[](https://fortnite-api.readthedocs.io/)
Welcome to the Fortnite API Python wrapper! This library offers a complete **async** and **sync** wrapper around the endpoints of [Fortnite-API.com](https://fortnite-api.com)
The library's focus is to provide a simple and easy-to-use interface to interact with the API. The library is designed to be as user-friendly as possible, and it is easy to get started with. If you have any questions or need help, feel free to join the [official Discord server](https://discord.gg/T4tyYDK).
## Installation
Note that **Python 3.9 or higher is required.**
```sh
# Linux/macOS
python3 -m pip install fortnite-api
# Windows
py -3 -m pip install fortnite-api
```
To install the developer version, you can use the following command:
```sh
git clone https://github.com/Fortnite-API/py-wrapper
cd py-wrapper
python3 -m pip install .
```
### Optional Dependencies
- `speed`: An optional dependency that installs [`orjson`](https://github.com/ijl/orjson) for faster JSON serialization and deserialization.
```sh
# Linux/macOS
python3 -m pip install fortnite-api[speed]
# Windows
py -3 -m pip install fortnite-api[speed]
```
## API Key
For most endpoints, you do not need an API key. However, some endpoints, such as fetching statistics, require an API key. To use these endpoints, you need to set the `api_key` parameter in the constructor.
```python
import asyncio
import fortnite_api
async def main():
async with fortnite_api.Client(api_key="your_api_key") as client:
stats = await client.fetch_br_stats(name='some_username')
print(stats)
if __name__ == "__main__":
asyncio.run(main())
```
### Generating an API Key
You can generate an API key on <https://dash.fortnite-api.com/account> by logging in with your Discord account.
## Quick Example
### Asynchronous Example
```python
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())
```
### Synchronous Example
```python
import fortnite_api
def main() -> None:
client = fortnite_api.SyncClient()
all_cosmetics: fortnite_api.CosmeticsAll = client.fetch_cosmetics_all()
for br_cosmetic in all_cosmetics.br:
print(br_cosmetic.name)
if __name__ == "__main__":
main()
```
More examples can be found in the `examples/` directory of the repository.
## Links
- [Python Wrapper Documentation](https://fortnite-api.readthedocs.io/en/rewrite/)
- [FortniteAPI API Documentation](https://fortnite-api.com)
- [Official Discord Server](https://discord.gg/T4tyYDK)
## Contribute
Every type of contribution is appreciated.
## Licenses
- Fortnite-API Wrapper (MIT) [License](https://github.com/Fortnite-API/py-wrapper/blob/master/LICENSE)
- requests (Apache) [License](https://github.com/psf/requests/blob/master/LICENSE)
- aiohttp (Apache) [License](https://github.com/aio-libs/aiohttp/blob/6a5ab96bd9cb404b4abfd5160fe8f34a29d941e5/LICENSE.txt)
Raw data
{
"_id": null,
"home_page": null,
"name": "fortnite-api",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9.0",
"maintainer_email": null,
"keywords": "fortnite, fortnite-api.com, shop, cosmetics, fortnite api, fortnite shop",
"author": null,
"author_email": "Luc1412 <Luc1412.lh@gmail.com>, Trevor Flahardy <trevorflahardy@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/b9/06/1307eefbdb7951210927dc1d742fec4be524ac72acb7aa87cc294f417c53/fortnite_api-3.2.0.tar.gz",
"platform": null,
"description": "# Sync/Async Python wrapper for [Fortnite-API.com](https://fortnite-api.com)\n\n[](https://discord.gg/T4tyYDK)\n\n[](https://pypi.org/project/fortnite-api)\n\n[](https://pypi.org/project/fortnite-api)\n[](https://fortnite-api.readthedocs.io/)\n\nWelcome to the Fortnite API Python wrapper! This library offers a complete **async** and **sync** wrapper around the endpoints of [Fortnite-API.com](https://fortnite-api.com)\n\nThe library's focus is to provide a simple and easy-to-use interface to interact with the API. The library is designed to be as user-friendly as possible, and it is easy to get started with. If you have any questions or need help, feel free to join the [official Discord server](https://discord.gg/T4tyYDK).\n\n## Installation\n\nNote that **Python 3.9 or higher is required.**\n\n```sh\n# Linux/macOS\npython3 -m pip install fortnite-api\n\n# Windows\npy -3 -m pip install fortnite-api\n```\n\nTo install the developer version, you can use the following command:\n\n```sh\ngit clone https://github.com/Fortnite-API/py-wrapper\ncd py-wrapper\npython3 -m pip install .\n```\n\n### Optional Dependencies\n\n- `speed`: An optional dependency that installs [`orjson`](https://github.com/ijl/orjson) for faster JSON serialization and deserialization.\n\n```sh\n# Linux/macOS\npython3 -m pip install fortnite-api[speed]\n\n# Windows\npy -3 -m pip install fortnite-api[speed]\n```\n\n## API Key\n\nFor most endpoints, you do not need an API key. However, some endpoints, such as fetching statistics, require an API key. To use these endpoints, you need to set the `api_key` parameter in the constructor.\n\n```python\nimport asyncio\nimport fortnite_api\n\nasync def main():\n async with fortnite_api.Client(api_key=\"your_api_key\") as client:\n stats = await client.fetch_br_stats(name='some_username')\n print(stats)\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n\n### Generating an API Key\n\nYou can generate an API key on <https://dash.fortnite-api.com/account> by logging in with your Discord account.\n\n## Quick Example\n\n### Asynchronous Example\n\n```python\nimport asyncio\nimport fortnite_api \n\nasync def main() -> None:\n async with fortnite_api.Client() as client:\n all_cosmetics: fortnite_api.CosmeticsAll = await client.fetch_cosmetics_all()\n\n for br_cosmetic in all_cosmetics.br:\n print(br_cosmetic.name) \n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n\n### Synchronous Example\n\n```python\nimport fortnite_api\n\ndef main() -> None:\n client = fortnite_api.SyncClient()\n all_cosmetics: fortnite_api.CosmeticsAll = client.fetch_cosmetics_all()\n\n for br_cosmetic in all_cosmetics.br:\n print(br_cosmetic.name)\n\nif __name__ == \"__main__\":\n main()\n```\n\nMore examples can be found in the `examples/` directory of the repository.\n\n## Links\n\n- [Python Wrapper Documentation](https://fortnite-api.readthedocs.io/en/rewrite/)\n- [FortniteAPI API Documentation](https://fortnite-api.com)\n- [Official Discord Server](https://discord.gg/T4tyYDK)\n\n## Contribute\n\nEvery type of contribution is appreciated.\n\n## Licenses\n\n- Fortnite-API Wrapper (MIT) [License](https://github.com/Fortnite-API/py-wrapper/blob/master/LICENSE)\n- requests (Apache) [License](https://github.com/psf/requests/blob/master/LICENSE)\n- aiohttp (Apache) [License](https://github.com/aio-libs/aiohttp/blob/6a5ab96bd9cb404b4abfd5160fe8f34a29d941e5/LICENSE.txt)\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2019-present Luc1412 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A python wrapper for Fortnite-API.com",
"version": "3.2.0",
"project_urls": {
"Documentation": "https://fortnite-api.readthedocs.io/en/rewrite/",
"Home Page": "https://github.com/Fortnite-API/py-wrapper",
"Issues": "https://github.com/Fortnite-API/py-wrapper/issues"
},
"split_keywords": [
"fortnite",
" fortnite-api.com",
" shop",
" cosmetics",
" fortnite api",
" fortnite shop"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "31018c34a7e036d07d2713c830cfbee916b1d22f3def6a00dfbcb3b45291aa8a",
"md5": "f445baf333630e9818b0c06e655a9432",
"sha256": "c395190dcf16029218bb458cb2633bac9939d0b58a344b4008c252e0e198ac70"
},
"downloads": -1,
"filename": "fortnite_api-3.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f445baf333630e9818b0c06e655a9432",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9.0",
"size": 86813,
"upload_time": "2024-11-25T10:49:02",
"upload_time_iso_8601": "2024-11-25T10:49:02.000382Z",
"url": "https://files.pythonhosted.org/packages/31/01/8c34a7e036d07d2713c830cfbee916b1d22f3def6a00dfbcb3b45291aa8a/fortnite_api-3.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b9061307eefbdb7951210927dc1d742fec4be524ac72acb7aa87cc294f417c53",
"md5": "e030cd3581b0abd74e096115203d3134",
"sha256": "8002e6f56cf5445586f007a90114042bd5292bee5778aa54d590b92f8f815fd9"
},
"downloads": -1,
"filename": "fortnite_api-3.2.0.tar.gz",
"has_sig": false,
"md5_digest": "e030cd3581b0abd74e096115203d3134",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9.0",
"size": 63487,
"upload_time": "2024-11-25T10:49:03",
"upload_time_iso_8601": "2024-11-25T10:49:03.350343Z",
"url": "https://files.pythonhosted.org/packages/b9/06/1307eefbdb7951210927dc1d742fec4be524ac72acb7aa87cc294f417c53/fortnite_api-3.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-25 10:49:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Fortnite-API",
"github_project": "py-wrapper",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": [
[
">=",
"2.22.0"
]
]
},
{
"name": "aiohttp",
"specs": [
[
"<",
"4.0.0"
],
[
">=",
"3.9.0"
]
]
},
{
"name": "typing_extensions",
"specs": []
}
],
"lcname": "fortnite-api"
}