Skip to main content

Python API for the NovelAI REST API

Project description

novelai-api

Python API for the NovelAI REST API

This module is intended to be used by developers as a helper for using NovelAI's REST API.

Category Badges
Pypi PyPI PyPI - Python Version PyPI - License PyPI - Format
Quality checking Python package Python package linting: pylint security: bandit Code style: black
Stats GitHub top language Libraries.io dependency status for GitHub repo GitHub repo size GitHub issues GitHub pull requests
Activity GitHub last commit GitHub commits since tagged version GitHub commit activity

Usage

Download via pip:

pip install novelai-api

A full list of examples is available in the example directory

The API works through the NovelAIAPI object. It is split in 2 groups: NovelAIAPI.low_level and NovelAIAPI.high_level

low_level

The low level interface is a strict implementation of the official API (https://api.novelai.net/docs). It only checks for input types via assert, and output schema if NovelAIAPI.low_level.is_schema_validation_enabled is True

high_level

The high level interface builds on the low level one for easier handling of complex settings. It handles many tasks from the frontend

Development

All relevant objects are in the novelai_api directory. The nox package is required (pip install nox).

Contributing

You can contribute features and enhancements through PR. Any PR should pass the tests and the pre-commits before submission. The pre-commit hook can be installed via

nox -s pre-commit

Testing against the API

API

Testing against the mocked API

:warning: WIP, does not work yet :warning:

Mock

Docs

To build the docs, run

nox -s build-docs

The docs will be locally viewable at docs/build/html/index.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

novelai_api-0.12.0.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

novelai_api-0.12.0-py3-none-any.whl (3.6 MB view details)

Uploaded Python 3

File details

Details for the file novelai_api-0.12.0.tar.gz.

File metadata

  • Download URL: novelai_api-0.12.0.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.10 Linux/5.15.105-1-MANJARO

File hashes

Hashes for novelai_api-0.12.0.tar.gz
Algorithm Hash digest
SHA256 1f47e2d6f410e4fe040657207b1e944dea997cbf170915a46faa4eb582013de7
MD5 39a7f05d6ae396b6093b6975f392596c
BLAKE2b-256 ea41bcf36e7841658197f3406ff0c00ae641b4febbba50dfba542785d3ef0d31

See more details on using hashes here.

File details

Details for the file novelai_api-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: novelai_api-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.10 Linux/5.15.105-1-MANJARO

File hashes

Hashes for novelai_api-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31acdb13f00b8b06c0cf942ea420b19bb73b25748381434fc76252589f9b0682
MD5 e79b8e3d6bfa44a66730ddc0a5f3730d
BLAKE2b-256 6c7312088771a556f03305acef4b68cbbeb45f5dc796312b9c93f595f7081844

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page