Installation¶
Prerequisites¶
Before installing the unraid-api
library, make sure you have:
- Python 3.7 or higher
- pip (Python package installer)
- An Unraid server with the GraphQL API enabled
Installing the Package¶
You can install the package using pip:
This will install the latest stable version of the library from PyPI.
Note
While the package is installed with pip install unraid-api
, you import it in your code using import unraid_api
or from unraid_api import UnraidClient
.
Development Installation¶
If you want to install the development version directly from GitHub:
Enabling the Unraid GraphQL API¶
Before you can use this library, you need to enable the GraphQL API on your Unraid server and generate an API key.
Enabling the GraphQL Sandbox¶
- Enable developer mode using the CLI on your Unraid server:
-
Follow the prompts to enable the sandbox. This will allow you to access the Apollo Sandbox interface.
-
Access the GraphQL playground by navigating to:
Creating an API Key¶
- Use the CLI on your Unraid server to create an API key:
- Follow the prompts to set:
- Name
- Description
- Roles
-
Permissions
-
The generated API key should be used with this library as shown in the examples in the Quick Start section.
Verifying the Installation¶
You can verify that the installation was successful by running:
This should print the version number of the installed library.
Next Steps¶
Once you have installed the library and set up an API key, you can proceed to the Authentication section to learn how to connect to your Unraid server.