Skip to content

yournovel/novel-client-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

novel_client_py

A python client for the novel API

Installation

pip install novel_client_py

If that doesn't work, try using a python alias:

python3 -m pip install novel_client_py
python -m pip install novel_client_py

Example usage

import asyncio
from novel_client_py import APIClient

async def main():
    base_url = 'http://localhost:15634'
    client = await APIClient(base_url)

    try:
        auth_response = await client.request_authentication('admin', 'admin')
        print(f"Authentication Response: {auth_response}")

        status_response = await client.make_raw_request('status', method='POST', data={'client': 'py'})
        print(f"Status Response: {status_response}")

    except Exception as e:
        print(f"An error occurred: {e}")

    finally:
        await client.session.close()

asyncio.run(main())

About

A python client for the novel API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages