boilerplate¶
- class API[source]¶
Bases:
objectBoilerplate for the redundant parts. Using the object as a context manager will automatically login using the environment variables
NAI_USERNAMEandNAI_PASSWORD.Usage:
async with API() as api: api = api.api encryption_key = api.encryption_key logger = api.logger ... # Do stuff
A custom base address can be passed to the constructor to replace the default (
BASE_ADDRESS)- logger: logging.Logger¶
- api: novelai_api.NovelAI_API.NovelAIAPI | None¶
- property encryption_key¶