GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - coffeepenbit/bookstack: A Python wrapper for BookStack's API

This repository was archived by the owner on Apr 5, 2025. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

32 Commits
32 Commits

Folders and files

NameName
Last commit message
Last commit date
src/bookstack
src/bookstack
 
 
.bumpversion.cfg
.bumpversion.cfg
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
setup.py
setup.py
 
 

Repository files navigation

bookstack

A Python wrapper for BookStack's API

Current version: 0.2.0-post1

Installation

To install bookstack, run:

pip install bookstack

Setup

To use BookStack's API, you'll need to get a token ID and secret.

You can find how to get these values from your BookStack instance's doc page at http[s]://<example.com>/api/docs

Note: Your account's user group must have API usage priveleges enabled.

Usage

Once you've acquired your token ID and secret, you're ready to rock.

>>> import bookstack

# Input the appropriate values for these three variables
>>> base_url = 'http[s]://<example.com>'
>>> token_id = '<token_id>'
>>> token_secret = '<token_secret>'

>>> api = bookstack.BookStack(base_url, token_id=token_id, token_secret=token_secret)

This wrapper dynamically generates its API calls at runtime. To have the wrapper generate the methods, use:

>>> api.generate_api_methods()

>>> api.available_api_methods
{'get_books_export_pdf', 'get_shelves_list', 'post_books_create', 'get_docs_display', 'delete_shelves_delete', 'get_books_list', 'get_docs_json', 'delete_books_delete', 'get_books_read', 'get_shelves_read', 'put_books_update', 'get_books_export_plain_text', 'get_books_export_html', 'post_shelves_create', ...}

The above are then the methods available to you, for example:

>>> books_list = api.get_books_list()
>>> books_list['data'][0]['name']
'Mathematics'

And to POST you can follow this example:

>>> api.post_books_create({'name': 'Sample Book', 'description': 'Sample Description', 'tags': [{ 'name': 'Sample-Name', 'value': 'Sample-Value' }] })

About

A Python wrapper for BookStack's API

Topics

apibookstackpythonwrapper

Resources

Readme
MIT license
Activity

Stars

30 stars

Watchers

1 watching

Forks

11 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.